Nez.Portable/ECS/Entity.cs
/// <summary>
/// attaches an Entity that was previously detached to a new scene
/// </summary>
/// <param name="newScene">New scene.</param>
attaches an Entity that was previously detached to a new scene
attaches an Entity that was previously detached to a new scene
public void attachToScene(Scene newScene)
        {
            scene = newScene;
            newScene.entities.add(this);
            components.registerAllComponents();
            for (var i = 0; i < transform.childCount; i++)
                transform.getChild(i).entity.attachToScene(newScene);
        }
public void attachToScene ( Scene newScene ) { scene = newScene ; newScene . entities . add ( this ) ; components . registerAllComponents ( ) ; for ( var i = 0 ; i < transform . childCount ; i ++ ) transform . getChild ( i ) . entity . attachToScene ( newScene ) ; }
attaches an Entity that was previously detached to a new scene
attaches an Entity that was previously detached to a new scene
newScene
Scene
None