private void Start() { if (GameManager.MultiplayerGame == true) { MFactionMgr = GameMgr.Factions[FactionID].MFactionMgr; //Set the multiplayer faction manager } if (GameManager.PlayerFactionID == 0) { MovePosition = GameManager.Instance.Team2Zone; } else { MovePosition = GameManager.Instance.Team1Zone; } }
void Start() { GameMgr = GameManager.Instance; //get the faction manager from the unit APC if (gameObject.GetComponent <Unit> ()) { FactionMgr = GameMgr.Factions[gameObject.GetComponent <Unit> ().FactionID].FactionMgr; MFactionMgr = GameMgr.Factions[gameObject.GetComponent <Unit> ().FactionID].MFactionMgr; } //get the faction manager from the building APC. else if (gameObject.GetComponent <Building> ()) { FactionMgr = GameMgr.Factions[gameObject.GetComponent <Building> ().FactionID].FactionMgr; MFactionMgr = GameMgr.Factions[gameObject.GetComponent <Building> ().FactionID].MFactionMgr; } }
// Update is called once per frame void Update() { if (mgr == null) { mgr = MFactionManager.GetServerManager(); return; } if (TeamIndex == 0 && text.text != mgr.Team1ContestTimer.ToString()) { text.text = mgr.Team1ContestTimer.ToString("F2"); } if (TeamIndex == 1 && text.text != mgr.Team2ContestTimer.ToString()) { text.text = mgr.Team2ContestTimer.ToString("F2"); } }
// Use this for initialization void Start() { mgr = MFactionManager.GetServerManager(); }