Esempio n. 1
0
        public Textures()
        {
            if (mainTex != null) { throw new NullReferenceException("Textures object created twice"); }

            mainTex = this;
            NullTexture = new Texture2D(DCSG.MainObject.GraphicsDevice, 1, 1);
            pointerDefault = DCSG.Contents.Load<Texture2D>("Textures\\pointer");

            LoadTextures(DCSG.textureDir, "*.png");
            SetupSprites(DCSG.textureDir);
        }
Esempio n. 2
0
        public static void Initialize()
        {
            if (_init) { return; }
            //***********************
            //Initialize Stuff here:
            Fonts.LoadFont("std_small");
            _debugger = new Debug();

            _ihObject = new Inputhandler();
            _textureHandlerObject = new Textures();
            _timeHandlerObject = new Time();
            _sounds = new Sounds();
            Fonts.LoadFont("mainfont");
            Fonts.LoadFont("std");

            _firstScreen = new Game.Aleks.Mainmenu();

            //Don't initialize stuff here:
            //***********************

            BindKeys();
            _init = true;
        }