Ejemplo n.º 1
0
        public override void ReceivePacketPlayers(PacketPlayers pp)
        {
            player = new YourPlayer(gsm.FugamId,_level.TileMap,_level.CollisonMap);

            _otherPlayers = new Player[pp.playerIDs.Count-1];

            int opp = 0;
            for (int i = 0; i < pp.playerIDs.Count; i++)
            {
                if (!pp.playerIDs.ElementAt(i).Equals(gsm.FugamId))
                {
                    _otherPlayers[opp] = new Player(pp.playerIDs.ElementAt(i),_level.TileMap);
                    opp++;
                }
            }
        }
Ejemplo n.º 2
0
 public bool PlayerOnTile(Player p)
 {
     //Console.WriteLine("Player: "+p.fid+"\tX: "+p.x+"\tY: "+p.y);
     //Console.WriteLine("Tile: X:"+X/Size+"\tY: "+Y/Size);
     return p.x == (X/Size) && p.y == (Y/Size);
 }