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 override void Init() { pCardMdl = GameMain.GetInstance().GetModule <CardDeckModule>(); pUIMgr = GameMain.GetInstance().GetModule <UIMgr>(); pRoleMgr = GameMain.GetInstance().GetModule <RoleModule>(); pWeiboMgr = GameMain.GetInstance().GetModule <WeiboModule>(); pMainUI = (UIMainCtrl)pUIMgr.GetCtrl("UIMain") as UIMainCtrl; }
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") { } }; }