Browse Source

Add files via upload

Rudy Boudewijn van Etten 4 years ago
parent
commit
86fdb23e37
2 changed files with 4 additions and 0 deletions
  1. 4 0
      ai/Tanks/tanks.c
  2. BIN
      ai/Tanks/tanks.exe

+ 4 - 0
ai/Tanks/tanks.c

@@ -293,9 +293,13 @@ void inientity(int entity,int x, int y){
 void drawentities(){
     for(int i=0;i<MAXENTITIES;i++){
         if(ent[i].active==false)continue;
+        // Draw a little shadow below the sprite.
+        DrawEllipse(ent[i].position.x-3,ent[i].position.y+3,14,14,(Color){0,0,0,100});
+        // Draw the tank
         DrawTexturePro(sprites,  (Rectangle){0,0,16,16},// the -96 (-)means mirror on x axis
                                         (Rectangle){ent[i].position.x,ent[i].position.y,32,32},
                                         (Vector2){16,16},ent[i].angle,WHITE);
+        // Draw the turret
         DrawTexturePro(sprites,  (Rectangle){16,0,16,16},// the -96 (-)means mirror on x axis
                                         (Rectangle){ent[i].position.x,ent[i].position.y,32,32},
                                         (Vector2){16,16},ent[i].angle2,WHITE);

BIN
ai/Tanks/tanks.exe