Exemplo n.º 1
0
 public void SkillBtnPressed(Button btn)
 {
     Debug.Log("Skill " + btn.GetComponentInChildren <Text>().text + "이 눌림");
     foreach (PlayerActiveSkill skill in SkillManager.Instance.PlayerActSkills)
     {
         if (skill.Name == btn.GetComponentInChildren <Text>().text)
         {
             currentSkill = skill;
         }
     }
 }
Exemplo n.º 2
0
    public void Setting()
    {
        AllSkills.Add(Smash);   AllSkills.Add(Bash);    AllSkills.Add(Charge);  AllSkills.Add(Deffence); AllSkills.Add(Sword); AllSkills.Add(Spear);

        foreach (Skill sk in AllSkills)
        {
            if (sk is PlayerActiveSkill)
            {
                PlayerActiveSkill thisSkill = sk as PlayerActiveSkill;
                thisSkill.mono        = this;
                thisSkill.BelongToWho = Characters.Player;
                PlayerActSkills.Add(thisSkill);
            }
        }
    }
Exemplo n.º 3
0
    public void ChangeSkillKey(int where, PlayerActiveSkill skill)
    {
        for (int i = 0; i < KeyUIs.Length; i++)
        {
            if (KeyUIs[i].GetComponent <Image>().sprite == skill.SkillIcon) // KeyUIs자식에 같은 스프라이트 이미지가 있는지 확인
            {
                Debug.Log("중복");
                return;
            }
        }

        KeyUIs[where].GetComponent <Image>().sprite = skill.SkillIcon;
        KeyMap.Instance.SetKeyFunc(where, skill.SkillExecute);

        return;
    }
Exemplo n.º 4
0
 public void ChangeWeapon(int where, PlayerActiveSkill skill)
 {
     GameObject.Find("Canvas").transform.Find("UICase").Find("Weapon").
     GetComponent <Image>().sprite = skill.SkillIcon;
 }