C# 클래스 MyPolarBear.EntityHelper

파일 보기 프로젝트 열기: sgdc/sgdc-old

공개 메소드들

메소드 설명
AngleBetween ( Vector2 firstVector, Vector2 secondVector ) : float
CollisionBoxFromTexture ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float scale ) : Rectangle
DistanceBetween ( Vector2 firstVector, Vector2 secondVector ) : float
LevelBounce ( Rectangle EntityCollisionBox, Rectangle LevelCollisionBox, float Bounciness ) : Vector2
MoveBackOnScreen ( Rectangle EntityCollisionBox, Rectangle ScreenCollisionBox ) : Vector2
OriginFromTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Vector2

Returns a vector at the center of the given texture.

UpdateCollisionBox ( Rectangle collisionBox, Vector2 position, Vector2 origin, float scale ) : Rectangle
WallBounce ( Rectangle EntityCollisionBox, Rectangle WallCollisionBox, float Bounciness ) : Vector2

메소드 상세

AngleBetween() 공개 정적인 메소드

public static AngleBetween ( Vector2 firstVector, Vector2 secondVector ) : float
firstVector Vector2
secondVector Vector2
리턴 float

CollisionBoxFromTexture() 공개 정적인 메소드

public static CollisionBoxFromTexture ( Vector2 position, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 origin, float scale ) : Rectangle
position Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
origin Vector2
scale float
리턴 Microsoft.Xna.Framework.Rectangle

DistanceBetween() 공개 정적인 메소드

public static DistanceBetween ( Vector2 firstVector, Vector2 secondVector ) : float
firstVector Vector2
secondVector Vector2
리턴 float

LevelBounce() 공개 정적인 메소드

public static LevelBounce ( Rectangle EntityCollisionBox, Rectangle LevelCollisionBox, float Bounciness ) : Vector2
EntityCollisionBox Microsoft.Xna.Framework.Rectangle
LevelCollisionBox Microsoft.Xna.Framework.Rectangle
Bounciness float
리턴 Vector2

MoveBackOnScreen() 공개 정적인 메소드

public static MoveBackOnScreen ( Rectangle EntityCollisionBox, Rectangle ScreenCollisionBox ) : Vector2
EntityCollisionBox Microsoft.Xna.Framework.Rectangle
ScreenCollisionBox Microsoft.Xna.Framework.Rectangle
리턴 Vector2

OriginFromTexture() 공개 정적인 메소드

Returns a vector at the center of the given texture.
public static OriginFromTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D The texture to find the origin of.
리턴 Vector2

UpdateCollisionBox() 공개 정적인 메소드

public static UpdateCollisionBox ( Rectangle collisionBox, Vector2 position, Vector2 origin, float scale ) : Rectangle
collisionBox Microsoft.Xna.Framework.Rectangle
position Vector2
origin Vector2
scale float
리턴 Microsoft.Xna.Framework.Rectangle

WallBounce() 공개 정적인 메소드

public static WallBounce ( Rectangle EntityCollisionBox, Rectangle WallCollisionBox, float Bounciness ) : Vector2
EntityCollisionBox Microsoft.Xna.Framework.Rectangle
WallCollisionBox Microsoft.Xna.Framework.Rectangle
Bounciness float
리턴 Vector2