示例#1
0
        protected override void Initialize()
        {
            //Resource Managers
            FontMgr = new ResourceManager<SpriteFont>(this);
            TextureMgr = new ResourceManager<Texture2D>(this);
            MusicMgr = new ResourceManager<Song>(this);
            SfxMgr = new ResourceManager<SoundEffect>(this);

            LoadAssets();

            FpsHandler = new FpsCounter(this, FPS_INTERVAL);
            InputMgr = new InputManager(this);
            //FpsDisplayer = new FpsDisplay(this, "Arial14");

            Player = new Player(this, new Vector2(100.0f, 100.0f));
            Gun = new Gun(this, new Vector2(100.0f, 100.0f));
            Level = new Level(this, "testlvl");
            Camera = new Camera(this);
            Monolith = new Sprite(this, "Monolith", new Vector2(200.0f, 200.0f), 0.0f);

            Components.Add(FpsHandler);
            Components.Add(InputMgr);
            //Components.Add(FpsDisplayer);
            Components.Add(Level);
            Components.Add(Player);
            Components.Add(Gun);
            Components.Add(Camera);
            Components.Add(Monolith);

            base.Initialize();
        }
示例#2
0
        public override void Draw(GameTime gameTime)
        {
            Gun.Draw(gameTime);

            base.Draw(gameTime);
        }