2026-04-06 스킬시스템
This commit is contained in:
54
Assets/02_Scripts/Skill/Data/SkillData.cs
Normal file
54
Assets/02_Scripts/Skill/Data/SkillData.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
|
||||
/*
|
||||
사용법:
|
||||
Project에서 Create → Skill/SkillData로 스킬 에셋 생성, 레벨별 수치 입력
|
||||
Create → Skill/WeaponSkillSet로 무기별 스킬 묶음 생성
|
||||
플레이어에 SkillManager + Effect 컴포넌트들 부착
|
||||
무기 변경 시 LoadWeaponSkills(skillSet) 호출
|
||||
입력 시 SkillInput(slotIndex, inputState) 호출
|
||||
*/
|
||||
|
||||
[CreateAssetMenu(menuName = "Skill/SkillData")]
|
||||
public class SkillData : ScriptableObject
|
||||
{
|
||||
[Header("기본 정보")]
|
||||
public string SkillName;
|
||||
[TextArea] public string Description;
|
||||
public Sprite Icon;
|
||||
|
||||
[Header("스킬 분류")]
|
||||
public SkillType SkillType;
|
||||
public ActivationType ActivationType;
|
||||
public TargetType TargetType;
|
||||
|
||||
[Header("애니메이션")]
|
||||
public string AnimTrigger;
|
||||
|
||||
[Header("이펙트")]
|
||||
public GameObject EffectPrefab;
|
||||
|
||||
[Header("레벨별 수치")]
|
||||
public SkillLevelData[] Levels;
|
||||
|
||||
public SkillLevelData GetLevelData(int level)
|
||||
{
|
||||
int idx = Mathf.Clamp(level - 1, 0, Levels.Length - 1);
|
||||
return Levels[idx];
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class SkillLevelData
|
||||
{
|
||||
public float Damage;
|
||||
public float Range;
|
||||
public float Cooldown;
|
||||
public float ManaCost;
|
||||
public float Duration;
|
||||
public float ChargeTimeMax;
|
||||
}
|
||||
|
||||
public enum SkillType { Active, Passive }
|
||||
public enum ActivationType { Instant, Charge }
|
||||
public enum TargetType { Self, Single, Area, Projectile }
|
||||
9
Assets/02_Scripts/Skill/Data/WeaponSkillSet.cs
Normal file
9
Assets/02_Scripts/Skill/Data/WeaponSkillSet.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(menuName = "Skill/WeaponSkillSet")]
|
||||
public class WeaponSkillSet : ScriptableObject
|
||||
{
|
||||
public WeaponType WeaponType;
|
||||
public List<SkillData> Skills;
|
||||
}
|
||||
Reference in New Issue
Block a user