// Use this for initialization void Start() { desirable = GetComponent <PackMember>(); fuzzyLogic = GetComponent <Fuzzy>(); fuzzyLogicDis = GetComponent <Fuzzy>(); dirtLevel = Random.Range(0f, 40f); dirtDecayRate = Random.Range(0.0006f, 0.01f); rateOfWashing = Random.Range(0.3f, 0.45f); maxDirt = 100.0f; rvLeft = fuzzyLogic.RVLeftShoulder; rvRight = fuzzyLogic.RVRightShoulder; rvTrap = fuzzyLogic.RVTrapezoid; }
// Use this for initialization void Start() { SD = GetComponent <SleepDesire>(); CD = GetComponent <ConsumeDesire>(); TD = GetComponent <ToiletDesire>(); BW = GetComponent <Birdwatcher>(); WD = GetComponent <WasherDesire>(); PM = GetComponent <PackMember>(); WashDesirability = GetComponent <Fuzzy>(); EatDesirability = GetComponent <Fuzzy>(); SleepDesirability = GetComponent <Fuzzy>(); ExcreteDesirability = GetComponent <Fuzzy>(); BirdDesirability = GetComponent <Fuzzy>(); lifeSpan = 0; // Assigning UI texts #region foreach (Text t in GameObject.FindObjectsOfType <Text>()) { if (t.name == "Quality of Life") { Qol = t; } else if (t.name == "Food") { food = t; } else if (t.name == "Sleep") { sleep = t; } else if (t.name == "Toilet") { toilet = t; } else if (t.name == "Wash") { wash = t; } else if (t.name == "Fun") { fun = t; } else if (t.name == "QoLValue") { QolValue = t; } else if (t.name == "FoodValue") { foodValue = t; } else if (t.name == "SleepValue") { sleepValue = t; } else if (t.name == "ToiletValue") { toiletValue = t; } else if (t.name == "WashValue") { washValue = t; } else if (t.name == "FunValue") { funValue = t; } else if (t.name == "Desire") { currentD = t; } } #endregion }