씬 정리

This commit is contained in:
김도환
2026-05-08 22:45:22 +09:00
parent d4cb3c5f39
commit f1213cd247
26 changed files with 120 additions and 255 deletions

View File

@@ -0,0 +1,11 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
{
public struct DamageInfo
{
public float damage;
public float knockbackForce;
public Vector3 hitPoint; // 넉백 방향 계산을 위해 필요
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d01fae1e974b477591fb12d00e8c10ba
timeCreated: 1777908924

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 64fa6e6de39c4aa418339d93d6f9c418
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4de4d4a74d5b4258863a8173560a93ab, type: 3}
m_Name: ExampleAD
m_EditorClassIdentifier: Assembly-CSharp::Unicorn.Game.Hitbox.UnicornAttackDataSO
damage: 3
knockbackForce: 15

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67ddb0901f4c7754a9e47e5cf5cac286
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
{
[CreateAssetMenu(fileName = "NewAttackData", menuName = "Unicorn/AttackData")]
public class UnicornAttackDataSO: ScriptableObject
{
public float damage;
public float knockbackForce;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4de4d4a74d5b4258863a8173560a93ab
timeCreated: 1777908942

View File

@@ -0,0 +1,22 @@
using UnityEngine;
namespace Unicorn.Game.Hitbox
{
public class UnicornHitbox : MonoBehaviour
{
public UnicornAttackDataSO attackData;
private void OnTriggerEnter2D(Collider2D other)
{
if (!other.TryGetComponent(out LivingEntity target)) return;
var info = new DamageInfo
{
damage = attackData.damage,
knockbackForce = attackData.knockbackForce,
hitPoint = transform.position
};
target.Damage(info);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: bdb9c585da578ee408fc4177ce2010e1