protected override void OnEvent(Event gameEvent) { switch (gameEvent.Type) { case EventType.RightTriggerClicked: ActivateSkill(); break; case EventType.RightTriggerReleased: DeactivateSkill(); break; case EventType.CharacterChanged: _characterControllerLocked = !_characterControllerLocked; break; case EventType.CharacterDied: _characterControllerLocked = true; break; case EventType.ChangeSkill: ChangeSkill((int)gameEvent.Parameter); break; } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { if (gameEvent.Type == EventType.CharacterChanged) { _platform.Deactivate(); } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { if (gameEvent.Type == EventType.HeroPowerChanged) { SetupBar(); } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { if (gameEvent.Type == EventType.DamageByStaticObjectDone) { _canDealDamages = false; _cooldownCounter = 0; } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { switch (gameEvent.Type) { case EventType.CharacterDied: ShowDiedMenu(); break; } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { switch (gameEvent.Type) { case EventType.CharacterDied: _isPlayerDead = true; break; } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { switch (gameEvent.Type) { case EventType.CharacterChanged: _isCharacterNow = !_isCharacterNow; SetObjectToFollow(_isCharacterNow ? _charTransform : _goodSoulTransform); break; } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { if (gameEvent.Type == EventType.CharacterChanged) { _isControlled = !_isControlled; _collider2D.enabled = _isControlled; if (_isControlled == false) { BackToStartingPostion(); } else { iTween.Stop(gameObject); _animator.enabled = false; _animator.SetBool(AnimatorIsControlledBoolName, true); } } base.OnEvent(gameEvent); }
protected override void OnEvent(Event gameEvent) { if (gameEvent.Type == EventType.CharacterDied) { _characterMovementEnabled = false; } if (gameEvent.Type == EventType.CharacterChanged) { _characterMovementEnabled = !_characterMovementEnabled; } if (gameEvent.Type == EventType.ButtonClicked) { switch ((InputButton)gameEvent.Parameter) { case InputButton.Jump: Jump(); break; } } }
protected override void OnEvent(Event gameEvent) { _currentSkillIndex = (int)gameEvent.Parameter; SetupCorrectSkill(); base.OnEvent(gameEvent); }