Example #1
0
 public override void LoadContent(Equipment owner, ContentManager content, ManagerMap managerMap, ManagerCamera managerCamera, Entities entities)
 {
     base.LoadContent(owner, content, managerMap, managerCamera, entities);
     AddComponent(new Sprite(ManagerContent.LoadTexture("sword"), 16, 16, new Vector2(0, 0)));
     AddComponent(new Animation(16, 16, 2, 100));
     AddComponent(new Camera(managerCamera));
     GuiTexture = ManagerContent.LoadTexture("sword_gui");
 }
Example #2
0
 public void LoadContent(ContentManager content)
 {
     _rupeeTexture      = ManagerContent.LoadTexture("rupee_gui");
     _heartTexture      = ManagerContent.LoadTexture("heart_gui");
     _containerTexture  = ManagerContent.LoadTexture("container_gui");
     _font              = ManagerContent.LoadFont("Font_GUI");
     _backgroundTexture = ManagerContent.LoadTexture("white_background");
 }
Example #3
0
 protected Window()
 {
     FontColor = Color.White;
     AMenu     = false;
     Opacity   = 255;
     Color     = Color.Black;
     Font      = ManagerContent.LoadFont("Font_GUI");
     Texture   = ManagerContent.LoadTexture("white_background");
 }
 public override void LoadContent(ContentManager content)
 {
     _mapTexture          = ManagerContent.LoadTexture("overworld_map");
     _firstCursorTexture  = ManagerContent.LoadTexture("map_cursor_1");
     _secondCursorTexture = ManagerContent.LoadTexture("map_cursor_2");
     _mapBlockTexture     = ManagerContent.LoadTexture("map_block");
     _playerIconTexture   = ManagerContent.LoadTexture("map_player_icon");
     _overworldMapObjects.LoadContent(content);
 }
        public void LoadContent(ContentManager content)
        {
            _mapIconDungeonTexture  = ManagerContent.LoadTexture("map_icon_dungeon");
            _mapIconOwlTexture      = ManagerContent.LoadTexture("map_icon_owl");
            _mapIconQuestionTexture = ManagerContent.LoadTexture("map_icon_question");
            _mapIconShopTexture     = ManagerContent.LoadTexture("map_icon_shop");

            _objects.Add(new Vector2(0, 1), _mapIconDungeonTexture);
            _objects.Add(new Vector2(1, 2), _mapIconOwlTexture);
        }
 public override void LoadContent(ContentManager content)
 {
     _rupeeTexture      = ManagerContent.LoadTexture("rupee_gui");
     _heartTexture      = ManagerContent.LoadTexture("heart_gui");
     _containerTexture  = ManagerContent.LoadTexture("container_gui");
     _font              = ManagerContent.LoadFont("Font_GUI");
     _tempTexture       = ManagerContent.LoadTexture("boomerang_gui");
     _backgroundTexture = ManagerContent.LoadTexture("white_background");
     _barHor            = ManagerContent.LoadTexture("menu_block_hor");
     _barVert           = ManagerContent.LoadTexture("menu_block_vert");
     _playerStatsGui.LoadContent(content);
 }
Example #7
0
 public ManagerMap(ManagerCamera camera, ManagerMouse managerMouse, MainForm mainForm)
 {
     _managerCamera             = camera;
     _managerMouse              = managerMouse;
     _tiles                     = new Manager.ManagerMap("..", camera);
     _tileGridTexture           = ManagerContent.LoadTexture("tile_mapeditor");
     _font                      = ManagerContent.LoadFont("Font_GUI");
     _mainForm                  = mainForm;
     _mainForm.btnSave.Click   += Save;
     _mainForm.LoadMap         += LoadMap;
     ManagerInput.FireNewInput += ManagerInputOnFireNewInput;
     ManagerInput.ThrottleInput = true;
 }
        public static BaseObject GetDeathAnimationObject(DeathAnimation deathAnimation, Vector2 position)
        {
            var baseObject = new BaseObject {
                Id = "deathAnimation"
            };

            switch (deathAnimation)
            {
            case DeathAnimation.Explosion:
                baseObject.AddComponent(new Sprite(ManagerContent.LoadTexture("death_effect"), 16, 16, position));
                baseObject.AddComponent(new Animation(16, 16, 3, 100));
                baseObject.AddComponent(new DeathAnimationExplosion());
                baseObject.AddComponent(new Camera(_camera));
                break;
            }

            return(baseObject);
        }
 public override void LoadContent(ContentManager content)
 {
     _image = ManagerContent.LoadTexture("start_screen"); //content.Load<Texture2D>("start_screen");
 }
 public void LoadContent()
 {
     //_texture = content.Load<Texture2D>(TextureName);
     _texture = ManagerContent.LoadTexture(TextureName);
 }
 public void LoadContent()
 {
     _texture = ManagerContent.LoadTexture("cross");
 }
Example #12
0
 public ManagerMouse(ManagerCamera managerCamera, MainForm mainForm)
 {
     _texture       = ManagerContent.LoadTexture("mouse");
     _managerCamera = managerCamera;
     _mainForm      = mainForm;
 }
Example #13
0
        public override void LoadContent(ContentManager content)
        {
            _managerMap.LoadContent();

            var player = new BaseObject {
                Id = "player"
            };

            player.AddComponent(new Sprite(ManagerContent.LoadTexture("link_full"), 16, 16, new Vector2(50, 50)));
            player.AddComponent(new PlayerInput(ManagerScreen, _managerPlayer));
            player.AddComponent(new Animation(16, 16, 2));
            player.AddComponent(new Collision(_managerMap, _entities));
            player.AddComponent(new Camera(_managerCamera));
            player.AddComponent(new Equipment(content, _managerMap, _managerCamera, _entities));
            player.GetComponent <Equipment>(ComponentType.Equipment).AddItem(new Boomerang(_entities));
            player.GetComponent <Equipment>(ComponentType.Equipment).AddItem(new Sword(_entities));
            player.GetComponent <Equipment>(ComponentType.Equipment).EquipItemInSlot(1, ItemSlot.A);
            player.GetComponent <Equipment>(ComponentType.Equipment).EquipItemInSlot(2, ItemSlot.B);
            player.AddComponent(new Damage(_entities, true));
            player.AddComponent(FactoryStats.GetStats("Link"));
            player.AddComponent(new GUI());
            player.GetComponent <GUI>(ComponentType.GUI).LoadContent(content);


            var testNPC = new BaseObject {
                Hostile = false
            };

            testNPC.AddComponent(new Sprite(ManagerContent.LoadTexture("Marin"), 16, 16, new Vector2(70, 40)));
            //testNPC.AddComponent(new AIMovementRandom(200));
            testNPC.AddComponent(new Animation(16, 16));
            testNPC.AddComponent(new Collision(_managerMap, _entities));
            testNPC.AddComponent(new Camera(_managerCamera));
            //testNPC.AddComponent(new EventTriggerDistance(new List<IGameEvent> { new GameEventMessage("Don't get any closer!")},  new List<BaseObject> { player}, 20, 3000));
            testNPC.AddComponent(new BlockPush(player));
            _entities.AddEntity(testNPC);
            _entities.AddEntity(player);
            //for (int n = 0; n < 1; n++)
            //{
            //    var testEnemy = new BaseObject { Id = string.Format("enemy_{0}", n) };
            //    testEnemy.AddComponent(new Sprite(ManagerContent.LoadTexture("Octorok"), 16, 16, new Vector2(50 + ManagerFunction.Random(10, 20), 50 + ManagerFunction.Random(10, 20))));
            //    testEnemy.AddComponent(new AIMovementRandom(1000));
            //    testEnemy.AddComponent(new Animation(16, 16, 2));
            //    testEnemy.AddComponent(new Collision(_managerMap, _entities));
            //    testEnemy.AddComponent(new Octorok(player, ManagerContent.LoadTexture("Octorok_bullet"), _managerMap, _entities));
            //    testEnemy.AddComponent(new Camera(_managerCamera));
            //    testEnemy.AddComponent(new Damage(_entities));
            //    testEnemy.AddComponent(FactoryStats.GetStats("Octorok"));
            //    testEnemy.AddComponent(new StatusEffect());
            //    _entities.AddEntity(testEnemy);
            //}



            //_entities.AddEntity(testNPC);
            //Script test!
            //var testEnemy = new BaseObject { Id = string.Format("enemy_{0}", "script") };
            //testEnemy.AddComponent(new Sprite(content.Load<Texture2D>("Octorok"), 16, 16, new Vector2(50 + ManagerFunction.Random(10, 20), 50 + ManagerFunction.Random(10, 20))));
            //testEnemy.AddComponent(new AIMovementRandom(1000, 0.5f));
            //testEnemy.AddComponent(new Animation(16, 16, 2));
            //testEnemy.AddComponent(new Collision(_managerMap,_entities));
            //testEnemy.AddComponent(new Octorok(player, content.Load<Texture2D>("Octorok_bullet"), _managerMap,_entities));
            //testEnemy.AddComponent(new Camera(_managerCamera));
            //testEnemy.AddComponent(new Damage(_entities));
            //testEnemy.AddComponent(FactoryStats.GetStats("Octorok"));
            //testEnemy.AddComponent(new Script("script_time_test"));
            //_entities.AddEntity(testEnemy);



            //Just for test
            //var window = new WindowMessage("Hello, this is a message! This is a long message",content);
            //ManagerWindow.NewWindow("test_message",window);
        }