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(); }
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(); }
private PlayerBall(Vector2 postion, int speed, Resourse.MyTexture myTexture, int val) : base(Color.White, postion, speed, myTexture, val) { }
public static void init(Vector2 postion, int speed, Resourse.MyTexture myTexture, int val) { bb = new PlayerBall(postion, speed, myTexture, val); bb.setImpact(new PlayerImpact(bb)); life = DEF_LIFE; }