Example #1
0
		public SpriteMap( int Width, int Height ) {
			mSpriteMap = new AnimatedSprite[ Width ][];

			for( int x = 0; x < Width; x++ ) {
				mSpriteMap[ x ] = new AnimatedSprite[ Height ];
				for( int y = 0; y < Height; y++ )
					mSpriteMap[ x ][ y ] = null;
			}
		}
Example #2
0
		public static bool AreColliding( AnimatedSprite a, AnimatedSprite b ) {
			Vector2 d = b.Origin - a.Origin;

			return ( d.Length() < b.CollisionRadius + a.CollisionRadius );
		}
Example #3
0
		public void SetSprite( Point2D Cell, AnimatedSprite Sprite ) {
			SetSprite( Cell.X, Cell.Y, Sprite );
		}
Example #4
0
		public void SetSprite( int x, int y, AnimatedSprite Sprite ) {
			if( IsValidPoint( x, y ) == false )
				return;

			mSpriteMap[ x ][ y ] = Sprite;
		}
Example #5
0
 public void SetSprite(Point2D Cell, AnimatedSprite Sprite)
 {
     SetSprite(Cell.X, Cell.Y, Sprite);
 }