Пример #1
0
 public override void UnbindFromScene(Scene _scene)
 {
     base.UnbindFromScene(_scene);
     if (Mgr <GameEngine> .Singleton._gameEngineMode == GameEngine.GameEngineMode.MapEditor)
     {
         m_debugShape.Destroy(Mgr <Scene> .Singleton);
     }
 }
Пример #2
0
 public void RemoveFromScene(Scene _scene)
 {
     if (m_debugShape != null &&
         Mgr <GameEngine> .Singleton._gameEngineMode == GameEngine.GameEngineMode.MapEditor)
     {
         m_debugShape.Destroy(_scene);
     }
 }
Пример #3
0
        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);
            }
        }