Example #1
0
    public static void OnRpcOnSpellUsedCallbackRegion(string msg, string value)
    {
        Debug.Log(value);
        switch (msg)
        {
        case "RandomEvent":
            eventsList [int.Parse(value)].ApplyChanges();
            eventsList.Remove(eventsList [int.Parse(value)]);
            break;

        case "NewRegionInfected":
            Country region = GetCountryFromName(value);
            region.infected   += 1;
            region.Population -= 1;
            break;

        case "CloseBorder":
            Main_Controller_def.CloseBorder(GetCountryFromName(value));
            break;

        case "Localisation":
            Instance.OpenNotification("Recherche positive: L'adversaire a trouvé le virus ! ", value + " est une région contenant au moins une personne infectée.");
            Main_Controller_def.Localisation(GetCountryFromName(value));
            break;

        case "ResearchSymp":
            //FIXME
            Main_Controller_def.ResearchSymp(value);
            break;

        case "ResearchTrans":
            //FIXME
            Main_Controller_def.ResearchTrans(value);
            break;

        case "SanitaryCampaign":
            Main_Controller_def.SanitaryCampaign(GetCountryFromName(value));
            break;

        case "RegionSelected":
            isStarted   = true;
            StartRegion = GetCountryFromName(value);
            break;

        default:
            Debug.Log("WTF?");
            break;
        }
    }
Example #2
0
    public static void OnRpcOnSpellUsedCallbackRegion(string msg, string value)
    {
        Debug.Log(value);
        switch (msg)
        {
        case "RandomEvent":
            eventsList [int.Parse(value)].ApplyChanges();
            eventsList.Remove(eventsList [int.Parse(value)]);
            break;

        case "NewRegionInfected":
            Country region = GetCountryFromName(value);
            region.infected   += 1;
            region.Population -= 1;
            break;

        case "CloseBorder":
            Main_Controller_def.CloseBorder(GetCountryFromName(value));
            break;

        case "Localisation":
            Main_Controller_def.Localisation(GetCountryFromName(value));
            break;

        case "ResearchSymp":
            //FIXME
            Main_Controller_def.ResearchSymp(value);
            break;

        case "ResearchTrans":
            //FIXME
            Main_Controller_def.ResearchTrans(value);
            break;

        case "SanitaryCampaign":
            Main_Controller_def.SanitaryCampaign(GetCountryFromName(value));
            break;

        case "RegionSelected":
            isStarted   = true;
            StartRegion = GetCountryFromName(value);
            break;

        default:
            Debug.Log("WTF?");
            break;
        }
    }