示例#1
0
 public ClientHandler(TcpClient client,int id,GameHandler game)
 {
     Client = client;
     _game = game;
     FugamId = new FugamID(Client.GetHashCode(),id);
     _clientThread = new Thread(new ThreadStart(ClientThread));
     ServerIO.Send(Client.GetStream(),new PacketFugamID(FugamId));
 }
示例#2
0
 public override bool Equals(object obj)
 {
     if (obj is FugamID)
     {
         FugamID id = (FugamID)obj;
         return(ClientID == id.ClientID);
     }
     return(false);
 }
示例#3
0
文件: Player.cs 项目: Jannickvb/fugam
        public Player(FugamID id,TileMap tilemap)
            : base(tilemap)
        {
            fid = id;
            y = 11;

            switch (fid.GameID)
            {
                case 0:
                    x = 4;
                    animation = new Animation(Properties.Resources.playerred, 32, 32, 55);
                    break;
                case 1:
                    x = 10;
                    animation = new Animation(Properties.Resources.playerblue, 32, 32, 65);
                    break;
            }
            currentImage = animation.GetCurrentImage();
        }
示例#4
0
 public PacketLevel(FugamID id, string levelid)
     : base(id)
 {
     NewLevelId = levelid;
 }
示例#5
0
文件: Packet.cs 项目: Jannickvb/fugam
 protected Packet(FugamID id)
 {
     FugamId = id;
 }
示例#6
0
 public YourPlayer(FugamID id, TileMap tm,TileMap collisionMap)
     : base(id,tm)
 {
     _collisonMap = collisionMap;
 }
示例#7
0
 public PacketFugamID(FugamID id)
     : base(id)
 {
 }
示例#8
0
 public PacketPlayers(FugamID id,List<FugamID> playerids )
     : base(id)
 {
     playerIDs = playerids;
 }
示例#9
0
 public PacketPlayerPosition(FugamID id,int x, int y)
     : base(id)
 {
     X = x;
     Y = y;
 }