public static NetworkUISystem GetInstance() { if (!instance) { instance = GameObject.FindGameObjectWithTag("NetworkUIManager").GetComponent <NetworkUISystem>(); if (!instance) { Debug.LogError("There needs to be one active MyClass script on a GameObject in your scene."); } } return(instance); }
public void Spawn() { if (NetworkUISystem.GetInstance().UM.State != UIManager.UIState.INGAME) { return; } transform.Find("Model").gameObject.SetActive(true); transform.Find("HPFrame").gameObject.SetActive(true); attackAble = true; CmdMoveTo(GameObject.FindGameObjectWithTag("Spawn" + (((PlayerId + 1) % 2) + 1)).transform.position); hitable = false; Invoke("SetHittable", 2f); }
public void CmdAddScore(bool isTeam1, int score) { NetworkUISystem.GetInstance().AddScore(isTeam1, score); }
private void Awake() { networkHUD = GameObject.Find("NetworkManager").GetComponent <NetworkManagerHUD>(); networkUISystem = transform.Find("NetworkUIManager").GetComponent <NetworkUISystem>(); }