C# Класс MyGame.ChaseCamera

This class represent a Chase camera that chase a certain object around
Наследование: Camera
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Right Vector3
Up Vector3

Открытые методы

Метод Описание
ChaseCamera ( MyGame game, Vector3 PositionOffset, Vector3 TargetOffset, Vector3 RelativeCameraRotation ) : System

Constructor that initialize the chase camera properties and set the mouse to the middle of the screen

Move ( Vector3 NewFollowTargetPosition, Vector3 NewFollowTargetRotation ) : void

Move the chase camera to follow the chased position and rotation

Rotate ( Vector3 RotationChange ) : void

Rotate the camera with the specifed rotate change vector

Update ( GameTime gameTime ) : void

Allows the component to run logic.

resetOffsets ( ) : void
setOffsetsFor1stPerson ( ) : void

Приватные методы

Метод Описание
recalculatePosition ( ) : Matrix

Описание методов

ChaseCamera() публичный Метод

Constructor that initialize the chase camera properties and set the mouse to the middle of the screen
public ChaseCamera ( MyGame game, Vector3 PositionOffset, Vector3 TargetOffset, Vector3 RelativeCameraRotation ) : System
game MyGame instance of MyGame this game component is attched to
PositionOffset Vector3 offset of the position from the chasee
TargetOffset Vector3 offset of the target from the chasee
RelativeCameraRotation Vector3 reletaive camera rotation with respect to the chasee
Результат System

Move() публичный Метод

Move the chase camera to follow the chased position and rotation
public Move ( Vector3 NewFollowTargetPosition, Vector3 NewFollowTargetRotation ) : void
NewFollowTargetPosition Vector3
NewFollowTargetRotation Vector3 the followed new target rotation
Результат void

Rotate() публичный Метод

Rotate the camera with the specifed rotate change vector
public Rotate ( Vector3 RotationChange ) : void
RotationChange Vector3 the change in the rotation
Результат void

Update() публичный Метод

Allows the component to run logic.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The gametime.
Результат void

resetOffsets() публичный Метод

public resetOffsets ( ) : void
Результат void

setOffsetsFor1stPerson() публичный Метод

public setOffsetsFor1stPerson ( ) : void
Результат void

Описание свойств

Right публичное свойство

public Vector3 Right
Результат Vector3

Up публичное свойство

public Vector3 Up
Результат Vector3