Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //if the static AbilityPanelManager instance is not null and isn't this object, destroy itself
        if (instance != null && instance != this)
        {
            Destroy(this);
            return;
        }

        //set the static instance
        instance = this;

        //create the array of panes
        panes = new AbilityPane[AbilityList.MAX_SIZE];

        //index of the pane in the actual game scene
        int paneNum;

        //initialize array of panes
        for (int i = 0; i < AbilityList.MAX_SIZE; ++i)
        {
            paneNum  = i + 1;
            panes[i] = GameObject.Find("Ability " + paneNum + " Pane").GetComponent <AbilityPane>();
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// Set the ability panes for the currently selected object
 /// </summary>
 /// <param name="list">The list of abilities associated with the object</param>
 public void SetAbilityPanes(AbilityList list)
 {
     AbilityPanelManager.GetInstance().SetPanes(list);
 }
Exemplo n.º 3
0
 void Awake()
 {
     instance = this;
 }