Esempio n. 1
0
        private void SetupButton(Button button, SkillKindId skill)
        {
            button.onClick.AddListener(() => DoSelect(skill));
            var text = button.GetComponentInChildren <Text>();

            text.text = GameBalance.SkillPower[skill][_wordIdx].ToString("0.##");
        }
Esempio n. 2
0
 private void DoSelect(SkillKindId skillId)
 {
     if (_selected == skillId)
     {
         return;
     }
     OnSelect?.Invoke(_wordIdx, skillId);
     _selected = skillId;
     UpdateSelected();
 }
Esempio n. 3
0
        public void SetSkill(SkillKindId skill)
        {
            Color color;

            switch (skill)
            {
            case SkillKindId.Aoe:
                color = Color.green;
                break;

            case SkillKindId.Freeze:
                color = Color.blue;
                break;

            case SkillKindId.Heal:
                color = Color.red;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(skill), skill, null);
            }
            GetComponent <Image>().color = color;
        }
Esempio n. 4
0
 public static void SetSkill(int wordLen, SkillKindId skillId)
 {
     SkillLayout[wordLen] = skillId;
     PlayerPrefs.SetInt("word_" + wordLen, (int)skillId);
     PlayerPrefs.Save();
 }
Esempio n. 5
0
 public void Setup(int wordIdx, SkillKindId selected)
 {
     _wordIdx  = wordIdx;
     _selected = selected;
 }
Esempio n. 6
0
 private void LineOnOnSelect(int word, SkillKindId skillId)
 {
     Marks[word - 3].SetSkill(skillId);
     GameBalance.SetSkill(word, skillId);
 }