2026-05-15 공격과 피격
This commit is contained in:
17
Assets/02_Scripts/Combat/AttackData.cs
Normal file
17
Assets/02_Scripts/Combat/AttackData.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "AttackData", menuName = "Combat/AttackData")]
|
||||
public class AttackData : ScriptableObject
|
||||
{
|
||||
public string AttackName;
|
||||
public string AnimationState;
|
||||
public Vector2 Offset = new Vector2(0.5f, 0f);
|
||||
public float Radius = 0.5f;
|
||||
public int Damage = 10;
|
||||
public float Cooldown = 0.3f;
|
||||
|
||||
[Header("Timing")]
|
||||
public float HitTiming = 0.15f;
|
||||
public float HitDuration = 0f;
|
||||
public float MotionDuration = 0.3f;
|
||||
}
|
||||
2
Assets/02_Scripts/Combat/AttackData.cs.meta
Normal file
2
Assets/02_Scripts/Combat/AttackData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 526ebe3dc7ff32e4faa2cfcdc1670638
|
||||
26
Assets/02_Scripts/Combat/ComboNode.cs
Normal file
26
Assets/02_Scripts/Combat/ComboNode.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public enum ComboInputType
|
||||
{
|
||||
Punch,
|
||||
Kick
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ComboTransition
|
||||
{
|
||||
public ComboInputType Trigger;
|
||||
public ComboNode Next;
|
||||
public float ForwardStep = 0f;
|
||||
public float ForwardStepDuration = 0.1f;
|
||||
}
|
||||
|
||||
[CreateAssetMenu(fileName = "ComboNode", menuName = "Combat/ComboNode")]
|
||||
public class ComboNode : ScriptableObject
|
||||
{
|
||||
public string NodeName;
|
||||
public AttackData Attack;
|
||||
public float ComboWindow = 0.8f;
|
||||
public ComboTransition[] Transitions;
|
||||
}
|
||||
2
Assets/02_Scripts/Combat/ComboNode.cs.meta
Normal file
2
Assets/02_Scripts/Combat/ComboNode.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4d02e4d65b341140b34a24e39798ff6
|
||||
4
Assets/02_Scripts/Combat/IDamageable.cs
Normal file
4
Assets/02_Scripts/Combat/IDamageable.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
public interface IDamageable
|
||||
{
|
||||
void TakeDamage(int amount);
|
||||
}
|
||||
2
Assets/02_Scripts/Combat/IDamageable.cs.meta
Normal file
2
Assets/02_Scripts/Combat/IDamageable.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48f6e522039b1f44f8cce75191bcefec
|
||||
Reference in New Issue
Block a user