void Awake() { if (maxFlowStrength <= 0) { Debug.LogWarning("FlowGenerator: max flow strength should be a positive value, but it is set to " + maxFlowStrength); } if (flowDuration <= 0) { Debug.LogWarning("FlowGenerator: flow duration should be a positive value, but it is set to " + flowDuration); } gestures.OnSwipeEnd += GenerateFlow; sounds = soundFacade.GetComponent<SoundFacade>(); }
void Awake() { sounds = GetComponent<SoundFacade>(); if (sounds == null) { throw new InvalidOperationException("Missing SoundFacade component"); } }
void Awake() { sounds = soundFacade.GetComponent<SoundFacade>(); }