Exemple #1
0
 public Entity (Vector2 position, Dimension dimension, SpriteGroup sprites)
 {
     Position = position;
     Dimension = dimension;
     Sprites = sprites;
 }
Exemple #2
0
 public Entity(Vector2 position, Dimension dimension)
 {
     Position = position;
     Dimension = dimension;
     Sprites = new SpriteGroup(this);
 }
Exemple #3
0
 public Entity(Dimension dimension)
 {
     Position = Vector2.Zero;
     Dimension = dimension;
     Sprites = new SpriteGroup(this);
 }
Exemple #4
0
 public Entity(Vector2 position)
 {
     Position = position;
     Dimension = Dimension.Zero;
     Sprites = new SpriteGroup(this);
 }
Exemple #5
0
 public Entity ()
 {
     Position = Vector2.Zero;
     Dimension = Dimension.Zero;
     Sprites = new SpriteGroup(this);
 }
Exemple #6
0
        private bool collidesWithPerfect (SpriteGroup a, SpriteGroup b)
        {
            foreach (Sprite spriteA in a.Get())
            {
                foreach (Sprite spriteB in b.Get())
                {
                    if (PerPixelCollision(spriteA, spriteB))
                        return true;
                }
            }

            return false;
        }