Example #1
0
        private void TryNotifyPickup()
        {
            if (!_cacheController.Current.HasActionableCollision)
            {
                return;
            }

            Debug.Log($"[{nameof(PowerupMovement)}] {nameof(TryNotifyPickup)} Picked up powerup!");
            new EventCommand(GameEvents.Powerup.Pickup, _cacheController.GetActionableData()).Execute();
        }
Example #2
0
        private void TryNotifyCollision(int pointOfCollision)
        {
            if (!_cacheController.Current.HasActionableCollision)
            {
                return;
            }

            Debug.Log($"[{nameof(ObstacleMovement)}] {nameof(OnCollisionExit)} Point of collision {pointOfCollision} FATAL!");
            new EventCommand(GameEvents.Obstacle.Collision, _cacheController.GetActionableData()).Execute();
        }