Exemple #1
0
    void Start()
    {
        for (int i = 0; i < runes.Count; i++)
        {
            if (runes[i] != null)
            {
                runes[i].init(this.gameObject);
                runes[i].InitInternalIndices();
            }
            else
            {
                runes.RemoveAt(i);
                break;
            }
        }

        // ReSharper disable once AssignmentInConditionalExpression
        if (null == (_runeBarUiController = GameObject.FindWithTag("RuneBarUi").GetComponent <RuneBarUiController>()))
        {
            Debug.LogError("RuneHolder.cs: Cannot Find RuneBarUiController");
        }

        // CanCast = new bool[runes.Count];
        // cds     = new float[runes.Count];

        CanCast = new List <bool>(runes.Count);
        cds     = new List <float>(runes.Count);

        for (int i = 0; i < runes.Count; i++)
        {
            CanCast.Add(true);
            cds.Add(0f);
        }
    }
Exemple #2
0
 public virtual void OnGui(RuneBarUiController ui, int i)
 {
     ui.OnCd(i, Cd, OnCdHudImage);
 }