예제 #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="LeftSprite">Left animated sprite for this piece.</param>
 /// <param name="RightSprite">Right animated sprite for this piece.</param>
 /// <param name="UpSprite">Up animated sprite for this piece.</param>
 /// <param name="DownSprite">Down animated sprite for this piece.</param>
 /// <param name="startingSpriteDirection"></param>
 public AnimatedSpriteCollection(AnimatedSpriteExtended LeftSprite, AnimatedSpriteExtended RightSprite, AnimatedSpriteExtended UpSprite, AnimatedSpriteExtended DownSprite, Direction startingSpriteDirection)
 {
     this.leftSprite  = LeftSprite;
     this.rightSprite = RightSprite;
     this.upSprite    = UpSprite;
     this.downSprite  = DownSprite;
     if (startingSpriteDirection == Direction.down)
     {
         setDown();
     }
     if (startingSpriteDirection == Direction.left)
     {
         setLeft();
     }
     if (startingSpriteDirection == Direction.right)
     {
         setRight();
     }
     if (startingSpriteDirection == Direction.up)
     {
         setUp();
     }
 }
예제 #2
0
 public void setUp()
 {
     this.currentSprite = upSprite;
 }
예제 #3
0
 public void setDown()
 {
     this.currentSprite = downSprite;
 }
예제 #4
0
 public void setRight()
 {
     this.currentSprite = rightSprite;
 }
예제 #5
0
 /// <summary>
 /// Sets the current
 /// </summary>
 public void setLeft()
 {
     this.currentSprite = leftSprite;
 }