Permalink
Browse files

Fixed copy and paste error, all sprites now draw only when inside the…

… viewport.
  • Loading branch information...
dfloer committed Nov 10, 2018
1 parent fd29742 commit 332f1b0dabd2af52d35aa7a185bfff5eb932aa79
Showing with 2 additions and 3 deletions.
  1. +2 −3 cocos2d.py
@@ -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
@@ -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

0 comments on commit 332f1b0

Please sign in to comment.