Пример #1
0
    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>();
    }
Пример #2
0
 public void Start()
 {
     if (ic == null)
     {
         ic             = IllnessController.Instance;
         CureProbablity = ic.Recovery;
     }
 }
Пример #3
0
    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;
    }
Пример #4
0
 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>();
 }