| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using UnityEngine;
- [CreateAssetMenu(fileName = "NewMonsterData", menuName = "RPG/Monster Data")]
- public class MonsterData : ScriptableObject
- {
- public string monsterName;
- public GameObject prefab;
- public Sprite icon;
- public int maxHP = 100;
- public int attackDamage = 10;
- public float attackCooldown = 2f;
- public enum AttackType
- {
- Melee,
- Ranged
- }
- [Header("Combat")]
- public AttackType attackType = AttackType.Melee;
- public float detectionRange = 5f;
- public float stopChaseRange = 8f;
- public float moveDelay = 0.5f;
- [Range(0f, 1f)]
- public float missChance = 0.1f;
- [Header("Groupe")]
- [Range(1, 7)]
- public int monstersPerGroup = 3; //
- public float exp = 10f;
- public float lootRate = 20f;
- public int GoldAmount = 80;
- public enum MonsterBehaviorType { Passive, Guard, Patrol, Aggressive };
- [Header("Comportement")]
- public MonsterBehaviorType behavior = MonsterBehaviorType.Passive;
- public enum Orientation { North, South, East, West };
- [Header("Placement")]
- public Orientation defaultOrientation = Orientation.South;
- [Header("Déplacement")]
- public float moveSpeed = 3f;
- // Tu peux aussi ajouter : vitesse, XP, loot, etc.
- }
|