コード例 #1
0
ファイル: Game2Manager.cs プロジェクト: calvarycat/BateGon
    private IEnumerator ShowSymptom()
    {
        if(_OnNewSymtom != null)
        {
            _OnNewSymtom();
        }
        if(_symtomList==null || _symtomList.Count==0)
        _symtomList = new List<int> { 1, 2, 3, 4, 5, 7, 8 };


        int index = Random.Range(0, _symtomList.Count);

        while (_oldSymptomid == _symtomList[index] )
        {
            index = Random.Range(0, _symtomList.Count);
            yield return null;
        }

        int symptomID = _symtomList[index];
        _symtomList.RemoveAt(index);

        _oldSymptomid = symptomID;
        currentDisease = symptomID;
        int mapEnum = currentDisease + 1;
        MedicinName e = (MedicinName)mapEnum;
        GSPlaying.Instance.ShowSymptom(e);
        CreateMedicin(symptomID);
        symptom[symptomID].gameObject.SetActive(true);
    }
コード例 #2
0
    public void Show(MedicinName medicine)
    {
        Reset();

        GameObject symptomPrefab = null;

        switch (medicine)
        {
        case MedicinName.None:
            break;

        case MedicinName.Transmetin:
            symptomPrefab = TransmetinPrefab;
            break;

        case MedicinName.KlacidForte:
            symptomPrefab = KlacidFortePrefab;
            break;

        case MedicinName.Ganaton:
            symptomPrefab = GanatonPrefab;
            break;

        case MedicinName.Creon:
            symptomPrefab = CreonPrefab;
            break;

        case MedicinName.Hidrasec:
            symptomPrefab = HidrasecPrefab;
            break;

        case MedicinName.Duspatal:
            symptomPrefab = DuspatalPrefab;
            break;

        case MedicinName.Dicetel:
            symptomPrefab = DicetelPrefab;
            break;

        case MedicinName.DuphalacTntestine:
            symptomPrefab = DuphalacPrefab;
            break;

        case MedicinName.DuphalacLiver:
            symptomPrefab = DuphalacLiverPrefab;
            break;
        }

        if (symptomPrefab == null)
        {
            return;
        }

        GameObject  symptomObject = Utils.Spawn(symptomPrefab, SymptomRoot);
        SymptomUnit symptomUnit   = symptomObject.GetComponent <SymptomUnit>();

        symptomUnit.Init();
    }
コード例 #3
0
 public void ShowSymptom(MedicinName medicine)
 {
     TargetSymptomPanel.Show(medicine);
 }