Exemplo n.º 1
0
 protected void tryAddAbility(AbilityCommand command)
 {
     if (queueActive && abilities.Count < maxAbilities)
     {
         abilities.Add(new AbilityProgress(command));
         queueView.updateView(abilities);
     }
 }
Exemplo n.º 2
0
 private void addAbilityBtn(AbilityCommand command, Vector3 pos, string iconPath)
 {
     GameObject abilityBtn = GameObject.Instantiate(AbilityBtnObj);
     abilityBtn.transform.SetParent(transform);
     abilityBtn.transform.localScale = Vector3.one;
     abilityBtn.transform.localPosition = pos;
     abilityBtn.GetComponent<AbilityButton>().initButton(command, iconPath);
 }
Exemplo n.º 3
0
 public void initButton(AbilityCommand command, string iconPath)
 {
     icon.sprite = Resources.Load<Sprite>(iconPath);
     this.command = command;
 }
Exemplo n.º 4
0
 public AbilityProgress(AbilityCommand command)
 {
     this.command = command;
     progressInS = 0f;
 }