public void Awake()
    {
        mr = gameObject.transform.GetComponent <MeshRenderer>();
        if (healthy == null)
        {
            healthy = mr.material;
        }
        if (sick == null)
        {
            sick       = new Material(mr.material);
            sick.color = Color.red;
        }

        agc = this.gameObject.GetComponent <AgentBirthController>();
        atc = this.gameObject.GetComponent <AgentTargetController>();

        if (ic == null)
        {
            ic = IllnessController.Instance;
        }
        if (wc == null)
        {
            wc = WorldController.Instance;
        }
        if (mc == null)
        {
            mc = MovementController.Instance;
        }
        setRandomAge();
        setRandomGender();
        Illness = false;

        others = new List <AgentController>();
    }
Beispiel #2
0
 public void Start()
 {
     if (ic == null)
     {
         ic             = IllnessController.Instance;
         CureProbablity = ic.Recovery;
     }
 }
    public void Start()
    {
        mc       = MovementController.Instance;
        ic       = IllnessController.Instance;
        rc       = ResearchController.Instance;
        mc.Scale = MapScale;

        CitySpawner();
        AgentSpawner.Instance.Spawn();
        Tick();

        List <City> temp = cities.Where(e => e.Agents > 0).ToList();

        temp[UnityEngine.Random.Range(0, temp.Count)].RandomAgent.Illness = true;
    }
 public void Start()
 {
     if (agentSpawner == null)
     {
         agentSpawner = AgentSpawner.Instance;
     }
     if (ic == null)
     {
         ic = IllnessController.Instance;
     }
     if (wc == null)
     {
         wc = WorldController.Instance;
     }
     ac = gameObject.transform.GetComponent <AgentController>();
 }