Class PlayerCameraMovement
This class controls the movement of the camera to follow players during the game. It also handles special behavior for the camera in the win scene.
Inheritance
object
PlayerCameraMovement
Namespace: Player
Assembly: cs.temp.dll.dll
Syntax
public class PlayerCameraMovement : MonoBehaviour
Fields
lowerBound
The lowest vertical position the camera can move to.
Declaration
public float lowerBound
Field Value
| Type | Description |
|---|---|
| float |
speed
The speed at which the camera moves toward the target position.
Declaration
public float speed
Field Value
| Type | Description |
|---|---|
| float |
staticCamera
Indicates whether the camera should remain static and not follow players.
Declaration
public bool staticCamera
Field Value
| Type | Description |
|---|---|
| bool |
weight
The weight used to blend between the camera's starting position and the players' average position.
Declaration
public float weight
Field Value
| Type | Description |
|---|---|
| float |
winScene
Indicates whether the camera is in the win scene mode.
Declaration
public bool winScene
Field Value
| Type | Description |
|---|---|
| bool |
Methods
WinScene(GameObject)
Activates the win scene mode and focuses the camera on the winning player.
Declaration
public void WinScene(GameObject player)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | player | The player who won the game. |