public ClockBox(GameEngine gameEngine, RoadBox road)
 {
     GameEngine = gameEngine;
     Road       = road;
     road.ClockElement.Location = road.RandomLocation((int)StaticValues.clockPosition);
     road.DrawRoundedControl(road.ClockElement);
 }
Exemple #2
0
 public CoinBox(GameEngine gameEngine, RoadBox road)
 {
     GameEngine = gameEngine;
     Road       = road;
     road.CoinControl.Location = road.RandomLocation((int)StaticValues.coinPosition);
     road.DrawRoundedControl(road.CoinControl);
 }
Exemple #3
0
 public EnemyCarBox(FrmGame gameForm, GameEngine gameEngine, RoadBox road, PictureBox[] enemies)
 {
     GameForm   = gameForm;
     GameEngine = gameEngine;
     Road       = road;
     Enemies    = enemies;
     movement   = new int[Enemies.Length];
     for (int i = 0; i < road.EnemyCars.Length; i++)
     {
         Enemies[i].Location = road.RandomLocation(Road.random.Next((int)StaticValues.enemyMinLocationY, (int)StaticValues.enemyMaxLocationY));
         movement[i]         = Road.random.Next((int)StaticValues.movementLeft, (int)StaticValues.movementRight);
     }
 }
 public GameEngine(FrmGame gameForm, FrmMenu menuForm)
 {
     FormGame   = gameForm;
     MenuForm   = menuForm;
     Road       = new RoadBox(FormGame, this);
     Grass      = new GreenBox(FormGame, Road.random);
     SceneTimer = gameForm.tmrSceneTimer;
     GameTimer  = gameForm.tmrGameTimer;
     FinishGame = gameForm.tmrFinishGame;
     SpeedGame  = 5;
     SpeedMax   = 10;
     SpeedMin   = 1;
     Crash      = 0;
 }
Exemple #5
0
 public CarBox(FrmGame game, GameEngine gameEngine, RoadBox road)
 {
     Car        = game.pcbCar;
     GameEngine = gameEngine;
     Road       = road;
 }
 public MiniCarBox(FrmGame gameForm, RoadBox road)
 {
     MiniCarAuto    = gameForm.pcbMiniCar;
     MiniFinishLine = gameForm.pcbMiniFinishLine;
     Road           = road;
 }