protected override void Read(OnlineReader Sender) { UpdatedPlayerIndex = Sender.ReadInt32(); UpdatedSquadIndex = Sender.ReadInt32(); CursorPositionX = Sender.ReadFloat(); CursorPositionY = Sender.ReadFloat(); CursorPositionZ = Sender.ReadFloat(); }
protected override void Read(OnlineReader Host) { LayerIndex = Host.ReadInt32(); ActiveRobotID = Host.ReadUInt32(); TargetRobotID = Host.ReadUInt32(); DamagePosition = new Vector2(Host.ReadFloat(), Host.ReadFloat()); Damage = Host.ReadInt32(); FinalHP = Host.ReadInt32(); IsPlayerControlled = Host.ReadBoolean(); }
protected override void Read(OnlineReader Host) { LayerIndex = Host.ReadInt32(); PlayerID = Host.ReadUInt32(); PositionX = Host.ReadFloat(); PositionY = Host.ReadFloat(); PlayerHP = Host.ReadInt32(); }
protected override void Read(OnlineReader Host) { OwnerID = Host.ReadUInt32(); LayerIndex = Host.ReadInt32(); WeaponName = Host.ReadString(); GunNozzlePosition = new Vector2(Host.ReadFloat(), Host.ReadFloat()); int NumberOfBullets = Host.ReadInt32(); ListSpeed = new List <Vector2>(NumberOfBullets); for (int B = 0; B < NumberOfBullets; ++B) { ListSpeed.Add(new Vector2(Host.ReadFloat(), Host.ReadFloat())); } }
protected override void Read(OnlineReader Host) { LayerIndex = Host.ReadInt32(); PlayerID = Host.ReadUInt32(); PositionX = Host.ReadFloat(); PositionY = Host.ReadFloat(); SpeedX = Host.ReadFloat(); SpeedY = Host.ReadFloat(); ActiveMovementStance = Host.ReadString(); WeaponCount = Host.ReadInt32(); ListWeaponAngle = new List <float>(WeaponCount); for (int W = 0; W < WeaponCount; W++) { ListWeaponAngle.Add(Host.ReadFloat()); } }
protected override void Read(OnlineReader Sender) { PlayerID = Sender.ReadUInt32(); LayerIndex = Sender.ReadInt32(); Team = Sender.ReadInt32(); AIPath = Sender.ReadString(); EnemyPath = Sender.ReadString(); Position = new Vector2(Sender.ReadFloat(), Sender.ReadFloat()); int ListWeaponsCount = Sender.ReadInt32(); ListWeapons = new List <string>(ListWeaponsCount); for (int W = 0; W < ListWeaponsCount; ++W) { ListWeapons.Add(Sender.ReadString()); } }
public static GamePlayer ReadGamePlayer(OnlineReader Sender) { uint GamePlayerID = Sender.ReadUInt32(); int LayerIndex = Sender.ReadInt32(); Vector2 PlayerPosition = new Vector2(Sender.ReadFloat(), Sender.ReadFloat()); string PlayerID = Sender.ReadString(); string PlayerName = Sender.ReadString(); string PlayerType = Sender.ReadString(); int PlayerTeam = Sender.ReadInt32(); Player PlayerInfo = new Player(PlayerID, PlayerName, PlayerType, PlayerTeam); PlayerInfo.Equipment.CharacterType = Sender.ReadString(); /*PlayerInfo.Equipment.EquipedBooster =*/ Sender.ReadString(); PlayerInfo.Equipment.GrenadeType = Sender.ReadString(); /*PlayerInfo.Equipment.EquipedSecondaryWeapon = */ Sender.ReadString(); /*PlayerInfo.Equipment.EquipedWeaponOption =*/ Sender.ReadString(); /*PlayerInfo.Equipment.EquipedArmor =*/ Sender.ReadString(); return(new GamePlayer(GamePlayerID, null, LayerIndex, PlayerPosition, PlayerInfo)); }
public Squad GetOnlineSquad(OnlineReader ActivePlayer, out int SquadPlayerIndex) { SquadPlayerIndex = ActivePlayer.ReadInt32(); float SquadPositionX = ActivePlayer.ReadFloat(); float SquadPositionY = ActivePlayer.ReadFloat(); float SquadPositionZ = ActivePlayer.ReadFloat(); string ActiveSquadSquadName = ActivePlayer.ReadString(); byte UnitsInSquad = ActivePlayer.ReadByte(); Unit NewLeader = null, NewWingmanA = null, NewWingmanB = null; if (UnitsInSquad >= 1) { string UnitTypeName = ActivePlayer.ReadString(); string UnitName = ActivePlayer.ReadString(); int CharacterCount = ActivePlayer.ReadInt32(); NewLeader = Unit.FromType(UnitTypeName, UnitName, Map.Content, Map.DicUnitType, Map.DicRequirement, Map.DicEffect); NewLeader.ArrayCharacterActive = new Character[CharacterCount]; for (int C = 0; C < CharacterCount; C++) { NewLeader.ArrayCharacterActive[C] = new Character(ActivePlayer.ReadString(), Map.Content, Map.DicRequirement, Map.DicEffect); } //Initialise the Unit stats. NewLeader.Init(); } if (UnitsInSquad >= 2) { string UnitTypeName = ActivePlayer.ReadString(); string UnitName = ActivePlayer.ReadString(); int CharacterCount = ActivePlayer.ReadInt32(); NewWingmanA = Unit.FromType(UnitTypeName, UnitName, Map.Content, Map.DicUnitType, Map.DicRequirement, Map.DicEffect); NewWingmanA.ArrayCharacterActive = new Character[CharacterCount]; for (int C = 0; C < CharacterCount; C++) { NewWingmanA.ArrayCharacterActive[C] = new Character(ActivePlayer.ReadString(), Map.Content, Map.DicRequirement, Map.DicEffect); } //Initialise the Unit stats. NewWingmanA.Init(); } if (UnitsInSquad >= 3) { string UnitTypeName = ActivePlayer.ReadString(); string UnitName = ActivePlayer.ReadString(); int CharacterCount = ActivePlayer.ReadInt32(); NewWingmanB = Unit.FromType(UnitTypeName, UnitName, Map.Content, Map.DicUnitType, Map.DicRequirement, Map.DicEffect); NewWingmanB.ArrayCharacterActive = new Character[CharacterCount]; for (int C = 0; C < CharacterCount; C++) { NewWingmanB.ArrayCharacterActive[C] = new Character(ActivePlayer.ReadString(), Map.Content, Map.DicRequirement, Map.DicEffect); } //Initialise the Unit stats. NewWingmanB.Init(); } Squad NewSquad = new Squad(ActiveSquadSquadName, NewLeader, NewWingmanA, NewWingmanB); Map.SpawnSquad(SquadPlayerIndex, NewSquad, 0, new Vector3(SquadPositionX, SquadPositionY, SquadPositionZ)); return(NewSquad); }
protected override void Read(OnlineReader Sender) { Position = new Vector2(Sender.ReadFloat(), Sender.ReadFloat()); Speed = new Vector2(Sender.ReadFloat(), Sender.ReadFloat()); VFXType = Sender.ReadByte(); }
protected override void Read(OnlineReader Sender) { CursorPositionX = Sender.ReadFloat(); CursorPositionY = Sender.ReadFloat(); }
protected override void Read(OnlineReader Host) { Position = new Vector2(Host.ReadFloat(), Host.ReadFloat()); Speed = new Vector2(Host.ReadFloat(), Host.ReadFloat()); VFXType = (VFXTypes)Host.ReadByte(); }