Spaces:
Sleeping
Sleeping
Update static/tribalStage.js
Browse files- static/tribalStage.js +3 -1
static/tribalStage.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
class TribalStage extends GameStage {
|
2 |
constructor(canvas) {
|
3 |
-
super(
|
|
|
|
|
4 |
this.creatures = [];
|
5 |
this.huts = [];
|
6 |
this.rivalTribes = [];
|
|
|
1 |
class TribalStage extends GameStage {
|
2 |
constructor(canvas) {
|
3 |
+
super(); // Call the parent constructor without canvas
|
4 |
+
this.canvas = canvas;
|
5 |
+
this.ctx = canvas.getContext('2d'); // Get the 2D context
|
6 |
this.creatures = [];
|
7 |
this.huts = [];
|
8 |
this.rivalTribes = [];
|