예제 #1
0
    public void OnSkillClick(object x)
    {
        if (skill != null)
        {
            skill.OffGreen();
        }
        //  DeactivateMoving = true;
        Debug.LogWarning("PSDA");
        SkillButton button = (SkillButton)x;

        button.OnGreen();
        Debug.LogWarning("PSDA1");
        //  skill1 = button;
        skill = button;
        skillBar.OnAllGreen();
        Debug.LogWarning("PSDA2");
        RightButtonSkill.OnGreen();
        LeftButtonSkill.OnGreen();
        Debug.LogWarning("PSDA3");
    }
예제 #2
0
    public void OnSetButtonClick(object x)
    {
        // Debug.Log(skill1 == null);
        // Debug.Log("Co to za noher"+skill1.Hiden);
        if (skill != null)
        {
            SkillButton button = (SkillButton)x;
            //Debug.Log("Pizdec  " + (skill == button));
            //Debug.Log(button.skill.skillType);

            if (button == RightButtonSkill)
            {
                button.Set(skill.skill, false);
                player.OnRightClickSkill = button.skill;
                player.ActiveSkill       = button.skill;
            }
            else if (button == LeftButtonSkill)
            {
                button.Set(skill.skill, false);
                player.OnLeftClickSkill = button.skill;
            }
            else
            {
                button.Set(skill.skill, false);
            }
            skillBar.OffGreen();
            RightButtonSkill.OffGreen();
            LeftButtonSkill.OffGreen();
            skill.OffGreen();
            //        skill1 = null;
            skill = null;

            Debug.Log("Da blyat");
            //    DeactivateMoving = false;

            //    skill1.OffGreen();
            //  skill1 = null;
        }
    }