示例#1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_collision != null)
         {
             _collision.Release();
             _collision = null;
         }
     }
 }
    protected virtual void Start()
    {
        StartParticleSystems();

        ICollisionHandler handler = (this as ICollisionHandler);

        if (handler != null)
        {
            CCollision Checker = GetComponentInChildren <CCollision>();
            if (Checker != null)
            {
                Checker.CollisionHandler = handler;
            }
        }
    }
示例#3
0
        public void Initialise(World world)
        {
            if (_isInitialised)
            {
                return;
            }

            if (world == null)
            {
                throw new ArgumentNullException("world");
            }

            _world     = world;
            _collision = OnInitialise();
            OnInitialiseEnd();
            _isInitialised = true;
        }