コード例 #1
0
        public void Dispose()
        {
            if (CharacterProxy != null)
            {
                CharacterProxy.Dispose();
                CharacterProxy = null;
            }

            if (CharacterPhantom != null)
            {
                CharacterPhantom.Dispose();
                CharacterPhantom = null;
            }

            if (CharacterRigidBody != null)
            {
                if (CharacterRigidBody.GetRigidBody() != null)
                {
                    CharacterRigidBody.GetRigidBody().ContactPointCallback -= RigidBody_ContactPointCallback;
                }
                CharacterRigidBody.Dispose();
                CharacterRigidBody = null;
            }

            m_characterShape.RemoveReference();
            m_characterCollisionShape.RemoveReference();
            m_crouchShape.RemoveReference();
        }
コード例 #2
0
        public void Dispose()
        {
            if (CharacterProxy != null)
            {
                CharacterProxy.Dispose();
                CharacterProxy = null;
            }

            if (CharacterPhantom != null)
            {
                CharacterPhantom.Dispose();
                CharacterPhantom = null;
            }

            if (CharacterRigidBody != null)
            {
                CharacterRigidBody.Dispose();
                CharacterRigidBody = null;
            }

            m_characterShape.RemoveReference();
            m_characterCollisionShape.RemoveReference();
            m_crouchShape.RemoveReference();
        }