CounterPoint CounterPoint; // точка счетчик public Form1() { InitializeComponent(); picDisplay.Image = new Bitmap(picDisplay.Width, picDisplay.Height); emitter = new TopEmitter { Width = picDisplay.Width, GravitationY = 0.25f }; rPoint = new ColorPoint { X = picDisplay.Width / 2 - 256, // X тчк Y = picDisplay.Height / 2 - 32, // Y тчк Radius = 100, // R тчк pColor = Color.Red // Окрашивающий цвет тчк (также - цвет границ тчк) }; yPoint = new ColorPoint { X = picDisplay.Width / 2 - 128, Y = picDisplay.Height / 2 - 16, Radius = 100, pColor = Color.Yellow }; CounterPoint = new CounterPoint { X = picDisplay.Width / 2, Y = picDisplay.Height / 2, Radius = 100, pColor = Color.Blue }; gPoint = new ColorPoint { X = picDisplay.Width / 2 + 128, Y = picDisplay.Height / 2 - 16, Radius = 100, pColor = Color.Green }; mPoint = new ColorPoint { X = picDisplay.Width / 2 + 256, Y = picDisplay.Height / 2 - 32, Radius = 100, pColor = Color.Magenta }; // привязываем поля к эмиттеру emitter.impactPoints.Add(rPoint); emitter.impactPoints.Add(yPoint); emitter.impactPoints.Add(gPoint); emitter.impactPoints.Add(mPoint); emitter.impactPoints.Add(CounterPoint); }
private void picDisplay_MouseClick(object sender, MouseEventArgs e) { CounterPoint = new CounterPoint { X = e.X, Y = e.Y, Radius = 100, pColor = Color.Blue }; emitter.impactPoints.Add(CounterPoint); }