//------------------------------------------------------------------------- public CRenderTurret createTurret(int turret_id, ref _tScenePlayer scene_player, int player_gold, bool buffer_power, bool buffer_freeze, bool buffer_longpress, bool buffer_rapid, int turret_rate, float turret_angle, int locked_fish_objid, TbDataTurret.TurretType turret_type) { CRenderTurret turret = new CRenderTurret(this); turret.create(turret_id, ref scene_player, player_gold, buffer_power, buffer_freeze, buffer_longpress, buffer_rapid, turret_rate, turret_angle, locked_fish_objid, turret_type); mMapPlayerTurret[scene_player.et_player_rpcid] = turret; return(turret); }
//------------------------------------------------------------------------- void _s2allcPlayerEnter(List <string> vec_param) { if (!mScene.isInit()) { return; } int index = 0; _tScenePlayer scene_player; scene_player.et_player_rpcid = uint.Parse(vec_param[++index]); scene_player.nickname = (string)vec_param[++index]; scene_player.is_bot = false; int player_gold = int.Parse(vec_param[++index]); scene_player.rate = float.Parse(vec_param[++index]); int turret_id = int.Parse(vec_param[++index]); bool buffer_power = bool.Parse(vec_param[++index]); bool buffer_freeze = bool.Parse(vec_param[++index]); bool buffer_longpress = bool.Parse(vec_param[++index]); bool buffer_rapid = bool.Parse(vec_param[++index]); float turret_angle = float.Parse(vec_param[++index]); int turret_rate = int.Parse(vec_param[++index]); TbDataTurret.TurretType turret_type = (TbDataTurret.TurretType)(short.Parse(vec_param[++index])); int locked_fish_objid = int.Parse(vec_param[++index]); Dictionary <uint, CRenderTurret> map_turret = mScene.getMapTurret(); if (map_turret.ContainsKey(scene_player.et_player_rpcid)) { map_turret[scene_player.et_player_rpcid].Dispose(); map_turret.Remove(scene_player.et_player_rpcid); } if (mScene.getMyPlayerId() == scene_player.et_player_rpcid) { mScene.setMyTurret(null); } CRenderTurret turret = new CRenderTurret(mScene); turret.create(turret_id, ref scene_player, player_gold, buffer_power, buffer_freeze, buffer_longpress, buffer_rapid, turret_rate, turret_angle, locked_fish_objid, turret_type); map_turret[scene_player.et_player_rpcid] = turret; if (mScene.getMyPlayerId() == scene_player.et_player_rpcid) { mScene.setMyTurret(turret); } }