private void InitAffector() { switch (_selectedDemand) { case EDemand.Hunger: { _affector = GameObject.FindObjectOfType <HungerAffector>(); break; } case EDemand.Stress: { _affector = GameObject.FindObjectOfType <StressAffector>(); break; } } }
private void InitAffector() { switch (DemandType) { case EDemandType.Hunger: { _affector = FindObjectOfType <HungerAffector> (); break; } case EDemandType.Stress: { _affector = FindObjectOfType <StressAffector> (); break; } default: { Debug.LogError(this.name + ":: affector type not selected."); break; } } }