C# Class 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
Mostra file Open project: HarkerGameDev/TheGame Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

MakeParticles() public method

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
return void

Step() public method

public Step ( float deltaTime ) : void
deltaTime float
return void

TestPoint() public method

public TestPoint ( Vector2 point ) : Polygon
point Vector2
return Polygon

World() public method

public World ( Game1 game ) : System
game Game1
return System