KoalaForce

Members
  • Content Count

    5
  • Joined

  • Last visited

About KoalaForce

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://koalaforce.com

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

416 profile views
  1. Edit: Sorry if I broke your margins. I'm trying to implement some type of camera zoom into my project at the moment and I'm having a few issues. I'm working with a tilemap and tilelayer that is 96 tiles by 72 tiles big, each tile is 32x32. When I go to zoom out, my tilelayer compresses, but the camera doesn't seem to adjust and or the full tilemap/tilemap layer are not being rendered. Initial View with painted tiles for reference. Layer Scale is set to 1 Layer Scale set to 0.33 Layer Scale : 1, with some newly painted tiles Back to 0.33. I would like to be able to paint new tiles from this screen, but the tilemap layer isn't fully shown/rendered.(I think I can solve the paint issue by scaling the input up); Moving the Camera ever so slightly to show the painted Tiles Code looks something like this using lewster32's implementation. Any help would be appreciated and I'll try to reply when I get home from work later tonight. Thanks in advance.
  2. You are totally an OOP person though! Should have been: super(game, x, y, key, frame);Thanks.
  3. I'm trying to extend the Phaser.Image class in Typescript so I can create some buttons for my UI, and remove some clutter from my main js file. IE: exitButton.anchor.setTo(0.5, 0.5);exitButton.inputEnabled = true;exitButton.visible = true;to var exitImage = new ButtonImage(this.game, (this.scale.width -this.yGridMargin), this.scale.height, 'buttonSheet', 5);When I run the game chrome and firefox return this.game is null or cannot read property cache of null. The console seems to be point to line 35779 in the phaser.js file. else if (typeof key === 'string' && !this.game.cache.checkImageKey(key))ButtonImage ///<reference path = "../tsDefinitions/phaser.d.ts" />module BasicGame{ export class ButtonImage extends Phaser.Image{ constructor(game: Phaser.Game, x:number, y:number, key:any, frame: number | string){ //constructor(x: number, y:number, key: any | 'string', frame: number | string){ super(this.game, x, y, key, frame); this.anchor.setTo(0.5, 0.5); this.inputEnabled = true; this.visible = true; //game.add.existing(this); } } }Any help is much appreciated. *edit for language context
  4. If it helps anyone, I figured it out by creating a new Phaser.Tile. Not sure if I was doing something wrong, but this.game.add.tile didn't seem to work.
  5. Hi, Is there a way to assign a tile to a button without the tile already on the tilelayer? Some examples deal with this, but it seems the tiles used to paint, fill, or swap are already on the tilemap/tilelayer. I have 2 buttons, and I would like for the user to be able to paint the tilelayer when the corresponding button is active. Thanks in advance!