public void OnFinishObserve(PlatformMain platform) { if (_collisionDetector != null) { _collisionDetector.OnCollideEnter -= CollisionDetectorOnCollideEnter; } _collisionDetector = null; _platformVisuals = null; }
public void OnBeginObserve(PlatformMain platform) { _collisionDetector = platform.GetPlaformComponent <PlatformCollisionDetector>(); _platformVisuals = platform.GetPlaformComponent <PlatformVisuals>(); Assert.IsNotNull(_collisionDetector); Assert.IsNotNull(_platformVisuals); _collisionDetector.OnCollideEnter += CollisionDetectorOnCollideEnter; }