C# Класс MyPolarBear.EntityHelper

Показать файл Открыть проект

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

Метод Описание
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