Exemple #1
0
        /// <summary>
        /// 初始化游戏选项
        /// </summary>
        private void IniGameSelect()
        {
            //创建游戏选项类
            GameShow = new GameSelector(GameSelectWindow.Width, GameSelectWindow.Height);
            Option o1 = new GameOption("游戏开始", true);
            o1.TriggerEvent += new EventHandler(NewGame);
            Option o2 = new GameOption("读取存档", true);
            o2.TriggerEvent += new EventHandler(LoadRecord);
            Option o3 = new GameOption("游戏结束", true);
            o3.TriggerEvent += new EventHandler(CloseGame);

            GameShow.AddOption(o1);
            GameShow.AddOption(o2);
            GameShow.AddOption(o3);

            //给游戏选项窗口绑定游戏的几个选项
            GameShow.Open(null);       //初始化选项,默认选中第一项
        }
Exemple #2
0
        /// <summary>
        /// 初始化游戏选项
        /// </summary>
        private void IniGameSelect()
        {
            //创建游戏选项类
            GameShow = new GameSelector(GameSelectWindow.Width, GameSelectWindow.Height);
            Option o1 = new GameOption("游戏开始", true);

            o1.TriggerEvent += new EventHandler(NewGame);
            Option o2 = new GameOption("读取存档", true);

            o2.TriggerEvent += new EventHandler(LoadRecord);
            Option o3 = new GameOption("游戏结束", true);

            o3.TriggerEvent += new EventHandler(CloseGame);

            GameShow.AddOption(o1);
            GameShow.AddOption(o2);
            GameShow.AddOption(o3);

            //给游戏选项窗口绑定游戏的几个选项
            GameShow.Open(null);       //初始化选项,默认选中第一项
        }