-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* link to local games * lol * wip * its late * cool * cool * cool * cool * more * almost * saving * wip * awesome * ayy lmao * nice * wip * ayo * delete * ah fuck * wip * almost * moe * fix
- Loading branch information
Showing
11 changed files
with
1,211 additions
and
95 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,9 @@ | |
"squish-1005": "npm:[email protected]", | ||
"squish-1006": "npm:[email protected]", | ||
"squish-1007": "npm:[email protected]", | ||
"squish-1008": "npm:[email protected]", | ||
"squish-1009": "npm:[email protected]", | ||
"squish-1010": "npm:[email protected]", | ||
"ws": "7.4.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const { Asset, Colors, Game, GameNode, Shapes, ShapeUtils } = require('squish-1009'); | ||
|
||
const COLORS = Colors.COLORS; | ||
|
||
class GridTest extends Game { | ||
static metadata() { | ||
return { | ||
aspectRatio: {x: 16, y: 9}, | ||
squishVersion: '1009', | ||
author: 'Joseph Garcia', | ||
thumbnail: '1e844026921f7662a62ce72da869da63' | ||
}; | ||
} | ||
|
||
constructor() { | ||
super(); | ||
|
||
this.base = new GameNode.Shape({ | ||
shapeType: Shapes.POLYGON, | ||
coordinates2d: ShapeUtils.rectangle(0, 0, 100, 100) | ||
}); | ||
} | ||
|
||
handleNewPlayer({playerId}) { | ||
const playerRoot = new GameNode.Shape({ | ||
shapeType: Shapes.POLYGON, | ||
coordinates2d: ShapeUtils.rectangle(0, 0, 0, 0) | ||
}); | ||
|
||
for (let i = 0; i < 10; i++) { | ||
for (let j = 0; j < 10; j++) { | ||
const node = new GameNode.Shape({ | ||
shapeType: Shapes.POLYGON, | ||
coordinates2d: ShapeUtils.rectangle(i * 10, j * 10, 10, 10), | ||
fill: [255, 255, 255, 255], | ||
onHover: () => { | ||
node.node.fill = [255, 0, 0, 255]; | ||
node.node.onStateChange(); | ||
}, | ||
onClick: () => { | ||
|
||
} | ||
}); | ||
playerRoot.addChild(node); | ||
} | ||
} | ||
this.base.addChild(playerRoot); | ||
} | ||
|
||
getLayers() { | ||
return [{root: this.base}]; | ||
} | ||
} | ||
|
||
module.exports = GridTest; |
Oops, something went wrong.