Subversion Repositories AndroidProjects

Rev

Rev 1584 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using BauzoidNET.graphics.sprite;

namespace BurutaruEditor.view
{
    public class ViewResources
    {

        private MainForm mOwner = null;
        public MainForm Owner { get { return mOwner; } }

        public SimpleSprite SelectionFrame = null;

        public SimpleSprite Spawner = null;
        public SimpleSprite BlobEnemySprite = null;
        public SimpleSprite CoreMechEnemySprite = null;
        public SimpleSprite CoreMechXlEnemySprite = null;
        public SimpleSprite CoreTurretEnemySprite = null;
        public SimpleSprite SpaceMineEnemySprite = null;
        public SimpleSprite GarbageCollectorBossSprite = null;

        public ViewResources(MainForm owner)
        {
            mOwner = owner;

            SelectionFrame = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/ui/selection.png");

            Spawner = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/ui/spawner.png");
            BlobEnemySprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/blob_enemy.png");
            CoreMechEnemySprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/core_mech.png");
            CoreMechXlEnemySprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/core_mech_xl.png");
            CoreTurretEnemySprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/core_turret.png");
            SpaceMineEnemySprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/space_mine.png");
            GarbageCollectorBossSprite = new SimpleSprite(MainForm.App.getGraphics(), "data/textures/garbage_collector.png");
        }

        public void Init()
        {
            SelectionFrame.init();

            Spawner.init();
            BlobEnemySprite.init();
            CoreMechEnemySprite.init();
            CoreMechXlEnemySprite.init();
            CoreTurretEnemySprite.init();
            SpaceMineEnemySprite.init();
            GarbageCollectorBossSprite.init();
        }

        public void Exit()
        {
            SelectionFrame.dispose();

            Spawner.dispose();
            BlobEnemySprite.dispose();
            CoreMechEnemySprite.dispose();
            CoreMechXlEnemySprite.dispose();
            CoreTurretEnemySprite.dispose();
            SpaceMineEnemySprite.dispose();
            GarbageCollectorBossSprite.dispose();
        }
    }
}