6666666ppppp master READ ONLY 0
  • explorer
  • search
a [App]
a CG.6666666ppppp
a README.md
a app.ts
a [Test]
a test
  • README.md

sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}sprite: SpritesheetMovieClip;

speed: number = 0.1;

constructor() {
    this.sprite = CG.Base.resourceManager.createSpritesheetMovieClip('zombieGame.person');
    this.sprite.pivot.set(this.sprite.width / 2, this.sprite.height / 2);
    this.sprite.position.set(CG.Base.pixi.stageWidth / 2, CG.Base.pixi.stageWidth - 100);
    CG.Base.pixi.root.addChild(this.sprite);
    this.sprite.scale.set(3, 3);
    CG.Base.addUpdateFunction(this, this.update);

    /*  PIXI.keyboardManager.on('pressed', (key) => {
          if (key == PIXI.keyboard.Key.SPACE) {
              new Bullet(this.sprite.x, this.sprite.y - 30, 1);
          }
      });*/
}
update(dt: number): void {
    let move: CG.Base.geom.Point = new CG.Base.geom.Point(0, 0);
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.RIGHT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.D)) {
        move.x = 1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.LEFT)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.A)) {
        move.x = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.UP)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.W)) {
        move.y = -1;
    }
    if (PIXI.keyboardManager.isDown(PIXI.keyboard.Key.DOWN)||PIXI.keyboardManager.isDown(PIXI.keyboard.Key.S)) {
        move.y = 1;
    }
    move.normalize(dt * this.speed);

    let edge: number = 20;
    let position: CG.Base.geom.Point = CG.Base.geom.Point.fromPIXIPoint(this.sprite.position);
    position.x = position.x + move.x;
    position.y = position.y + move.y;

    if (position.x < edge) {
        position.x = edge;
    } else if (position.x > CG.Base.pixi.stageWidth - edge) {
        position.x = CG.Base.pixi.stageWidth - edge;
    }

    edge = 30;
    if (position.y < edge) {
        position.y = edge;
    } else if (position.y > CG.Base.pixi.stageHeight - edge) {
        position.y = CG.Base.pixi.stageHeight - edge;
    }

    this.sprite.position.set(position.x, position.y);


}ddddddddddddd

zombieGame

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Give examples

Versioning

We use SemVer for versioning.

Authors

Acknowledgments

  • Hat tip to anyone who's code was used
  • Inspiration
  • etc
READ ONLY
  • problem
  • console
No problems have been detected so far.
Ln 1, Col 1, Sel 0
Markdown