private void Birth()
    {
        AgentController ac = agentSpawner.Spawn(gameObject.transform.position, this.ac.City);

        ac.Age     = 0;
        ac.Illness = (UnityEngine.Random.value < (this.ac.Illness == true ? 1 : 0) * ic.Infectiousness);
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        string line = streamReader.ReadLine();

        if (line == null || line.Length == 0)
        {
            return;
        }
        if (line[0] != '<')
        {
            return;
        }
        string[] splitLine = line.Split('\t');
        if (splitLine.Length < 2)
        {
            return;
        }


        string playerName = splitLine[0];

        if (!playerNameToId.ContainsKey(playerName))
        {
            newPlayer(playerName);
        }
        line = splitLine[1];
        line = line.ToLower();
        line = line.Trim();

        parseUpgradePayment(line);
        spawner.Spawn(playerNameToId[playerName]);
    }