コード例 #1
0
ファイル: GameCamManager.cs プロジェクト: flo-wolf/Flip-Fall
        //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
ファイル: GameCamManager.cs プロジェクト: flo-wolf/Flip-Fall
        //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
ファイル: GameCamManager.cs プロジェクト: flo-wolf/Flip-Fall
        //Game Listener
        private void GameStateChanged(Game.GameState gameState)
        {
            Vector3 spawnPos = Vector3.zero;

            spawnPos = LevelPlacer.generatedLevel.spawn.transform.position;
            switch (gameState)
            {
            case Game.GameState.playing:

                CamZoom.ZoomToMinimum(Game.levelselectionDelay);
                break;

            case Game.GameState.deathscreen:

                CamRotation.RotateToDefault(Game.levelselectionDelay);
                //CamMove.MoveCamTo(spawnPos, Game.levelselectionDelay);
                break;

            case Game.GameState.finishscreen:
                CamRotation.RotateToDefault(Game.levelselectionDelay);
                //CamMove.MoveCamTo(spawnPos, Game.levelselectionDelay);
                break;

            //case Game.GameState.levelselection:
            //    CamMove.MoveCamTo(spawnPos);
            //    break;

            default:
                break;
            }
        }
コード例 #4
0
 private void Awake()
 {
     _instance = this;
     SetZoomStep();
 }