//////////////// /// METHODES /// //////////////// // Use this for initialization void Start() { _pHungryDelay = (float)Manager.Instance.Properties.GetElement("Delay.Hungry").Value; _pStarvingDelay = (float)Manager.Instance.Properties.GetElement("Delay.Starving").Value; _pFreezingDelay = (float)Manager.Instance.Properties.GetElement("Delay.Freezing").Value; _pRegenDelay = (float)Manager.Instance.Properties.GetElement("Delay.Heal").Value; _pMaxAge = (int)(float)Manager.Instance.Properties.GetElement("Agent.Life").Value; MaleGender = AgentInfo.GetGender(); if (MaleGender) { FirstName = AgentInfo.GetMaleName(); } else { FirstName = AgentInfo.GetFemaleName(); } MaxHealth = (int)(float)Manager.Instance.Properties.GetElement("Agent.Health").Value; MaxHunger = (int)(float)Manager.Instance.Properties.GetElement("Agent.Hunger").Value; _created = Time.time; _health = MaxHealth; _hunger = MaxHunger; _clothesTakenTime = 0f; _clothesTaken = false; CurrentTask = GetComponent <Task>(); _lastSeason = Manager.Instance.CurrentSeason; GameObject.Find("Village").GetComponent <Village>().AddVillager(gameObject); EventsWatcher.Instance.SendEvent(FirstName + " est devenu un adulte."); }