C# 클래스 SGDE.Physics.PhysicsBaby

General physical properties.
파일 보기 프로젝트 열기: sgdc/sgdc-old 1 사용 예제들

공개 메소드들

메소드 설명
AddBounce ( CollisionUnit unit, CollisionUnit other ) : void

Add a bounce between two CollisionUnits based on the velocity.

AddCollisionUnit ( CollisionUnit unit ) : void

Add a CollisionUnit to associate with this PhysicsBaby.

AddForce ( Vector2 force ) : void

Add a force.

AddVelocity ( Vector2 velocity ) : void

Add velocity to the PhysicsBaby's velocity.

GetForces ( ) : Vector2

Get the total, additional, forces.

GetVelocity ( ) : Vector2

Get the current total velocity.

IsStatic ( ) : bool

Get if the PhysicsBaby is static (doesn't move).

PhysicsBaby ( System.Entity owner ) : System

Instantiate a new PhysicsBaby for a specific Entity.

SetForces ( Vector2 forces ) : void

Set the total, additional, forces.

SetStatic ( bool beStatic ) : void

Set if the PhysicsBaby is static (doesn't move).

SetVelocity ( Vector2 velocity ) : void

Set the total velocity.

Update ( GameTime gameTime ) : void

Update the position and velocity of the PhysicsBaby.

메소드 상세

AddBounce() 공개 메소드

Add a bounce between two CollisionUnits based on the velocity.
public AddBounce ( CollisionUnit unit, CollisionUnit other ) : void
unit SGDE.Physics.Collision.CollisionUnit The main collision unit involved in the "bounce".
other SGDE.Physics.Collision.CollisionUnit The secondary collision unit involved in the "bounce".
리턴 void

AddCollisionUnit() 공개 메소드

Add a CollisionUnit to associate with this PhysicsBaby.
public AddCollisionUnit ( CollisionUnit unit ) : void
unit SGDE.Physics.Collision.CollisionUnit The CollisionUnit to add.
리턴 void

AddForce() 공개 메소드

Add a force.
public AddForce ( Vector2 force ) : void
force Vector2 The delta force to add.
리턴 void

AddVelocity() 공개 메소드

Add velocity to the PhysicsBaby's velocity.
public AddVelocity ( Vector2 velocity ) : void
velocity Vector2 The delta velocity to add to the current velocity.
리턴 void

GetForces() 공개 메소드

Get the total, additional, forces.
public GetForces ( ) : Vector2
리턴 Vector2

GetVelocity() 공개 메소드

Get the current total velocity.
public GetVelocity ( ) : Vector2
리턴 Vector2

IsStatic() 공개 메소드

Get if the PhysicsBaby is static (doesn't move).
public IsStatic ( ) : bool
리턴 bool

PhysicsBaby() 공개 메소드

Instantiate a new PhysicsBaby for a specific Entity.
public PhysicsBaby ( System.Entity owner ) : System
owner System.Entity The Entity that "owns" this PhysicsBaby.
리턴 System

SetForces() 공개 메소드

Set the total, additional, forces.
public SetForces ( Vector2 forces ) : void
forces Vector2 Total additional forces.
리턴 void

SetStatic() 공개 메소드

Set if the PhysicsBaby is static (doesn't move).
public SetStatic ( bool beStatic ) : void
beStatic bool true if the PhysicsBaby is static, false if otherwise.
리턴 void

SetVelocity() 공개 메소드

Set the total velocity.
public SetVelocity ( Vector2 velocity ) : void
velocity Vector2 The velocity for the PhysicsBaby.
리턴 void

Update() 공개 메소드

Update the position and velocity of the PhysicsBaby.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The current GameTime.
리턴 void