コード例 #1
0
        public void OnFinishObserve(PlatformMain platform)
        {
            if (_collisionDetector != null)
            {
                _collisionDetector.OnCollideEnter -= CollisionDetectorOnCollideEnter;
            }

            _collisionDetector = null;
            _platformVisuals   = null;
        }
コード例 #2
0
        public void OnBeginObserve(PlatformMain platform)
        {
            _collisionDetector = platform.GetPlaformComponent <PlatformCollisionDetector>();
            _platformVisuals   = platform.GetPlaformComponent <PlatformVisuals>();

            Assert.IsNotNull(_collisionDetector);
            Assert.IsNotNull(_platformVisuals);

            _collisionDetector.OnCollideEnter += CollisionDetectorOnCollideEnter;
        }