Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a SmoothMovingSprite at the given position with the given dimensions
 /// </summary>
 /// <param name="x">X coordinate of top-left corner</param>
 /// <param name="y">Y coordinate of top-left corner</param>
 /// <param name="width">Width in pixels</param>
 /// <param name="height">Height in pixels</param>
 public SmoothMovingSprite(int x, int y, int width, int height)
     : base(x, y, width, height)
 {
     //cameraOffset = new Point();
     smoothStart = new Vector2(this.getX(), this.getY());
     smoothEnd = new Vector2();
     smoothDuration = DEFAULT_SMOOTH_TIME;
     smoothTimer = 0.0f;
     smoothMoving = false;
     smoothType = SmoothMoveType.Linear;
 }
Ejemplo n.º 2
0
 //public void setSmoothMoveDuration(float time) {
 //    this.smoothDuration = time;
 //}
 //public float getSmoothMoveDuration() {
 //    return this.smoothDuration;
 //}
 public void setSmoothMoveType(SmoothMoveType type)
 {
     this.smoothType = type;
 }