Example #1
0
 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);
 }
Example #2
0
 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);
 }
Example #3
0
 public void CmdAddScore(bool isTeam1, int score)
 {
     NetworkUISystem.GetInstance().AddScore(isTeam1, score);
 }
Example #4
0
 private void Awake()
 {
     networkHUD      = GameObject.Find("NetworkManager").GetComponent <NetworkManagerHUD>();
     networkUISystem = transform.Find("NetworkUIManager").GetComponent <NetworkUISystem>();
 }