Add Peter & Bianca
authorMegaBrutal <code+git@megabrutal.com>
Thu, 20 Sep 2018 20:35:00 +0000 (22:35 +0200)
committerMegaBrutal <code+git@megabrutal.com>
Thu, 20 Sep 2018 20:35:00 +0000 (22:35 +0200)
modified:   tilemap.json
modified:   tilemap.tmx
modified:   wgj58.js

tilemap.json
tilemap.tmx
wgj58.js

index cb46082..820e279 100644 (file)
                  "width":64,
                  "x":2336,
                  "y":1408
+                }, 
+                {
+                 "gid":51,
+                 "height":64,
+                 "id":33,
+                 "name":"peter",
+                 "rotation":0,
+                 "type":"spawnpoint",
+                 "visible":true,
+                 "width":64,
+                 "x":1472,
+                 "y":508
+                }, 
+                {
+                 "gid":51,
+                 "height":64,
+                 "id":34,
+                 "name":"bianca",
+                 "rotation":0,
+                 "type":"spawnpoint",
+                 "visible":true,
+                 "width":64,
+                 "x":1505.33333333333,
+                 "y":1909.33333333333
                 }],
          "opacity":1,
          "type":"objectgroup",
          "x":0,
          "y":0
         }],
- "nextobjectid":33,
+ "nextobjectid":35,
  "orientation":"orthogonal",
  "renderorder":"right-down",
  "tiledversion":"1.1.6",
index e509701..85c7dcc 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<map version="1.0" tiledversion="1.1.6" orientation="orthogonal" renderorder="right-down" width="45" height="40" tilewidth="64" tileheight="64" infinite="0" nextobjectid="33">
+<map version="1.0" tiledversion="1.1.6" orientation="orthogonal" renderorder="right-down" width="45" height="40" tilewidth="64" tileheight="64" infinite="0" nextobjectid="35">
  <tileset firstgid="1" name="tileset" tilewidth="64" tileheight="64" tilecount="50" columns="10">
   <image source="tileset.png" width="640" height="320"/>
  </tileset>
    </properties>
   </object>
   <object id="32" name="saiki" type="spawnpoint" gid="51" x="2336" y="1408" width="64" height="64"/>
+  <object id="33" name="peter" type="spawnpoint" gid="51" x="1472" y="508" width="64" height="64"/>
+  <object id="34" name="bianca" type="spawnpoint" gid="51" x="1505.33" y="1909.33" width="64" height="64"/>
  </objectgroup>
 </map>
index 9405c5a..b0ed447 100644 (file)
--- a/wgj58.js
+++ b/wgj58.js
@@ -526,6 +526,12 @@ class NPC_Saiki extends GameNPC {
        }
 }
 
+class NPC_Peter extends GameNPC {
+}
+
+class NPC_Bianca extends GameNPC {
+}
+
 
 class GameInterface extends Phaser.Group {
        constructor(game, parent) {
@@ -744,6 +750,14 @@ class GameLogic {
                                newChar = new NPC_Saiki(object.x, object.y, 'saiki', "Saiki", "Saiki Ytpme", 150);
                                this.saiki = newChar;
                                break;
+                       case 'peter':
+                               newChar = new NPC_Peter(object.x, object.y, 'peter', "Peter", "Peter Tluaf", 225);
+                               this.peter = newChar;
+                               break;
+                       case 'bianca':
+                               newChar = new NPC_Bianca(object.x, object.y, 'bianca', "Bianca", "Bianca Gnihton", 150);
+                               this.bianca = newChar;
+                               break;
                        default:
                                console.error("Unknown character:", object);
                }
@@ -838,6 +852,8 @@ class GamePlay extends Phaser.State {
                game.load.image('clara', 'clara.png');
                game.load.image('carlos', 'carlos.png');
                game.load.image('saiki', 'saiki.png');
+               game.load.image('peter', 'peter.png');
+               game.load.image('bianca', 'bianca.png');
                game.load.image('tileset', 'tileset.png');
                game.load.image('objects', 'objects.png');
                game.load.tilemap('gamemap', 'tilemap.json', null, Phaser.Tilemap.TILED_JSON);