public override void OnInspectorGUI() { ObjectPooler pooler = (ObjectPooler)target; GUILayout.BeginHorizontal(); if (GUILayout.Button("Add")) { pooler.Add(); } if (GUILayout.Button("<--")) { pooler.Prev(); } if (GUILayout.Button("-->")) { pooler.Next(); } if (GUILayout.Button("Delete")) { pooler.Delete(); } GUILayout.EndHorizontal(); base.OnInspectorGUI(); }
void Start() { Camera = Camera.main; _skillsManager = GetComponent <SkillsManager>(); _skillsManager.Init(); ObjectPooler.Add <Projectile>(bulletPrefab, 50); StartCoroutine(ShootingSequence()); }
void Awake() { ObjectPooler.Add <Enemy>(enemyPrefab); StartCoroutine(SpawnRoutine()); }