示例#1
0
 public DamageMove(Lidgren.Network.NetIncomingMessage p)
 {
     time_execute = p.ReadSingle();
     attacker     = (TargetType)p.ReadByte();
     attacker_id  = p.ReadUInt16();
     target       = (TargetType)p.ReadByte();
     target_id    = p.ReadUInt16();
     damage       = p.ReadInt16();
     damage_code  = (CauseDamage)p.ReadByte();
     range        = p.ReadUInt16();
 }
示例#2
0
 public Chunk(Lidgren.Network.NetIncomingMessage i, World w)
 {
     area      = new Rectangle(i.ReadUInt16(), i.ReadUInt16(), i.ReadUInt16(), i.ReadUInt16());
     timestamp = System.DateTime.Now.Ticks / 10000;
     for (int x = area.X; x < area.Right; x++)
     {
         for (int y = area.Y; y < area.Bottom; y++)
         {
             w.map[x, y] = new Voxel(i);
         }
     }
 }
示例#3
0
 public PlantUnit(Lidgren.Network.NetIncomingMessage r)
 {
     top_left   = new Point(r.ReadUInt16(), r.ReadUInt16());
     width      = r.ReadByte();
     height     = r.ReadByte();
     piece_type = r.ReadString();
     images     = new ushort[r.ReadByte()];
     for (int x = 0; x < images.Length; x++)
     {
         images[x] = r.ReadUInt16();
     }
 }
示例#4
0
        public ItemChest(Lidgren.Network.NetIncomingMessage r)
        {
            destroyable    = r.ReadBoolean();
            chest_name     = r.ReadString();
            security       = r.ReadString();
            world_top_left = new Point(r.ReadUInt16(), r.ReadUInt16());
            furniture_id   = r.ReadUInt16();
            items          = new List <Cubby>();
            int num_items = r.ReadByte();

            for (int i = 0; i < num_items; i++)
            {
                items.Add(new Cubby(r));
            }
        }
示例#5
0
        public Plant(Lidgren.Network.NetIncomingMessage r)
        {
            is_empty    = false;
            plant_index = r.ReadByte();
            name        = r.ReadString();
            top_left    = new Point(r.ReadUInt16(), r.ReadUInt16());
            height      = r.ReadByte();
            int num_pieces = r.ReadByte();

            pieces = new List <PlantUnit>();
            for (int x = 0; x < num_pieces; x++)
            {
                pieces.Add(new PlantUnit(r));
            }
            passable = Exilania.plant_manager.plants[plant_index].passable;
        }
示例#6
0
 public GrowthEvent(Lidgren.Network.NetIncomingMessage m)
 {
     loc       = new Point(m.ReadUInt16(), m.ReadUInt16());
     growth_id = m.ReadByte();
 }