public override void UnbindFromScene(Scene _scene) { base.UnbindFromScene(_scene); if (Mgr <GameEngine> .Singleton._gameEngineMode == GameEngine.GameEngineMode.MapEditor) { m_debugShape.Destroy(Mgr <Scene> .Singleton); } }
public void RemoveFromScene(Scene _scene) { if (m_debugShape != null && Mgr <GameEngine> .Singleton._gameEngineMode == GameEngine.GameEngineMode.MapEditor) { m_debugShape.Destroy(_scene); } }
public override void UnbindFromScene(Scene _scene) { base.UnbindFromScene(_scene); PhysicsSystem physicsSystem = m_gameObject.Scene.GetPhysicsSystem(); if (physicsSystem == null) { return; } if (m_body != null) { physicsSystem.GetWorld().RemoveBody(m_body); m_body = null; } if (m_debugShape != null) { m_debugShape.Destroy(_scene); } }