アットウィキロゴ

MenuManager

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace DesignProject
{
    class MenuManager
    {
        public Scene parentScene { get; private set; }
        public List<Menu> menu { get; private set; }
        public int menuID { get; private set; }
        public int nextMenuID { get; set; }
        public bool isActive { get; set; }
 
        public System system { get { return(this.parentScene.system);} }
 
        public MenuManager(Scene parentScene)
        {
            this.parentScene = parentScene;
            this.menu = new List<Menu>();
            this.menuID = 0;
            this.nextMenuID = 0;
        }
 
        public void Init()
        {
 
        }
 
        public void Update(){
            if (this.nextMenuID != this.menuID)
            {
                this.menu[this.menuID].isActive = false;
                this.menuID = this.nextMenuID;
                this.menu[this.menuID].isActive = true;
                this.menu[this.menuID].Init(this.menu[this.menuID]);
            }
            this.menu[this.menuID].Update(this.menu[this.menuID]);
        }
 
        public void Draw()
        {
            this.menu[this.menuID].Draw(this.menu[this.menuID]);
        }
 
 
    }
}
 

タグ:

+ タグ編集
  • タグ:
最終更新:2011年01月05日 11:32
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。