protected override void init() { stool.Move(new Vector3(0f, -0.03f, -1f)); ball = new Ball(ballRadius); ball.SetLimits(ballLimitLow, ballLimitHigh); ballSpeed = new Vector3(0.5f, 0.5f, 0.5f); ball.SetSpeed(ballSpeed); ball.SetLightPosition(new Vector3(0f, 0f, -1f)); ball.SetOffset(new Vector3(-0.75f, 0.75f, -1f)); for (int i = 0; i < 6; i++) { Can c = new Can(); c.RotateShape(new Vector3(1f, 0f, 0f), 90f); c.SetColor(Colors.BLUE_COLOR); switch (i) { case 0: c.Move(new Vector3(-xSeparation, 0f, canZ)); break; case 1: c.Move(new Vector3(0f, 0f, canZ)); break; case 2: c.Move(new Vector3(xSeparation, 0f, canZ)); break; case 3: c.Move(new Vector3(-xSeparation/2, ySeparation, canZ)); break; case 4: c.Move(new Vector3(xSeparation/2, ySeparation, canZ)); break; case 5: c.Move(new Vector3(0f, 2*ySeparation, canZ)); break; } c.SetSpeed(new Vector3(0f, 0f, 0f)); c.AddPaddle(ball); cans.Add(c); } SetupDepthAndCull(); updateProgram(); }