예제 #1
0
	private void HandlePickupWasPickedUpEvent(object obj, GameEvent gameEvent) {

		_pickedPickupsCount++;
		_pickedPickupsCountVariable.value = _pickedPickupsCount;
		_countersDidChangeEvent.Raise(this, _countersDidChangeEvent);
		gameState = GameState.KillingBoss;
	}
예제 #2
0
    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();
        }
    }
예제 #3
0
    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);
        }
    }
예제 #4
0
 private void HandleDidHitRecycleTile()
 {
     _didHitRecycleTile.Raise(this, _didHitRecycleTile);
     this.Recycle();
 }