示例#1
0
        //Player Listener
        private void PlayerAction(Player.PlayerAction playerAction)
        {
            switch (playerAction)
            {
            case Player.PlayerAction.reflect:
                if (player.rBody.velocity.x != 0)
                {
                    CamRotation.ReflectRotationSwitch(player, reflectRotationSwitchDuration);
                }
                break;

            case Player.PlayerAction.charge:
                CamZoom.ZoomToVelocity(player, defaultTransitionDuration);
                CamRotation.RotateToVelocity(player, defaultTransitionDuration);
                break;

            case Player.PlayerAction.decharge:
                CamRotation.RotateToVelocity(player, defaultTransitionDuration);
                break;

            case Player.PlayerAction.teleport:
                CamMove.StopFollowing();
                CamMove.MoveCamTo(Player.destinationPortal.transform.position, player.teleportDuration);
                break;

            default:
                break;
            }
        }
示例#2
0
        //Player Listener
        private void PlayerStateChanged(Player.PlayerState playerState)
        {
            switch (playerState)
            {
            case Player.PlayerState.alive:

                CamMove.StartFollowing();
                CamZoom.ZoomToVelocity(player, defaultTransitionDuration);
                //CamShake.VelocityShake(player);
                CamRotation.VelocityRotation(player);     // currently deactivated in CamRotation
                break;

            case Player.PlayerState.dead:
                CamZoom.DeathZoom(Game.deathDelay);
                CamShake.DeathShake();
                CamRotation.RotateToDefault(Game.deathDelay);
                //CamRotation.DeathRotation(); //change to camshake
                //CamMove.StopFollowing();
                break;

            case Player.PlayerState.win:
                CamZoom.WinZoom(Game.deathDelay);
                CamRotation.RotateToDefault(Game.deathDelay);
                //CamRotation.DeathRotation(); //change to camshake
                //CamMove.StopFollowing();
                break;

            default:
                break;
            }
        }
示例#3
0
 private void Awake()
 {
     _instance = this;
 }