private void OnPowerUpHit(Vector3 location, PowerUpPiece.Ability ability) { Debug.LogFormat("Piece of type collected: {0}", ability); if (ability == PowerUpPiece.Ability.DoubleJump) { m_DoubleJumpCount++; if (m_DoubleJumpCount == 4) { unlockDoubleJump = true; Debug.LogFormat("You can now double jump"); PowerUpEvent?.Invoke(location, ability); } } else if (ability == PowerUpPiece.Ability.Dash) { m_DashCount++; if (m_DashCount == 4) { unlockDash = true; Debug.LogFormat("You can now dash"); PowerUpEvent?.Invoke(location, ability); } } else if (ability == PowerUpPiece.Ability.Shooting) { m_ShootingCount++; if (m_ShootingCount == 4) { unlockShooting = true; Debug.LogFormat("You can now shoot"); PowerUpEvent?.Invoke(location, ability); } } }
private void OnPlayerPowerUp(Vector3 _, PowerUpPiece.Ability ability) { Sprite sprite = null; if (ability == PowerUpPiece.Ability.DoubleJump) { sprite = settings.doubleJumpImage; } else if (ability == PowerUpPiece.Ability.Dash) { sprite = settings.dashJumpImage; } else if (ability == PowerUpPiece.Ability.Shooting) { sprite = settings.shootJumpImage; } if (sprite != null) { image.enabled = true; image.sprite = sprite; StartCoroutine(RemoveImage()); } }
private void OnPowerUp(Vector3 _, PowerUpPiece.Ability __) { }
private void UpdateCheckPoint(Vector3 location, PowerUpPiece.Ability __) { m_LastSpawnLocation = location; }
private void OnPlayerPowerUp(Vector3 _, PowerUpPiece.Ability __) { PlayAudio(settings.playerPowerUp, true); }