public override void OnInspectorGUI() { base.OnInspectorGUI(); VillagerSpawner spawner = target as VillagerSpawner; if (GUILayout.Button("Add Spawn Point")) { spawner.CreateSpawnPoint(); } if (GUILayout.Button("Force Spawn")) { spawner.SpawnVillager(); } }
private void Awake() { if (vs == null) { vs = this; } else { Destroy(gameObject); } for (int i = 0; i < spawnPoints.Count; i++) { SpawnVillager(i); } }
private void Start() { villagerSpawner = VillagerSpawner.vs; }