浏览代码

Update AgentsCoverHeatmapGFX.c

Rudy Boudewijn van Etten 5 年之前
父节点
当前提交
42fbf6a8b1
共有 1 个文件被更改,包括 12 次插入12 次删除
  1. 12 12
      ai/AgentsCoverHeatmapGFX.c

+ 12 - 12
ai/AgentsCoverHeatmapGFX.c

@@ -237,10 +237,10 @@ for (int i=0;i<MAX_AGENTS;i++){
         BeginDrawing();
         BeginDrawing();
 
 
             ClearBackground(RAYWHITE);
             ClearBackground(RAYWHITE);
+            drawmap();
             drawheatmap();
             drawheatmap();
             drawcovermap();
             drawcovermap();
-            drawcoverislands();
-            drawmap();
+            drawcoverislands();            
             drawturrets();
             drawturrets();
             drawbullets();
             drawbullets();
             //draw the path..
             //draw the path..
@@ -458,15 +458,15 @@ void updateheatmap(){
         if(arr_bullet[i].active==false)continue;
         if(arr_bullet[i].active==false)continue;
         int x=arr_bullet[i].x/tileWidth;
         int x=arr_bullet[i].x/tileWidth;
         int y=arr_bullet[i].y/tileHeight;
         int y=arr_bullet[i].y/tileHeight;
-        if(hmap[y][x]<255)hmap[y][x]+=5;        
-        if(hmap[y-1][x]<255)hmap[y-1][x]+=1.5;        
-        if(hmap[y][x+1]<255)hmap[y][x+1]+=1.5;        
-        if(hmap[y+1][x]<255)hmap[y+1][x]+=1.5;        
-        if(hmap[y][x-1]<255)hmap[y][x-1]+=1.5;        
-        if(hmap[y-2][x]<255)hmap[y-2][x]+=1.0;        
-        if(hmap[y][x+2]<255)hmap[y][x+2]+=1.0;        
-        if(hmap[y+2][x]<255)hmap[y+2][x]+=1.0;        
-        if(hmap[y][x-2]<255)hmap[y][x-2]+=1.0;        
+        if(hmap[y][x]<255)hmap[y][x]+=15;        
+        if(hmap[y-1][x]<255)hmap[y-1][x]+=5.5;        
+        if(hmap[y][x+1]<255)hmap[y][x+1]+=5.5;        
+        if(hmap[y+1][x]<255)hmap[y+1][x]+=5.5;        
+        if(hmap[y][x-1]<255)hmap[y][x-1]+=5.5;        
+        if(hmap[y-2][x]<255)hmap[y-2][x]+=2.5;        
+        if(hmap[y][x+2]<255)hmap[y][x+2]+=2.5;        
+        if(hmap[y+2][x]<255)hmap[y+2][x]+=2.5;        
+        if(hmap[y][x-2]<255)hmap[y][x-2]+=2.5;        
 
 
     }
     }
     // decrease the heat..
     // decrease the heat..
@@ -557,7 +557,7 @@ void drawcovermap(){
     for(int y=0;y<MAP_HEIGHT;y++){
     for(int y=0;y<MAP_HEIGHT;y++){
     for(int x=0;x<MAP_WIDTH;x++){
     for(int x=0;x<MAP_WIDTH;x++){
         if(cmap[y][x]==false)continue;        
         if(cmap[y][x]==false)continue;        
-        DrawRectangle(x*tileWidth,y*tileHeight,tileWidth,tileHeight,GREEN);
+        DrawRectangle(x*tileWidth,y*tileHeight,tileWidth,tileHeight,(Color){0,200,0,100});
     }
     }
     }
     }
 }
 }