Esempio n. 1
0
        private void TriggerSelectByType(KeySelect item)
        {
            //将当前房间脚本接下来会执行的脚本引用写入(由按键选项决定)
            Script.OutRoom = GameMainRecycle.RoomScripts.Group[item.ToScript];
            switch (item.TheType)
            {
            case KeySelect.KeySelectType.ToStory:
                break;

            case KeySelect.KeySelectType.ToMap:
                //如果按键选项类的类型为指向地图类则如下处理
                MapRoomScript map = (MapRoomScript)Script.OutRoom;
                //切换地图重置主角初始位置(根据地图初始信息)
                if (map.Script != map.MapScripts[item.ToMapScript.Name])
                {
                    map.Script = map.MapScripts[item.ToMapScript.Name];
                    map.ReLoad();
                }
                break;

            case KeySelect.KeySelectType.ToUnit:
                UnitInfoRoom uu = (UnitInfoRoom)GameMainRecycle.RoomScripts.Group[item.ToScript];
                uu.Unit = item.Unit;

                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        public override void Runing()
        {
            if (RetureRoom == false)
            {
                SelectIndex = 999;
            }
            SetRoom();
            OutRoom = LastRoom;
            DeBugRun();
            Console.WriteLine("选项:");
            UnitInfoRoom Pinfo = (UnitInfoRoom)GameMainRecycle.RoomScripts.Group   [SelectRoom[0]];

            Pinfo.Unit  = GameMainRecycle.PlayerInfo.PlayerUnit;
            SelectIndex = PrintHelper.PrintSelectText(SelectText, SelectIndex);
            if (SelectIndex <= SelectText.Count)
            {
                OutRoom          = GameMainRecycle.RoomScripts.Group[SelectRoom[SelectIndex]];
                OutRoom.LastRoom = this;
            }
        }