diff options
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/bigblue.js | 3 | ||||
-rw-r--r-- | src/entities/borderParticles.js | 5 | ||||
-rw-r--r-- | src/entities/flag.js | 1 | ||||
-rw-r--r-- | src/entities/lava.js | 2 | ||||
-rw-r--r-- | src/entities/rock.js | 1 | ||||
-rw-r--r-- | src/entities/water.js | 1 | ||||
-rw-r--r-- | src/entities/wordFlag.js | 3 | ||||
-rw-r--r-- | src/entities/wordKill.js | 1 | ||||
-rw-r--r-- | src/entities/wordLava.js | 1 | ||||
-rw-r--r-- | src/entities/wordSink.js | 3 | ||||
-rw-r--r-- | src/entities/wordWater.js | 3 | ||||
-rw-r--r-- | src/entities/wordWin.js | 3 |
12 files changed, 19 insertions, 8 deletions
diff --git a/src/entities/bigblue.js b/src/entities/bigblue.js index bcf80d5..45fbc90 100644 --- a/src/entities/bigblue.js +++ b/src/entities/bigblue.js @@ -4,9 +4,10 @@ game.createBigBlue = () => { bigBlue.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); bigBlue.addComponent(game.components.Alive()); bigBlue.addComponent(game.components.Sprite({spriteName: "bigBlue"})); - // bigBlue.addComponent(game.components.Controllable({controls: ['left', 'right', 'up', 'down']})); bigBlue.addComponent(game.components.Name({selector: "bigblue"})); + bigBlue.addComponent(game.components.Burnable()); + bigBlue.addComponent(game.components.Sinkable()); return bigBlue; }; diff --git a/src/entities/borderParticles.js b/src/entities/borderParticles.js index 260071d..e1a7e98 100644 --- a/src/entities/borderParticles.js +++ b/src/entities/borderParticles.js @@ -1,4 +1,4 @@ -game.createBorderParticles = () => { +game.createBorderParticles = (spawnerSpec) => { const particleSpawner = game.Entity(); const spawnFunction = (particleSpec) => { switch (Math.floor(Math.random() * 4)) { @@ -24,7 +24,7 @@ game.createBorderParticles = () => { particleSpawner.addComponent(game.components.Particles({ spec: { spawnFunction, - colors: ["#16f7c9", "#0d6e5a", "#2fa18a", "#48cfb4", "#58877d", "#178054", "#2cdb92"], + colors: ["#666666", "#777777", "#888888", "#999999"], maxSpeed: 0.20, minRadius: 1, maxRadius: 3, @@ -32,6 +32,7 @@ game.createBorderParticles = () => { maxLife: 300, minAmount: 20, maxAmount: 50, + ...spawnerSpec, } })); particleSpawner.addComponent(game.components.LoadPriority({priority: 1})); diff --git a/src/entities/flag.js b/src/entities/flag.js index e13d2a2..831922f 100644 --- a/src/entities/flag.js +++ b/src/entities/flag.js @@ -4,5 +4,6 @@ game.createFlag = () => { flag.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); flag.addComponent(game.components.Alive()); flag.addComponent(game.components.Sprite({spriteName: "flag"})) + flag.addComponent(game.components.Name({selector: "flag"})); return flag; } diff --git a/src/entities/lava.js b/src/entities/lava.js index 4a88f69..e529812 100644 --- a/src/entities/lava.js +++ b/src/entities/lava.js @@ -4,6 +4,6 @@ game.createLava = () => { lava.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); lava.addComponent(game.components.Alive()); lava.addComponent(game.components.Sprite({spriteName: "lava"})) - + lava.addComponent(game.components.Name({selector: "lava"})); return lava; } diff --git a/src/entities/rock.js b/src/entities/rock.js index 6a28f6e..a87710a 100644 --- a/src/entities/rock.js +++ b/src/entities/rock.js @@ -8,6 +8,7 @@ game.createRock = () => { // rock.addComponent(game.components.Pushable()); rock.addComponent(game.components.Name({selector: "rock"})); + rock.addComponent(game.components.Sinkable()); return rock; }; diff --git a/src/entities/water.js b/src/entities/water.js index 7c160b0..11522b1 100644 --- a/src/entities/water.js +++ b/src/entities/water.js @@ -4,5 +4,6 @@ game.createWater = () => { water.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); water.addComponent(game.components.Alive()); water.addComponent(game.components.Sprite({spriteName: "water"})) + water.addComponent(game.components.Name({selector: "water"})) return water; } diff --git a/src/entities/wordFlag.js b/src/entities/wordFlag.js index bc2d782..79617ea 100644 --- a/src/entities/wordFlag.js +++ b/src/entities/wordFlag.js @@ -4,6 +4,7 @@ game.createWordFlag = () => { wordFlag.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); wordFlag.addComponent(game.components.Pushable({pushable: true})); wordFlag.addComponent(game.components.Alive()); - wordFlag.addComponent(game.components.Sprite({spriteName: "wordFlag"})) + wordFlag.addComponent(game.components.Sprite({spriteName: "wordFlag"})); + wordFlag.addComponent(game.components.Noun({select: "flag"})); return wordFlag; } diff --git a/src/entities/wordKill.js b/src/entities/wordKill.js index 8ea04d9..6906e9c 100644 --- a/src/entities/wordKill.js +++ b/src/entities/wordKill.js @@ -5,5 +5,6 @@ game.createWordKill = () => { wordKill.addComponent(game.components.Pushable({pushable: true})); wordKill.addComponent(game.components.Alive()); wordKill.addComponent(game.components.Sprite({spriteName: "wordKill"})) + wordKill.addComponent(game.components.Verb({action: "burn"})); return wordKill; } diff --git a/src/entities/wordLava.js b/src/entities/wordLava.js index bb7a005..cf31286 100644 --- a/src/entities/wordLava.js +++ b/src/entities/wordLava.js @@ -6,5 +6,6 @@ game.createWordLava = () => { wordLava.addComponent(game.components.Alive()); wordLava.addComponent(game.components.Sprite({spriteName: "wordLava"})) + wordLava.addComponent(game.components.Noun({select: "lava"})); return wordLava; } diff --git a/src/entities/wordSink.js b/src/entities/wordSink.js index decd480..369f922 100644 --- a/src/entities/wordSink.js +++ b/src/entities/wordSink.js @@ -4,6 +4,7 @@ game.createWordSink = () => { wordSink.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); wordSink.addComponent(game.components.Pushable({pushable: true})); wordSink.addComponent(game.components.Alive()); - wordSink.addComponent(game.components.Sprite({spriteName: "wordSink"})) + wordSink.addComponent(game.components.Sprite({spriteName: "wordSink"})); + wordSink.addComponent(game.components.Verb({action: "sink"})); return wordSink; } diff --git a/src/entities/wordWater.js b/src/entities/wordWater.js index c6404bf..eb0c1be 100644 --- a/src/entities/wordWater.js +++ b/src/entities/wordWater.js @@ -4,6 +4,7 @@ game.createWordWater = () => { wordWater.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); wordWater.addComponent(game.components.Pushable({pushable: true})); wordWater.addComponent(game.components.Alive()); - wordWater.addComponent(game.components.Sprite({spriteName: "wordWater"})) + wordWater.addComponent(game.components.Sprite({spriteName: "wordWater"})); + wordWater.addComponent(game.components.Noun({select: "water"})); return wordWater; } diff --git a/src/entities/wordWin.js b/src/entities/wordWin.js index ed837d0..e8948ee 100644 --- a/src/entities/wordWin.js +++ b/src/entities/wordWin.js @@ -4,6 +4,7 @@ game.createWordWin = () => { wordWin.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); wordWin.addComponent(game.components.Pushable({pushable: true})); wordWin.addComponent(game.components.Alive()); - wordWin.addComponent(game.components.Sprite({spriteName: "wordWin"})) + wordWin.addComponent(game.components.Sprite({spriteName: "wordWin"})); + wordWin.addComponent(game.components.Verb({action: "win"})); return wordWin; } |