Does wade.cloneobject() clone behaviours I think it does not. In which case that is a bug and needs to be corrected.
wade.cloneobject()
rickierich September 24th, 2019
1 Comment
Gio September 24th, 2019
I know it's a bit confusing and there is a plan to rename some of those functions.
However what you want to use is SceneObject.clone(). This will clone a SceneObject with all its properties, behaviors, sprites, etc.
On the other hand, wade.cloneObject() is intended to create a copy of a plain JavaScript object such as {x: 1, y: 2, z: "..."}
In future versions of Wade, we will deprecate wade.cloneObject and wade.cloneArray, and will have one single wade.clone() function that will do the appropriate thing depending on what you're trying to clone (whether it's a plain JS object, a SceneObject, a Sprite, etc)
Post a reply
Add Attachment
Submit Reply
Login to Reply