//--------------------------------------------------------------------- public void create(int level_vibid, float level_rate, List <JsonPacket> json_packet_list, List <RouteJsonPacket> route_json_packet_list) { mVibLevel = EbDataMgr.Instance.getData <TbDataLevel>(level_vibid); mLevelRate = level_rate; _initBaseFishLordMgr(json_packet_list, route_json_packet_list); addState(new CLogicLevelStateNormal(mScene, this)); addState(new CLogicLevelStateSwitch(mScene, this)); setupFsm(); }
//------------------------------------------------------------------------- public void setup(_eLevelState level_state, int level_vibid, int cur_map_vibid, int next_map_vibid, float level_run_totalsecond, float level_run_maxsecond) { mVibLevel = EbDataMgr.Instance.getData <TbDataLevel>(level_vibid); CurMapVibId = cur_map_vibid; NextMapVibId = next_map_vibid; LevelCurRunSecond = level_run_totalsecond; LevelMaxRunSecond = level_run_maxsecond; if (getLevelState() == _eLevelState.Switch && level_state == _eLevelState.Normal) { mSpriteLevel.switchBackgroundEarly(); } if (getLevelState() != level_state) { processEvent("setState", level_state); } }
//------------------------------------------------------------------------- public void create(_eLevelState level_state, int level_vibid, int cur_map_vibid, int next_map_vibid, float level_run_totalsecond, float level_run_maxsecond, List <JsonPacket> json_packet_list, List <RouteJsonPacket> route_json_packet_list) { mVibLevel = EbDataMgr.Instance.getData <TbDataLevel>(level_vibid); CurMapVibId = cur_map_vibid; NextMapVibId = next_map_vibid; LevelCurRunSecond = level_run_totalsecond; LevelMaxRunSecond = level_run_maxsecond; mSpriteLevel = new CSpriteLevel(); mSpriteLevel.create(mScene); addState(new CRenderLevelStateNormal(mScene, this)); addState(new CRenderLevelStateSwitch(mScene, this)); setupFsm(); _initBaseFishLordMgr(json_packet_list, route_json_packet_list); if (getLevelState() != level_state) { processEvent("setState", level_state); } }