public override void Update(BaseGame game) { if (cooldown > 0) { cooldown = cooldown - 1; return; } for (int i = 0; i < game.Touches.Count; i++) { //for (int j = 0; j < possibleSpeeds.Length; j++) game.Objects.Add(new Block(game) { Position = game.Touches[i].ToPoint(), //Speed = new Point(initialSpeed, initialSpeed), Color = Colors[i] }); } ; cooldown = 0; }
public override void Update(BaseGame game) { Duration = Duration - 1; if (Duration == 0) //if (Speed.X == 0 && Speed.Y == 0) { game.Objects.Remove(this); return; } //Speed.X = (int)MathHelper.Lerp(Speed.X, 0f, 0.0000001f); //Speed.Y = (int)MathHelper.Lerp(Speed.Y, 0f, 0.0000001f); //Position.X = Position.X + Speed.X; //Position.Y = Position.Y + Speed.Y; texture.Target.X = Position.X; texture.Target.Y = Position.Y; //texture.Target.Width = // texture.Target.Height = 250 + Math.Abs(Speed.X) + Math.Abs(Speed.Y); texture.Color = Color; game.Renderers.Add(texture); }
public override void Update(BaseGame game) { texture.Target.X = Position.X; texture.Target.Y = Position.Y; game.Drawables.Add(texture); }
public abstract void Update(BaseGame game);