private void Add(FixedBall ball) { uint id = FixedBallId; FixedDictionary[id] = ball; FixedCreateMessage(this, new FixedCreateArgs(id, ball)); }
public void Update() { while (FixedDictionary.Count < MaxSize) { FixedBall ball = RandomBall(); Add(ball); } }
public static FixedBall RandomBall() { var width = Program.GameWidth; var height = Program.GameHeight; var ball = new FixedBall(); ball.X = RandomMaker.Next(width); ball.Y = RandomMaker.Next(height); ball.Radius = FixedBall.DefaultPlayerRadius; ball.Color = CustomColors.RandomColor; return(ball); }
public FixedCreateArgs(uint id, FixedBall ball) { BallId = id; Ball = ball; }