C# Класс Source.Collisions.World

Holder for collisions. This will have most of the collision checking code Game1.cs should only be used to combine all the things together
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
MakeParticles ( Vector2 pos, Microsoft.Xna.Framework.Graphics.Texture2D texture, int amount, int x, int y, Color color ) : void

Step ( float deltaTime ) : void
TestPoint ( Vector2 point ) : Polygon
World ( Game1 game ) : System

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

Метод Описание
ApplyForce ( float scale, Polygon player, Vector2 position, float deltaTime ) : void
ApplyImpulse ( float scale, Player player, Vector2 position ) : void
CalculateProjectile ( Player player, float deltaTime, int projIndex ) : bool

Updates, moves, and collides all projectiles for a player

CheckObstacles ( Player player ) : void
CheckPlatforms ( Player player ) : void
randomVector ( int x, int y, Vector2 amplifier ) : Vector2

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

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

public MakeParticles ( Vector2 pos, Microsoft.Xna.Framework.Graphics.Texture2D texture, int amount, int x, int y, Color color ) : void
pos Vector2
texture Microsoft.Xna.Framework.Graphics.Texture2D
amount int
x int 0 is left and right, 1 is right, -1 is left
y int 0 is up and down, 1 is down, -1 is up
color Color
Результат void

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

public Step ( float deltaTime ) : void
deltaTime float
Результат void

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

public TestPoint ( Vector2 point ) : Polygon
point Vector2
Результат Polygon

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

public World ( Game1 game ) : System
game Game1
Результат System