public void ShowEmergency(string emergencyId) { gameMode.Pause(); mUIMgr.ShowPanel("ActBranch", true, false); ActBranchCtrl actrl = mUIMgr.GetCtrl("ActBranch") as ActBranchCtrl; EmergencyAsset ea = GetEmergencyAsset(emergencyId); actrl.SetEmergency(ea); actrl.ActBranchEvent += delegate(int idx) { gameMode.Resume(); EmergencyChoice c = ea.Choices[idx]; if (c.NextEmId != null && c.NextEmId != string.Empty) { } if (c.Ret == "Hot") { if (idx == 0) { gameMode.GainScore(-10); mUIMgr.ShowHint("Get " + "-10" + " Score"); } else if (idx == 1) { gameMode.GainScore(15); mUIMgr.ShowHint("Get " + "15" + " Score"); } else { gameMode.GainScore(30); mUIMgr.ShowHint("Get " + "30" + " Score"); } } }; }
public void HandleNextEvent() { if (UnHandledEvent.Count > 0) { SpecialEvent head = UnHandledEvent.Dequeue(); pEventMgr.RemoveListener(head.EventId); foreach (string action in head.actions) { string[] cmd = action.Split(','); if (cmd[0] == "dialog") { DialogManager dm = pUIMgr.ShowPanel("DialogManager") as DialogManager; if (dm == null) { Debug.LogError("dialog mgr load fail"); } dm.StartDialog(cmd[1], delegate(string[] args) { HandleNextEvent(); }); } else if (cmd[0] == "event") { pEventMgr.AddListener(cmd[1]); } } } }
public override void Init() { pUIMgr = GameMain.GetInstance().GetModule <UIMgr> (); rm = GameMain.GetInstance().GetModule <RoleModule>(); pEventMgr = GameMain.GetInstance().GetModule <SpeEventMgr>(); mainUI = pUIMgr.ShowPanel("UIMain") as UIMainCtrl; }
public override void Init(GameModeInitData initData) { fakeZhiboMode2Skill(); mUIMgr = GameMain.GetInstance().GetModule <UIMgr>(); mResLoader = GameMain.GetInstance().GetModule <ResLoader>(); mCardMdl = GameMain.GetInstance().GetModule <CardDeckModule>(); pRoleMgr = GameMain.GetInstance().GetModule <RoleModule>(); //mSkillMdl = GameMain.GetInstance().GetModule<SkillTreeMgr>(); state = new ZhiboGameMode2State(); state.Hp = 100; state.MaxHp = 100; state.Enegy = 0; state.MaxEnegy = 100; state.EnegyPerSec = 1f; state.OriginTime = 100; state.TimeLeft = 100; state.Score = 0; state.TargetScore = 1000; state.DanmuFreq = 3f; state.savedFreq = state.DanmuFreq; state.NowSuperDanmuIdx = 0; state.ArmorTimer = 0f; spdRate = 1.0f; lastTick = 0; nextTick = 0; bigOneNext = 3; bigOneCount = 0; LoadDanmuDict(); mUICtrl = mUIMgr.ShowPanel("ZhiboPanelMode2") as ZhiboMode2UICtrl; mUICtrl.UpdateTargetScore(); InitSuperDanmu(); FightDanmuGMInitData realData = initData as FightDanmuGMInitData; if (realData != null) { SetPresetInfo(realData.SkillList); } }
public void ShowEmergency(string emergencyId) { spdRate = 0f; mUIMgr.ShowPanel("ActBranch"); ActBranchCtrl actrl = mUIMgr.GetCtrl("ActBranch") as ActBranchCtrl; EmergencyAsset ea = mEmergencyManager.GetEmergencyAsset(emergencyId); actrl.SetEmergency(ea); actrl.ActBranchEvent += delegate(int idx) { spdRate = 1f; EmergencyChoice c = ea.Choices[idx]; Debug.Log(c.Content); if (c.NextEmId != null && c.NextEmId != string.Empty) { } if (c.Ret == "Hot") { } }; }
public override void Init() { BindGameObject(); InitCameraControl(); travelUI = pUIMgr.ShowPanel("TravelPanel", false) as TravelUI; SetMap(); LoadMap(FakeMapInfo()); isMovingCamera = false; isContinueMovingCamera = false; Initialized = true; }
public override void Init(GameModeInitData initData) { pUIMgr = GameMain.GetInstance().GetModule <UIMgr> (); rm = GameMain.GetInstance().GetModule <RoleModule>(); pEventMgr = GameMain.GetInstance().GetModule <SpeEventMgr>(); mainUI = pUIMgr.ShowPanel("UIMain") as UIMainCtrl; MainGMInitData realData = initData as MainGMInitData; if (realData != null) { if (realData.isNextTurn) { NextTurn(); } } }
public override void Init() { mUIMgr = GameMain.GetInstance().GetModule <UIMgr>(); mResLoader = GameMain.GetInstance().GetModule <ResLoader>(); mCardMdl = GameMain.GetInstance().GetModule <CardDeckModule>(); pRoleMgr = GameMain.GetInstance().GetModule <RoleModule>(); state = new ZhiboGameState(); state.stats = new RoleStats(pRoleMgr.GetStats()); state.BadLevel = pRoleMgr.GetBadLevel(); state.ZhiboBuffs.Clear(); state.Cards.Clear(); state.Danmus.Clear(); mBuffManager = new ZhiboBuffManager(this); mEmergencyManager = new ZhiboEmergencyManager(this); state.TurnLeft = 12; state.TurnTimeLeft = 30f; state.Score = 0; state.MaxScore = 100; state.Qifen = 300; state.Tili = 10; spdRate = 1.0f; lastTick = 0; nextTick = 0; bigOneNext = 3; bigOneCount = 0; LoadDanmuDict(); LoadCard(); mUICtrl = mUIMgr.ShowPanel("ZhiboPanel") as ZhiboUI; //NextTurn(); NextTurnCaller(); }
public override void Init() { UImgr = GameMain.GetInstance().GetModule <UIMgr>(); UImgr.ShowPanel("HomeMenuCtrl"); }
public void FinishZhibo() { FightDanmuJiesuanUI p = mUIMgr.ShowPanel("FightDanmuJiesuanPanel", true, false) as FightDanmuJiesuanUI; spdRate = 0; }