Exemplo n.º 1
0
 private void Moving(short vector, short offset, ModelFigure _figure)
 {
     _figure.CenterPoint = new PointF((float)
                                      (_figure.CenterPoint.X + ((offset) * 85) + (SpeedFigure * (vector))),
                                      (float)((pictureBox1.Height / 4.0f) * Math.Cos(_figure.CenterPoint.X * Math.PI / 180) +
                                              (pictureBox1.Height / 2.0f)));
 }
Exemplo n.º 2
0
 // Расчет убывающих цветовых координат
 private byte colorDec(ModelFigure _figure)
 {
     try
     {
         double col = -255 * ((_figure.CenterPoint.X - (SizeSide / 2) * Math.Cos(Math.PI / 6)) /
                              (pictureBox1.Width - SizeSide * Math.Cos(Math.PI / 6))) + 255;
         return(Convert.ToByte(col));
     }
     catch
     {
         return(0);
     }
 }