Skip to content

Commit

Permalink
Fixed copy and paste error, all sprites now draw only when inside the…
Browse files Browse the repository at this point in the history
… viewport.
  • Loading branch information
dfloer committed Nov 10, 2018
1 parent fd29742 commit 332f1b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cocos2d.py
Expand Up @@ -465,7 +465,7 @@ def draw_safe(self):
if k not in scroller.visible_hexes:
for idx in range(6):
try:
self.buildings_batch.remove(f"{k.q}_{k.r}_{k.s}_{idx}")
self.overlay_batch.remove(f"{k.q}_{k.r}_{k.s}_{idx}")
except Exception:
pass
continue
Expand Down Expand Up @@ -622,8 +622,7 @@ def draw_network(self):
if k not in scroller.visible_hexes:
for idx in range(7):
try:
self.buildings_batch.remove(f"{k.q}_{k.r}_{k.s}_{idx}")
print(f"remove{k}")
self.network_batch.remove(f"{k.q}_{k.r}_{k.s}_{idx}")
except Exception:
pass
continue
Expand Down

0 comments on commit 332f1b0

Please sign in to comment.