예제 #1
0
        public void FishingEnd(bool success)
        {
            foreach (Fish f in Fishes)
            {
                f.FishingEnd();
            }

            areaCollider.enabled = true;

            FishingControls?.Disable();
            FishingControls?.Dispose();
            FishingControls = null;

            Debug.Log("Stopped fishing.");

            if (_fishingBehaviourScript == null)
            {
                return;
            }

            if (success)
            {
                ActiveFish.ForceStopAI();
                Debug.Log("Fish Caught!");
            }
            else
            {
                OnFail?.Invoke();
                Debug.Log("Fish Got Away...");
            }

            Destroy(_fishingBehaviourScript.gameObject);
        }
예제 #2
0
 private void OnDisable()
 {
     _controls.Disable();
 }
예제 #3
0
 private void OnDisable()
 {
     FishingControls?.Disable();
 }