first commit

This commit is contained in:
2026-06-04 23:22:13 +03:00
commit d329f501be
310 changed files with 36395 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using UnityEngine;
namespace OTGIntegrated.Weapons
{
[CreateAssetMenu(fileName = "WeaponData", menuName = "OTG Integrated/Weapon Data")]
public sealed class WeaponData : ScriptableObject
{
public string weaponId;
public string displayName;
public float damage = 10f;
public float attackRate = 0.8f;
public float range = 2.2f;
public bool isRanged;
public float manaCost;
[TextArea(2, 5)] public string description;
private void OnValidate()
{
if (string.IsNullOrWhiteSpace(weaponId))
{
weaponId = name;
}
if (string.IsNullOrWhiteSpace(displayName))
{
displayName = weaponId;
}
damage = Mathf.Max(0f, damage);
attackRate = Mathf.Max(0.05f, attackRate);
range = Mathf.Max(0.2f, range);
manaCost = Mathf.Max(0f, manaCost);
}
}
}