C# 클래스 MyGame.ChaseCamera

This class represent a Chase camera that chase a certain object around
상속: Camera
파일 보기 프로젝트 열기: mahmoudbahaa/XNA-Game-project 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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