资源简介
李逵劈鱼+源码[已测试可用]正版李逵劈鱼部分源码,仅供研究使用!如有商业运作,与本人无关!
代码片段和文件信息
#include “stdafx.h“
#include “bingo.h“
#include “game_manager.h“
#include “hgeresource.h“
#include “cannon_manager.h“
#include “sound_manager.h“
const float kFadeTime = 5.f;
const int kFadeFactor = 10;
const float kRotateRadian = 0.1f;
Bingo::Bingo() {
for (WORD i = 0; i < GAME_Player; ++i) {
delta_time_[i] = 0.f;
fish_score_[i] = 0;
spr_bingo_num_[i] = NULL;
ani_bingo_[i] = NULL;
rotate_[i] = 0.f;
rotate_factor[i] = 1;
}
}
Bingo::~Bingo() {
for (WORD i = 0; i < GAME_Player; ++i) {
SAFE_DELETE(spr_bingo_num_[i]);
SAFE_DELETE(ani_bingo_[i]);
}
}
bool Bingo::LoadGameResource() {
hgeResourceManager* resource_manager = GameManager::GetInstance().GetResourceManager();
hgeAnimation* spr_bingo_num = resource_manager->GetAnimation(“bingo_num“);
hgeAnimation* ani_bingo = resource_manager->GetAnimation(“bingo“);
for (WORD i = 0; i < GAME_Player; ++i) {
spr_bingo_num_[i] = new hgeAnimation(*spr_bingo_num);
ani_bingo_[i] = new hgeAnimation(*ani_bingo);
ani_bingo_[i]->Play();
}
return true;
}
void Bingo::SetBingoInfo(WORD chair_id SCORE fish_score) {
assert(chair_id < GAME_Player);
if (chair_id >= GAME_Player) return;
//assert(fish_score > 0);
if (fish_score <= 0) return;
fish_score_[chair_id] = fish_score;
spr_bingo_num_[chair_id]->SetColor(0xFFFFFFFF);
ani_bingo_[chair_id]->SetColor(0xFFFFFFFF);
delta_time_[chair_id] = 0.f;
rotate_[chair_id] = 0.f;
rotate_factor[chair_id] = 1;
SoundManager::GetInstance().PlayGameEffect(BINGO);
}
bool Bingo::Onframe(float delta_time) {
for (WORD i = 0; i < GAME_Player; ++i) {
if (fish_score_[i] == 0) continue;
ani_bingo_[i]->Update(delta_time);
delta_time_[i] += delta_time;
rotate_[i] += kRotateRadian * rotate_factor[i];
if (rotate_[i] >= M_PI_4) {
rotate_factor[i] = -1;
} else if (rotate_[i] <= -M_PI_4) {
rotate_factor[i] = 1;
}
if (delta_time_[i] >= kFadeTime) {
DWORD color = ani_bingo_[i]->GetColor();
int alpha = GETA(color);
alpha -= kFadeFactor;
if (alpha <= 5) {
color = 0x00FFFFFF;
ani_bingo_[i]->SetColor(color);
spr_bingo_num_[i]->SetColor(color);
fish_score_[i] = 0;
} else {
color = SETA(color alpha);
ani_bingo_[i]->SetColor(color);
spr_bingo_num_[i]->SetColor(color);
}
}
}
return false;
}
bool Bingo::OnRender(float offset_x float offset_y float hscale float vscale) {
float scale = vscale * 0.5030f;
float scaleh = hscale * 0.5874f;
for (WORD i = 0; i < GAME_Player; ++i) {
if (fish_score_[i] == 0) continue;
FPoint pos = GetBingoPos(i hscale vscale);
ani_bingo_[i]->RenderEx(pos.x pos.y kChairDefaultAngle[i] scaleh scaleh);
RenderNum(i (int)fish_score_[i] pos.x pos.y kChairDefaultAngle[i] scaleh scale);
}
return false;
}
FPoint Bingo::
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7247 2013-09-09 17:22 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\1.xm
文件 7177 2013-10-28 16:02 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\command\CMD_Fish.h
文件 6697 2013-06-16 23:02 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bingo.cpp
文件 769 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bingo.h
文件 3648 2013-06-06 15:17 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bounding_box.cpp
文件 1018 2013-06-06 15:17 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bounding_box.h
文件 16968 2013-06-21 16:37 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bullet_manager.cpp
文件 2924 2013-06-20 19:27 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\bullet_manager.h
文件 11367 2013-07-21 14:46 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\cannon_manager.cpp
文件 1707 2013-06-18 09:55 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\cannon_manager.h
文件 19622 2013-07-25 12:59 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\client_kernel.cpp
文件 4371 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\client_kernel.h
文件 4925 2013-06-22 15:43 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\coin_manager.cpp
文件 1325 2013-06-22 15:41 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\coin_manager.h
文件 4286 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish.ico
文件 2826 2013-10-28 16:03 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish.rc
文件 897 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish.sln
文件 12855 2013-07-25 10:44 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish.vcproj
文件 48677 2013-07-21 20:13 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish_manager.cpp
文件 6727 2013-07-21 20:13 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\fish_manager.h
文件 2413 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FontSprite.h
文件 13817 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\config\ftconfig.h
文件 24082 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\config\ftheader.h
文件 1054 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\config\ftmodule.h
文件 42759 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\config\ftoption.h
文件 7952 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\config\ftstdlib.h
文件 214666 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\freetype.h
文件 4715 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\ftbbox.h
文件 6445 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\ftbdf.h
文件 12803 2013-05-31 11:25 棋牌资源[李逵劈鱼HGE]\李逵劈鱼HGE\李逵劈鱼\fish\FontCN\FreeType\include\freetype\ftbitmap.h
............此处省略947个文件信息
- 上一篇:2.rar
- 下一篇:离散数学2014版.rar
评论
共有 条评论