chore: initial commit

This commit is contained in:
2026-05-08 11:04:00 +08:00
commit f55d2a57c3
6278 changed files with 866081 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using BaseGames.Combat;
namespace BaseGames.Player
{
/// <summary>
/// 武器数据 SO纯数据不含 Prefab 引用)。
/// 每个攻击方向对应一个 DamageSourceSO。
/// </summary>
[CreateAssetMenu(menuName = "Player/Weapon")]
public class WeaponSO : ScriptableObject
{
public string WeaponName;
public DamageSourceSO GroundSource;
public DamageSourceSO AirSource;
public DamageSourceSO UpSource;
public DamageSourceSO DownSource;
public DamageSourceSO GetSourceByDir(AttackDirection dir) => dir switch
{
AttackDirection.Ground => GroundSource,
AttackDirection.Air => AirSource,
AttackDirection.Up => UpSource,
AttackDirection.Down => DownSource,
_ => GroundSource,
};
}
}