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 FakeEmergencies() { { EmergencyAsset ea = new EmergencyAsset(); ea.EmId = "em01"; ea.EmName = "老爸出现!"; ea.EmDesp = "老爸突然闯了进来!"; { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "装傻"; choice.Ret = "Hot"; ea.Choices.Add(choice); } { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "向观众介绍"; choice.Ret = "Hot"; ea.Choices.Add(choice); } { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "喷走"; choice.Ret = "Hot"; ea.Choices.Add(choice); } EmergencyDict["em01"] = ea; } { EmergencyAsset ea = new EmergencyAsset(); ea.EmId = "em02"; ea.EmName = "老妈出现!"; ea.EmDesp = "老妈突然闯了进来!"; { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "装傻"; choice.Ret = "Hot"; ea.Choices.Add(choice); } { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "向观众介绍"; choice.Ret = "Hot"; ea.Choices.Add(choice); } { EmergencyChoice choice = new EmergencyChoice(); choice.Content = "喷走"; choice.Ret = "Hot"; ea.Choices.Add(choice); } EmergencyDict["em02"] = ea; } }
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") { } }; }