/// <summary> /// 战前NPC对话 /// </summary> private void DoStartTalks(List <CounterPartDialogUnit> ltalk) { if (ltalk.Count == 0) { return; } MyHead.btnCombat.enabled = false; List <int> lNpcID = new List <int>(); List <string> lStrTalks = new List <string>(); List <NpcDirection> lWndDirs = new List <NpcDirection>(); foreach (CounterPartDialogUnit t in ltalk) { lNpcID.Add(t.npcid); lStrTalks.Add(t.talk); lWndDirs.Add((NpcDirection)t.position); } NpcTalksWnd wnd = WndManager.GetDialog <NpcTalksWnd>(); wnd.SetData(lNpcID, lStrTalks, lWndDirs); ViewStageScene scene = SceneM.GetCurIScene() as ViewStageScene; if (scene != null && scene.GoldTransform != null) { Transform tGoldRoom = scene.GoldTransform; LifeObj obj = tGoldRoom.GetComponent <LifeObj>(); if (obj != null) { Vector3 pos = obj.GetLife().GetLifeProp().HelpPoint.GetVauleByKey(BuildHelpPointName.guidePos).transform.position; wnd.SetWndStyle(2, pos); } } }
public bool ShowCaptionUpWnd() { CombatScene combat = SceneM.GetCurIScene() as CombatScene; if (combat != null) { UserInfo old = combat.m_oldUserInfo; if (old.Level < UserDC.GetLevel()) { CaptionUpgradeWnd cuw = WndManager.GetDialog <CaptionUpgradeWnd>(); int oldMaxPhysical = UserM.GetMaxPhysical(old.Level); int newMaxPhysical = UserM.GetMaxPhysical(UserDC.GetLevel()); int oldMaxherolevel = UserM.GetUserMaxHeroLevel(old.Level); int newMaxherolevel = UserM.GetUserMaxHeroLevel(UserDC.GetLevel()); cuw.SetData(old.Level, UserDC.GetLevel(), StageDC.GetStageResult().win ? old.Physical - StageDC.GetCounterPartInfo().win_physical : old.Physical - StageDC.GetCounterPartInfo().lose_physical, UserDC.GetPhysical(), oldMaxPhysical, newMaxPhysical, oldMaxherolevel, newMaxherolevel); cuw.MyHead.BtnBg.OnClickEventHandler += BackMainScence; cuw.MyHead.BtnClose.OnClickEventHandler += BackMainScence; return(true); } } return(false); }
void OnMouseUp() { IScene scene = SceneM.GetCurIScene(); if (null != scene) { scene.OnMouseUp(this); } }
public virtual void Start() { m_ISceneOwer = SceneM.GetCurIScene(); if (SceneM.IsLoading) { m_ISceneOwer = SceneM.GetLoadingIScene(); } if (null != m_ISceneOwer) { m_ISceneOwer.AddSceneObj(this); } }
//public GameObject m_body; // Use this for initialization public virtual void Start() { gameObject.SetActive(bAutoActive); m_ISceneOwer = SceneM.GetCurIScene(); if (SceneM.IsLoading) { m_ISceneOwer = SceneM.GetLoadingIScene(); } if (null != m_ISceneOwer) { m_ISceneOwer.AddSceneObj(this); } }
public static void SetCSState(CSState state) { m_State = state; if (m_State == CSState.Ready) { CombatReady(); SetCSState(CSState.Start); } else if (m_State == CSState.Start) { m_CombatTime = CombatMaxTime * 1.0f; } else if (m_State == CSState.Combat) { //m_pause = false; } else if (m_State == CSState.End) { m_CombatTime = 0; (SceneM.GetCurIScene() as CombatScene).DoCombatFinish(); } }