Skip to content

Commit

Permalink
Use GetFastValue so all children are added to the container via GameO…
Browse files Browse the repository at this point in the history
…bjectCreator Fix #6743
  • Loading branch information
rgk committed Feb 19, 2024
1 parent 514f4db commit 7a6845f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/3.80/CHANGELOG-v3.80.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The Phaser Input and related classes have been updated to be more consistent wit
* The `Video` Game Object now has a starting texture, which stops errors with accessing `frame` before the video loads the first frame. Fix #6475 (thanks @rexrainbow @JoeSiu)
* The `Device.Browser.safari` regular expression has been strenghtened so it now captures versions with double or triple periods in. Previously it would fail for `Version/17.2.1` due to the minor value. (thanks watcher)
* The `Browser` Device class will no longer think that Chrome is Mobile Safari on iOS devices. Fix #6739 (thanks @michalfialadev)
* The `GameObjectCreator` method `container` now includes all children in the config, accessed via `Scene.make.container`. Fix #6743 (thanks @Fake)

## Examples, Documentation, Beta Testing and TypeScript

Expand Down
3 changes: 2 additions & 1 deletion src/gameobjects/container/ContainerCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var BuildGameObject = require('../BuildGameObject');
var Container = require('./Container');
var GameObjectCreator = require('../GameObjectCreator');
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
var GetFastValue = require('../../utils/object/GetFastValue');

/**
* Creates a new Container Game Object and returns it.
Expand All @@ -29,7 +30,7 @@ GameObjectCreator.register('container', function (config, addToScene)

var x = GetAdvancedValue(config, 'x', 0);
var y = GetAdvancedValue(config, 'y', 0);
var children = GetAdvancedValue(config, 'children', null);
var children = GetFastValue(config, 'children', null);

var container = new Container(this.scene, x, y, children);

Expand Down

0 comments on commit 7a6845f

Please sign in to comment.