private void HandlePickupWasPickedUpEvent(object obj, GameEvent gameEvent) { _pickedPickupsCount++; _pickedPickupsCountVariable.value = _pickedPickupsCount; _countersDidChangeEvent.Raise(this, _countersDidChangeEvent); gameState = GameState.KillingBoss; }
public override void OnInspectorGUI() { //base.OnInspectorGUI(); EditorGUILayout.HelpBox("This Game-Event does not pass any data", MessageType.Info, true); BasicGameEvent e = (BasicGameEvent)target; GUI.enabled = Application.isPlaying; if (GUILayout.Button("Raise")) { e.Raise(); e.DebugMessage(); } }
public void Init(int downDirection, EnemyMovementAI.MovingDirection movingDirection, int startEnergy) { _energy = startEnergy; _enemyMovementAI.Init(downDirection, movingDirection); _enemyMovementAI.enabled = true; _isDying = false; if (_energyVariable) { _energyVariable.value = _energy; } foreach (var collider in _colliders) { collider.enabled = true; } if (_wasSpawnedEvent != null) { _wasSpawnedEvent.Raise(this, _wasSpawnedEvent); } }
private void HandleDidHitRecycleTile() { _didHitRecycleTile.Raise(this, _didHitRecycleTile); this.Recycle(); }