protected int LR = 0;//鱼的左右方向 public BaseBall(Color c, Vector2 postion, int speed, Resourse.MyTexture texture, int val) { this.val = val; this.color = c; this.speed = speed; this.myTexture = texture; impactInterface = new ImpactInterface(this); roadInterface = new RoadInterface(this); updateRect(); this.postion = roadInterface.getPosition(); }
public BaseBall() { this.speed = 1; val = 1; this.myTexture = null; this.currentFrame = new Point(1, 1); impactInterface = new ImpactInterface(this); roadInterface = new RoadInterface(this); scale = ((float)this.rect.Height) / myTexture.texture.Height; this.postion = roadInterface.getPosition(); }
public void setRoad(RoadInterface road) { this.roadInterface = road; this.postion = roadInterface.getPosition(); }