Ejemplo n.º 1
0
 public void Move(roation roation, int lenght)
 {
     foreach (Block block in manager.Blocks)
     {
         block.move(roation, lenght);
     }
     foreach (SpriteOverlay spriteOverlay in Sprites)
     {
         spriteOverlay.move(roation, lenght);
     }
     foreach (SpriteOverlay spriteOverlay in entities)
     {
         spriteOverlay.move(roation, lenght);
     }
     foreach (var item in manager.Fluids)
     {
         item.move(roation, lenght);
     }
     Center.move(roation, lenght);
 }
Ejemplo n.º 2
0
        protected void SetPosition(roation roation, int lenght)
        {
            switch (roation)
            {
            case roation.Up:
                position.y += lenght;
                break;

            case roation.Left:
                position.x -= lenght;
                break;

            case roation.Right:
                position.x += lenght;
                break;

            case roation.Down:
                position.y -= lenght;
                break;
            }
        }
Ejemplo n.º 3
0
 public virtual void move(roation roation, int lenght)
 {
     SetPosition(roation, lenght);
     Engine.Draw(this);
 }