Use GetFastValue so all children are added to the container via GameObjectCreator Fix #6743

This commit is contained in:
Robert Kowalski 2024-02-19 12:09:07 -05:00
parent 514f4db5fc
commit 7a6845f6bf
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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.
@ -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);