public void Update() { if (Input.GetKeyDown(KeyCode.Space)) { // Pool.Get<TestPoolObject>(); prefab.Get <TestPoolObject>(true); /*PooledMonobehaviour obj = pool.Get<TestPoolObject>() ; * obj.gameObject.SetActive(true);*/ } if (Input.GetKeyDown(KeyCode.A)) { //prefabz.Get<SecondPoolObject>(); if (currentWeapon != null) { currentWeapon.Use(); } } if (Input.GetKeyDown(KeyCode.C)) { OnXPGained gained = new OnXPGained(150); gained.FireEvent(); } if (Input.GetKeyDown(KeyCode.B)) { TestEnemyDeathEvent ted = new TestEnemyDeathEvent(); ted.FireEvent(); } }
private void OnDisable() { TestEnemyDeathEvent.UnregisterListener(EnemyDeathAchievement); }
private void EnemyDeathAchievement(TestEnemyDeathEvent test) { achievements.AddProgress("deaths", 1); }
public void OnEnable() { TestEnemyDeathEvent.RegisterListener(EnemyDeathAchievement); }