using UnityEngine; using System.Collections; public enum EnemyType { enemy0, enemy1, enemy2 } public class enemy : MonoBehaviour { public EnemyType type=EnemyType.enemy0; }
这样就可以在inspector界面上去选择敌人的类型了
时间: 2024-10-28 20:19:35
using UnityEngine; using System.Collections; public enum EnemyType { enemy0, enemy1, enemy2 } public class enemy : MonoBehaviour { public EnemyType type=EnemyType.enemy0; }
这样就可以在inspector界面上去选择敌人的类型了