Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Entity allow nothing for initialization
Browse files Browse the repository at this point in the history
01010111 committed Jul 27, 2018
1 parent 8faccc8 commit 53b3d83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zero/flxutil/ecs/Entity.hx
Original file line number Diff line number Diff line change
@@ -22,8 +22,9 @@ class Entity extends FlxSprite
* ?components:Array<Component> an array of components to be added to this Entity
* }
*/
public function new(options:EntityOptions)
public function new(?options:EntityOptions)
{
if (options == null) options = {};
if (options.x == null) options.x = 0;
if (options.y == null) options.y = 0;
if (options.name != null) name = options.name;

0 comments on commit 53b3d83

Please sign in to comment.