Jump to content

Search the Community

Showing results for tags 'phaserpositioning'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hey First of all mad props whoever created this beautiful piece of software! Here, is my questions regarding addChild method. From my AS3 days I remember child display object's coordinates were relative to parent. So, in this vein I was hoping gray square would be sitting in the top left corner of the blue square. Instead of this I got strange positioning, also child object(gray one) lost his propositions. Upon loading it was 100/100 square. I guess I am missing crucial line of code but I cannot figure out where am I messing up preload() { this.game.load.image("debugRect", "Scripts/assets/debugRect.png"); //Load Map TIles this.game.load.image("bigOrange", "Scripts/assets/secondMap/Untitled-3-0.png"); this.game.load.image("gray", "Scripts/assets/secondMap/Untitled-3-1.png"); this.game.load.image("lightBlue", "Scripts/assets/secondMap/Untitled-3-2.png"); this.game.load.image("red", "Scripts/assets/secondMap/Untitled-3-3.png"); this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; ; } create() { const introSquareSprite = this.game.add.sprite(10,10, "debugRect"); introSquareSprite.anchor.setTo(0, 0); introSquareSprite.width = 960; introSquareSprite.height = 650; const gray = this.game.add.sprite(0, 0, "gray"); gray.anchor.setTo(0, 0); introSquareSprite.addChild(gray); }and here is screenshot
×
×
  • Create New...