RTS: Bug fixing, improvements

This commit is contained in:
Krzosa Karol
2023-04-20 15:52:07 +02:00
parent 6be3b60cd4
commit 7c69537283
2 changed files with 4 additions and 11 deletions

View File

@@ -168,14 +168,11 @@ main :: (): int
for i := 0, i < map.actors.len, i += 1
it := map.actors.data + i
MAP_MoveTowardsTarget(it)
MAP_PathFindUpdate(map)
if IsKeyPressed(KEY_F4)
MAP_RandomizeActors()
if IsKeyDown(KEY_SPACE)
for i := 0, i < map.actors.len, i += 1
it := map.actors.data + i
MAP_PathFindStep(it)
BeginDrawing()
ClearBackground(RAYWHITE)
@@ -199,9 +196,6 @@ main :: (): int
Add(&ANI_SetTiles, {true, {x,y}})
if colliding && IsMouseButtonDown(MOUSE_BUTTON_RIGHT)
Add(&ANI_SetTiles, {false, {x,y}})
// if Mode == 1 && colliding && IsMouseButtonPressed(MOUSE_BUTTON_LEFT) ;; MAP_ActorSetP(MAP_CurrentMap.actors.data, {x,y})
// if Mode == 1 && colliding && IsMouseButtonPressed(MOUSE_BUTTON_RIGHT) ;; MAP_CurrentMap.actors.data[0].target_p = V2I{x,y}
if colliding == true ;; color = Color{a = 100}
DrawRectangleRec(r2, color)
@@ -301,8 +295,6 @@ main :: (): int
DrawRectangleRec(MouseSelectionBox, COLOR_SelectionBox)
MAP_PathFindUpdate(map)
menu_open := false
if menu_open
text_size := 24