public void Conflict(Repellent ball) { Color aux; aux = this.color; this.color = ball.color; ball.color = aux; }
private void initRepellent() { for (int i = 0; i < NrRepellent; i++) { int raza = rnd.Next(1, 10); Movement move = new Movement(rnd.Next(canvas.width), rnd.Next(canvas.height), rnd.Next(10), rnd.Next(10), rnd.Next(10)); Color color = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)); Repellent ball = new Repellent(raza, move, color); balls.Add(ball); } }
public void Conflict(Repellent ball) { this.move.dx *= -1; this.move.dy *= -1; ball.color = Ball.ColorMix(ball, this); }