Example #1
0
    public static void OnRpcOnSpellUsedCallback(string msg)
    {
        switch (msg)
        {
        //def
        case "ResHum":
            Main_Controller_off.ResHum();
            break;

        case "ResTemp":
            Main_Controller_off.ResTemp();
            break;

        case "Res":
            Main_Controller_off.Res();
            break;

        case "Sneezing":
            Main_Controller_off.Sneezing();
            break;

        case "Cough":
            Main_Controller_off.Cough();
            break;

        case "SoreThroat":
            Main_Controller_off.SoreThroat();
            break;

        case "HeartFailure":
            Main_Controller_off.HeartFailure();
            break;

        case "Diarrhea":
            Main_Controller_off.Diarrhea();
            break;

        case "Fever":
            Main_Controller_off.Fever();
            break;

        case "Nausea":
            Main_Controller_off.Nausea();
            break;

        case "ResearchAntidote":
            Main_Controller_def.ResearchAntidote();
            break;

        case "Boost":
            Main_Controller_def.Boost();
            break;

        case "VaccinateAnimals":
            Main_Controller_def.VaccinateAnimals();
            break;

        case "BetterHygiene":
            Main_Controller_def.BetterHygiene();
            break;

        case "HighDensityRes":
            Main_Controller_off.HighDensityRes();
            break;

        case "Depression":
            Main_Controller_off.Depression();
            break;

        case "Flu":
            Main_Controller_off.Flu();
            break;

        case "Insomnia":
            Main_Controller_off.Insomnia();
            break;

        case "Stroke":
            Main_Controller_off.Stroke();
            break;

        case "Paralisys":
            Main_Controller_off.Paralisys();
            break;

        case "AttackAnimals":
            Main_Controller_off.AttackAnimals();
            break;

        default:
            Debug.Log("WTF?");
            break;
        }
    }
Example #2
0
    private void FixedUpdate()
    {
        if (!canStart)
        {
            canStart = Main_Controller.symptoms.Count != 0 || Main_Controller.transmitions.Count != 0;
            return;
        }
        if (i != 450)
        {
            i++;
            return;
        }
        i = 0;

        if (!located)
        {
            located = Main_Controller_def.Localisation(
                Main_Controller.Earth.regionlist[Random.Range(0, Main_Controller.symptoms.Count)]);
        }
        else
        {
            Main_Controller_def.ResearchAntidote();
            if (Main_Controller.transmitions.Count != 0)
            {
                if (Main_Controller.symptoms.Count != 0 && !Main_Controller_def.ResearchTrans(Main_Controller.transmitions[Random.Range(0, Main_Controller.transmitions.Count)]))
                {
                    Main_Controller_def.ResearchSymp(Main_Controller.symptoms[Random.Range(0, Main_Controller.symptoms.Count)]);
                }
            }
        }


        if (Main_Controller_def.foundSymptoms.Count == Main_Controller.symptoms.Count)
        {
            if (Main_Controller_def.foundTransmitions.Count == Main_Controller.transmitions.Count)
            {
                text.text = "L'IA recherche l'antidote";
            }
            else
            {
                text.text = "L'IA a recherché tous les symptomes";
            }
        }
        else
        {
            Debug.Log("trans found : " + Main_Controller_def.foundTransmitions.Count + "trans: " + Main_Controller.transmitions.Count);
            Debug.Log("symp found : " + Main_Controller_def.foundSymptoms.Count + "symp: " + Main_Controller.symptoms.Count);
            if (Main_Controller_def.foundTransmitions.Count == Main_Controller.transmitions.Count)
            {
                text.text = "L'IA a recherché toutes les transmitions";
            }
            else
            {
                if (located)
                {
                    text.text = "L'IA a localisé le virus";
                }
                else
                {
                    text.text = "L'IA tente de localiser le virus";
                }
            }
        }
    }