Exemplo n.º 1
0
 public Game(Enums.VehicleType player1Vehicle, Enums.VehicleType player2Vehicle)
 {
     GameField = new byte[MapsizeX, MapsizeY];
     random = new Random(DateTime.UtcNow.GetHashCode());
     CreateMap();
     CreatePlayers(player1Vehicle, player2Vehicle);
     Bluepointer = new DrawInfo(Bitmaps.Other.Bluepointer, SpawnPointP1.x, SpawnPointP1.y - 10, 16, 16, -90);
     Redpointer = new DrawInfo(Bitmaps.Other.Redpointer, SpawnPointP2.x, SpawnPointP2.y - 10, 16, 16, -90);
     Base.drawInfos.Add(Bluepointer);
     Base.drawInfos.Add(Redpointer);
     Base.gameTasks.Add(PLayerTrackers);
 }
Exemplo n.º 2
0
 public virtual void StartWeaponDraw()
 {
     if (Base.currentGame.pitstopType == Game.PitStopType.Horizontal)
     {
         weaponDrawInfo = new DrawInfo(weapon.weaponSprite, StartPositionX, StartPositionY, weapon.weaponSizeX, weapon.weaponSizeY, 0f, 0f, drawInfo.angle);
         Base.drawInfos.Add(weaponDrawInfo);
     }
     else
     {
         weaponDrawInfo = new DrawInfo(weapon.weaponSprite, StartPositionX, StartPositionY, weapon.weaponSizeX, weapon.weaponSizeY, 90f, 0f, drawInfo.angle);
         Base.drawInfos.Add(weaponDrawInfo);
     }
 }
Exemplo n.º 3
0
 public void StartDraw()
 {
     if (Base.currentGame.pitstopType == Game.PitStopType.Horizontal)
     {
         drawInfo = new DrawInfo(bitmap, StartPositionX, StartPositionY, vehicleSizeX, vehicleSizeY, 0f, 0f, 0f);
         Base.drawInfos.Add(drawInfo);
     }
     else
     {
         drawInfo = new DrawInfo(bitmap, StartPositionX, StartPositionY, vehicleSizeX, vehicleSizeY, 90f, 0f, 0f);
         Base.drawInfos.Add(drawInfo);
     }
 }
Exemplo n.º 4
0
 public void StartDraw(int x, int y)
 {
     drawInfo = new DrawInfo(bitmap, x,y,50,50, 0f,0f,0f);
     Base.drawInfos.Add(drawInfo);
 }
Exemplo n.º 5
0
 public override void StartWeaponDraw()
 {
     weaponDrawInfo = new DrawInfo(Bitmaps.Vehicles.Transparent,0,0,16,16);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Dit is de code voor het maken van de bullet
 /// </summary>
 public Bullet(Bitmap bitmap, int x, int y, int width, int height, float _angle = 0, float RotateX = 0f, float RotateY = 0f, bool AutoRemove = false, int Frames = 0)
 {
     bulletDrawInfo = new DrawInfo(bitmap, x, y, width, height, _angle, RotateX, RotateY, AutoRemove, Frames);
     Base.drawInfos.Add(bulletDrawInfo);
 }