Esempio n. 1
0
        public void UpdateTile(bool? isActive = null,
            byte? wall = null,
            byte? type = null,
            byte? liquid = null,
            bool? isLava = null,
            PointShort? frame = null)
        {
            if (isActive != null)
                IsActive = (bool) isActive;

            if (wall != null)
                Wall = (byte) wall;

            if (type != null)
                Type = (byte) type;

            if (liquid != null)
                Liquid = (byte) liquid;

            if (isLava != null)
                IsLava = (bool) isLava;

            if (frame != null)
                Frame = (PointShort) frame;
        }
Esempio n. 2
0
 public Tile()
 {
     IsActive = false;
     Type = 0;
     Frame = new PointShort(-1, -1);
     Wall = 0;
     IsLighted = false;
     Liquid = 0;
     IsLava = false;
 }
Esempio n. 3
0
 private static bool MatchFields(PointShort a, PointShort m)
 {
     return (a.X == m.X && a.Y == m.Y);
 }
Esempio n. 4
0
 public bool Equals(PointShort p)
 {
     return MatchFields(this, p);
 }
Esempio n. 5
0
 private void SetTileSprite(PointInt32 point, PointShort frame, byte type)
 {
     var curTile = _world.Tiles[point.X, point.Y];
     if (curTile != null)
     {
         curTile.IsActive = true;
         curTile.Type = type;
         curTile.Frame = frame;
         _renderer.UpdateWorldImage(point);
     }
 }