示例#1
0
 public override void Update(GameTime gameTime)
 {
     if (_Background == null)
     {
         _Background = new Sprite();
         _Background.AttachTexture(Resources.Instance.Background_Black);
         _Background._Size = Game1.ScreenSize;
         _Background._Position = Game1.ScreenSize * 0.5f;
     }
 }
示例#2
0
        public override void Update(GameTime gameTime)
        {
            if (_Background == null)
            {
                _Background = new Sprite();
                _Background.AttachTexture(Resources.Instance.Background_Purple);
                _Background._Size = Game1.ScreenSize;
                _Background._Position = Game1.ScreenSize * 0.5f;
            }

            if (Input.KeyPressed(Keys.F1))
                Managers.StateManager.Instance.PushState("MENU");

            Managers.EntityManager.Instance.Update(gameTime);
        }