public void DisplayPowerLevel() { //暂时获取这个 GameObject targetText = m_SceneRoot.GetSceneMember((int)SceneBattleMembers.Player1ForceNum); targetText.GetComponent <Text>().text = m_PowerLevel.ToString(); }
private float m_PreparingTimeMark = 0;//用于记录按了多长时间的 public CDogController(CSceneRoot root) { m_SceneRoot = root; m_Dog[0] = m_SceneRoot.GetSceneMember((int)SceneBattleMembers.Player1); m_Dog[1] = m_SceneRoot.GetSceneMember((int)SceneBattleMembers.Player2); m_Dog[2] = m_SceneRoot.GetSceneMember((int)SceneBattleMembers.Player3); m_Dog[3] = m_SceneRoot.GetSceneMember((int)SceneBattleMembers.Player4); m_Dog[0].GetComponent <CDogObjectScript>().m_dogController = this; m_Dog[1].GetComponent <CDogObjectScript>().m_dogController = this; m_Dog[2].GetComponent <CDogObjectScript>().m_dogController = this; m_Dog[3].GetComponent <CDogObjectScript>().m_dogController = this; m_Dog[0].GetComponent <CDogObjectScript>().DogNum = 0; m_Dog[1].GetComponent <CDogObjectScript>().DogNum = 1; m_Dog[2].GetComponent <CDogObjectScript>().DogNum = 2; m_Dog[3].GetComponent <CDogObjectScript>().DogNum = 3; for (int i = CPlayerSettings.PlayerNumber; i < CPlayerSettings.PlayerNumberMax; i++) { m_Dog[i].SetActive(false); } }