Пример #1
0
    //Loop to disable player prefab components
    public void Setup()
    {
        killFeed   = GameObject.Find("KillFeed").GetComponent <KillFeedUI>();
        wasEnabled = new bool[disableOnDeath.Length];
        for (int i = 0; i < wasEnabled.Length; i++)
        {
            wasEnabled[i] = disableOnDeath[i].enabled;
        }

        SetDefaults();
    }
Пример #2
0
 protected override void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Debug.Log($"KillFeedUI instance already exists, destorying {gameObject.name}");
         Destroy(this);
     }
     base.Awake();
 }