Пример #1
0
        public override GameObject Clone()
        {
            var clone = new DrawableGameObject(Game);

            SetClone(clone);
            return(clone);
        }
Пример #2
0
        private void Initialize()
        {
            var floor = new DrawableGameObject(this)
            {
                Tile  = '.',
                Name  = "Floor",
                Key   = "floor1",
                Color = ConsoleColor.DarkGreen
            };

            ObjectsDictionary.Add(floor);

            _currentMap = new Map(this, 50, 50);

            for (int x = 0; x < 50; x++)
            {
                for (int y = 0; y < 50; y++)
                {
                    _currentMap.Add(ObjectsDictionary["floor1"], x, y);
                }
            }

            _player = new Creature(this)
            {
                X        = 2,
                Y        = 2,
                IsPlayer = true,
                Tile     = '@',
                Map      = _currentMap,
                Color    = ConsoleColor.Red
            };
            _camera = _player;
            _currentMap.Add(_player);
        }
Пример #3
0
        private void Initialize()
        {
            var floor = new DrawableGameObject(this)
            {
                Tile = '.',
                Name = "Floor",
                Key = "floor1",
                Color = ConsoleColor.DarkGreen
            };
            ObjectsDictionary.Add(floor);

            _currentMap = new Map(this, 50, 50);

            for (int x = 0; x < 50; x++)
            {
                for (int y = 0; y < 50; y++)
                {
                    _currentMap.Add(ObjectsDictionary["floor1"], x, y);
                }
            }

            _player = new Creature(this)
            {
                X = 2,
                Y = 2,
                IsPlayer = true,
                Tile = '@',
                Map = _currentMap,
                Color = ConsoleColor.Red
            };
            _camera = _player;
            _currentMap.Add(_player);
        }
Пример #4
0
 public void DrawInGameZone(DrawableGameObject obj)
 {
     DrawInGameZone(obj.Position, obj.Tile, obj.Color);
 }
 public override GameObject Clone()
 {
     var clone = new DrawableGameObject(Game);
     SetClone(clone);
     return clone;
 }
Пример #6
0
 public void DrawInGameZone(DrawableGameObject obj)
 {
     DrawInGameZone(obj.Position, obj.Tile, obj.Color);
 }