Ejemplo n.º 1
0
    public virtual void UseSkillToPosition(Vector3 targetPos)
    {
        if (_selectedSkillNum == -1)
        {
            Debug.Log("Skill Not Selected");
            return;
        }

        if (_skillList[_selectedSkillNum].Use(targetPos))
        {
            // CCntl의 행동 코드
            skillUseEvent?.Invoke(_selectedSkillNum, targetPos);
            CreateSkillObject(_skillList[_selectedSkillNum].skillObject, targetPos);
        }
        SelectedSkillNum = 0;
    }
Ejemplo n.º 2
0
 public void SetSkillUseEvent(int thisSkillIndex, SkillUseEvent useEvent)
 {
     Debug.Log("Set Skill Use Event");
     _skillUseCallback = (targetPos) => useEvent.Invoke(thisSkillIndex, targetPos);
 }
Ejemplo n.º 3
0
 protected virtual void CallSkillUseEvent(int skillIndex, Vector3 targetPos)
 {
     skillUseEvent.Invoke(skillIndex, targetPos);
     CreateSkillObject(_skillList[_selectedSkillNum].skillObject, targetPos);
 }