// REPLACE PLACEHOLDER CODE WITH THE FOLLOWING // TODO: Implement DetectCollision // REPLACE PLACEHOLDER CODE WITH THE FOLLOWING // overload for DetectCollision(Rect, Vec2, bool[], Rect, Vec2, bool[,]) public static bool DetectCollision( IPixelPerfectSprite one, IPixelPerfectSprite two) { return DetectCollision( one.TextureRect, one.Location, one.OpaqueData, two.TextureRect, two.Location, two.OpaqueData); }
// REPLACE PLACEHOLDER CODE WITH THE FOLLOWING // TODO: Implement DetectCollision // REPLACE PLACEHOLDER CODE WITH THE FOLLOWING // overload for DetectCollision(Rect, Vec2, bool[], Rect, Vec2, bool[,]) public static bool DetectCollision( IPixelPerfectSprite one, IPixelPerfectSprite two) { return(DetectCollision( one.TextureRect, one.Location, one.OpaqueData, two.TextureRect, two.Location, two.OpaqueData)); }
// overload for GetOpaqueData(Texture2D, Rectangle, byte) public static bool[,] GetOpaqueData( IPixelPerfectSprite sprite, byte threshold) { return GetOpaqueData(sprite.TextureData, sprite.TextureRect, threshold); }
// overload for GetOpaqueData(Texture2D, Rectangle, byte) public static bool[,] GetOpaqueData(IPixelPerfectSprite sprite) { return GetOpaqueData(sprite.TextureData, sprite.TextureRect, 255); }
// overload for GetOpaqueData(Texture2D, Rectangle, byte) public static bool[,] GetOpaqueData( IPixelPerfectSprite sprite, byte threshold) { return (GetOpaqueData(sprite.TextureData, sprite.TextureRect, threshold)); }
// overload for GetOpaqueData(Texture2D, Rectangle, byte) public static bool[,] GetOpaqueData(IPixelPerfectSprite sprite) { return(GetOpaqueData(sprite.TextureData, sprite.TextureRect, 255)); }
// generic helper to draw any game sprite protected void DrawSprite( SpriteBatch batch, IPixelPerfectSprite sprite) { if (sprite.Active) { batch.Draw( sprite.TextureData, sprite.Location, sprite.TextureRect, sprite.Tint); } }