MonsterData.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using UnityEngine;
  2. [CreateAssetMenu(fileName = "NewMonsterData", menuName = "RPG/Monster Data")]
  3. public class MonsterData : ScriptableObject
  4. {
  5. public string monsterName;
  6. public GameObject prefab;
  7. public Sprite icon;
  8. public int maxHP = 100;
  9. public int attackDamage = 10;
  10. public float attackCooldown = 2f;
  11. public enum AttackType
  12. {
  13. Melee,
  14. Ranged
  15. }
  16. [Header("Combat")]
  17. public AttackType attackType = AttackType.Melee;
  18. public float detectionRange = 5f;
  19. public float stopChaseRange = 8f;
  20. public float moveDelay = 0.5f;
  21. [Range(0f, 1f)]
  22. public float missChance = 0.1f;
  23. [Header("Groupe")]
  24. [Range(1, 7)]
  25. public int monstersPerGroup = 3; //
  26. public float exp = 10f;
  27. public float lootRate = 20f;
  28. public int GoldAmount = 80;
  29. public enum MonsterBehaviorType { Passive, Guard, Patrol, Aggressive };
  30. [Header("Comportement")]
  31. public MonsterBehaviorType behavior = MonsterBehaviorType.Passive;
  32. public enum Orientation { North, South, East, West };
  33. [Header("Placement")]
  34. public Orientation defaultOrientation = Orientation.South;
  35. [Header("Déplacement")]
  36. public float moveSpeed = 3f;
  37. // Tu peux aussi ajouter : vitesse, XP, loot, etc.
  38. }