Jump to content

Search the Community

Showing results for tags 'scenemanager'.

  • 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 2 results

  1. Hello all! I am new to developing games for the web, and this forum, even though I found some topics helpful before I joined. I have made a game using Phaser3 Framework, and everything works fine, except when I am trying to access the current scene to be able to exchange data from it with AngularJS directive wrapped around the game. I have written a directive in Angular to host the code of the game: app.directive('phaserGame', function() { return { restrict: 'E', scope: false, replace: true, transclude: false, controller: function($scope) { // This is the config object // 'parent' property defines the div id into which the game is to be injected $scope.config = { width: 800, height: 450, backgroundColor: '#36A9E1', scene: [MainScene, ArenaScene], parent: 'gameDiv' } // This is the most important line // This object creates the canvas and runs the game. $scope.game = new Phaser.Game($scope.config); //console.log($scope.game.scene); var arenaScene = $scope.game.scene; console.log(arenaScene) } } }); The last two lines of the directive display an object of the scene manager inside the console as follows: https://imgur.com/a/B9ONp0N If I try to retrieve any of the two scenes through that object, using: var arenaScene = $scope.game.scene.getAt(1); I get an undefined value. Note: I have tried the same without angularJS to no avail.
  2. Uncaught TypeError: Cannot read property 'sys' of undefined When I add the scene to the games config. It works perfectly. But when I add a scene via a running the current scene to start it a bit later, I get the error. The error is caused by adding a Scene via the Scene Manager (code below). This scene does exist with the gives name etc. doublechecked. Does anyone know what I am doing wrong? // adds a scene but throwing the error: sys of undefined. this.scene.add('name'); // adds a scene but throwing the error: sys of undefined too this.scene.add(ClassName); cheers,
×
×
  • Create New...