The core display of the current part of the dungeon
Inheritance: Zoomable
 public static async Task CreateXML(Mainmap _map, Camera _camera, ContentManager _content)
 {
     CreateMix(_content);
     CreateWalls(_content, "wall1");
     CreateWalls(_content, "wall2");
     CreateWalls(_content, "wall3");
     CreateFloor(_content, "floor1");
     CreateFloor(_content, "floor2");
     CreateFloor(_content, "floor3");
     CreateWalls(_content, "wall4");
     _content.Unload();
     CreateActor(_map, _content, _camera, "bat");
     CreateActor(_map, _content, _camera, "bow");
     CreateActor(_map, _content, _camera, "croc");
     CreateActor(_map, _content, _camera, "Cyclops");
     CreateActor(_map, _content, _camera, "dead");
     CreateActor(_map, _content, _camera, "devil");
     CreateActor(_map, _content, _camera, "dragon");
     CreateActor(_map, _content, _camera, "fairy");
     CreateActor(_map, _content, _camera, "Ghost");
     CreateActor(_map, _content, _camera, "gnome");
     CreateActor(_map, _content, _camera, "guard");
     CreateActor(_map, _content, _camera, "Luigi");
     CreateActor(_map, _content, _camera, "mage");
     CreateActor(_map, _content, _camera, "monk");
     CreateActor(_map, _content, _camera, "mouse");
     CreateActor(_map, _content, _camera, "Mummy");
     CreateActor(_map, _content, _camera, "Necro");
     CreateActor(_map, _content, _camera, "NPC1");
     CreateActor(_map, _content, _camera, "player");
     CreateActor(_map, _content, _camera, "princess");
     CreateActor(_map, _content, _camera, "rat");
     CreateActor(_map, _content, _camera, "skeleton");
     CreateActor(_map, _content, _camera, "skull");
     CreateActor(_map, _content, _camera, "spider");
     CreateActor(_map, _content, _camera, "thief");
     CreateActor(_map, _content, _camera, "vamp");
     CreateActor(_map, _content, _camera, "wolf");
     CreateActor(_map, _content, _camera, "xmas");
     CreateActor(_map, _content, _camera, "Zombie");
     _content.Unload();
     return;
 }
 public static void CreateActor(Mainmap _map, ContentManager _content, Camera _camera, string character = "")
 {
     Backend.Actor tmp = new Backend.Actor(Backend.ActorType.NPC, 20, 20, 20);
     ActorView player = new ActorView(_camera, _map, 0, _content, Backend.Coords.Zero, tmp);
     _AddActivity(_content, player, character, "walk", Backend.Activity.Walk);
     _AddActivity(_content, player, character, "hit", Backend.Activity.Hit);
     _AddActivity(_content, player, character, "die", Backend.Activity.Die);
     _AddActivity(_content, player, character, "talk", Backend.Activity.Talk);
     _AddActivity(_content, player, character, "attack", Backend.Activity.Attack);
     _AddActivity(_content, player, character, "special", Backend.Activity.Special);
     player.Save("Content\\" + character + ".xml");
 }
Beispiel #3
0
        /// <summary>
        /// Setup user interface
        /// </summary>
        private void SetupGame()
        {


            _mainmap1 = new Mainmap(this, _spriteBatch, Content, new Rectangle(5, 5, _graphics.GraphicsDevice.Viewport.Width - 5, ((_graphics.GraphicsDevice.Viewport.Height - 20)) - 125), _logic.map, true);
            _interfaceElements.Add(_mainmap1);

            _toolbar = new Toolbar(this, _spriteBatch, Content, new Rectangle((_graphics.GraphicsDevice.Viewport.Width - 490) / 2, _graphics.GraphicsDevice.Viewport.Height - 140, (_graphics.GraphicsDevice.Viewport.Width - 490) / 2, 34), _logic.map.actors[_playerID]);
            _interfaceElements.Add(_toolbar);
            _minimap1 = new Minimap(this, _spriteBatch, Content, new Rectangle(_graphics.GraphicsDevice.Viewport.Width - 220, 5, 215, 215), _logic.map);
            _interfaceElements.Add(_minimap1);

            _statusbox = new Chat(this, _spriteBatch, Content, new Rectangle(145, _graphics.GraphicsDevice.Viewport.Height - 100, _graphics.GraphicsDevice.Viewport.Width - 525, 95));
            _interfaceElements.Add(_statusbox);

            _health = new Orb(this, _spriteBatch, Content, new Rectangle(5, _graphics.GraphicsDevice.Viewport.Height - 139, 90, 90), _logic.map.actors[_playerID], false);
            _interfaceElements.Add(_health);

            _mana = new Orb(this, _spriteBatch, Content, new Rectangle(_graphics.GraphicsDevice.Viewport.Width - 380, _graphics.GraphicsDevice.Viewport.Height - 139, 90, 90), _logic.map.actors[_playerID], true);
            _interfaceElements.Add(_mana);

            _logic.HandleEvent(true, Events.Initialize);
        }