コード例 #1
0
        public override void Update(GameTime gameTime)
        {
            if (!(finished))
            {
                this.inventory.Update(gameTime);

                this.map.Update(gameTime);

                if (this.characterStats.CurrentHP <= 0 || this.characterStats.Level >= 11)
                {
                    this.finished = true;
                    this.hasWin   = this.characterStats.Level >= 11;
                    this.panelEnd = new PanelEnd(this.game, this.hasWin);
                }
            }
            else
            {
                this.panelEnd.Update(gameTime);
            }


            if (this.finished)
            {
                this.panelEnd.Update(gameTime);
            }
        }
コード例 #2
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(Instance.gameObject);
     }
     Instance = this;
 }