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; }
public void SetSkillUseEvent(int thisSkillIndex, SkillUseEvent useEvent) { Debug.Log("Set Skill Use Event"); _skillUseCallback = (targetPos) => useEvent.Invoke(thisSkillIndex, targetPos); }
protected virtual void CallSkillUseEvent(int skillIndex, Vector3 targetPos) { skillUseEvent.Invoke(skillIndex, targetPos); CreateSkillObject(_skillList[_selectedSkillNum].skillObject, targetPos); }