예제 #1
0
    IEnumerator loadMission()
    {
        yield return(new WaitForSeconds(0.1f));

        if (GameData.MissionType == GameData.MISSIONTYPE.SCORE)
        {
            Target.SetActive(true);
            Keo1.SetActive(false);
            Keo2.SetActive(false);
            Target.GetComponent <Text>().text = "Target: " + GameData.TargetScore.ToString();
        }
        else
        {
            Target.SetActive(false);
            if (GameData.KeoCollection.Length == 1)
            {
                Keo1.SetActive(true);
                Keo2.SetActive(false);

                Keo1.GetComponent <Image>().sprite        = GameData.Keo1;
                Keo1.GetComponentInChildren <Text>().text = GameData.NumKeo1.ToString() + "/" + GameData.KeoCollection[0].Count.ToString();
            }
            else
            {
                Keo1.SetActive(true);
                Keo2.SetActive(true);

                Keo1.GetComponent <Image>().sprite = GameData.Keo1;
                Keo2.GetComponent <Image>().sprite = GameData.Keo2;

                Keo1.GetComponentInChildren <Text>().text = GameData.NumKeo1.ToString() + "/" + GameData.KeoCollection[0].Count.ToString();
                Keo2.GetComponentInChildren <Text>().text = GameData.NumKeo2.ToString() + "/" + GameData.KeoCollection[1].Count.ToString();
            }
        }
    }
예제 #2
0
 void UpDateCollection()
 {
     if (GameData.MissionType == GameData.MISSIONTYPE.COLLECTION)
     {
         if (GameData.KeoCollection.Length == 1)
         {
             if (GameData.TargetCombo.GetComponent <Keo>().NameCollection == GameData.KeoCollection[0].KeoCollection)
             {
                 GameData.NumKeo1 += listKeos.Count;
             }
         }
         else
         {
             if (GameData.TargetCombo.GetComponent <Keo>().NameCollection == GameData.KeoCollection[0].KeoCollection)
             {
                 GameData.NumKeo1 += listKeos.Count;
             }
             if (GameData.TargetCombo.GetComponent <Keo>().NameCollection == GameData.KeoCollection[1].KeoCollection)
             {
                 GameData.NumKeo2 += listKeos.Count;
             }
         }
     }
     if (GameData.MissionType == GameData.MISSIONTYPE.COLLECTION)
     {
         if (GameData.KeoCollection.Length == 1)
         {
             Keo1.GetComponentInChildren <Text>().text = GameData.NumKeo1.ToString() + "/" + GameData.KeoCollection[0].Count.ToString();
         }
         else
         {
             Keo1.GetComponentInChildren <Text>().text = GameData.NumKeo1.ToString() + "/" + GameData.KeoCollection[0].Count.ToString();
             Keo2.GetComponentInChildren <Text>().text = GameData.NumKeo2.ToString() + "/" + GameData.KeoCollection[1].Count.ToString();
         }
     }
 }