Exemplo n.º 1
0
 public void chooseParapat()
 {
     if (FirstSelected == "Parapat")
     {
         if (userScore.GetScore("Batuguru", 20) > 0 || CanPlay)
         {
             StartCoroutine("ParapatScene");
             transisionAnimator.SetTrigger("Close");
             changeSound.Play();
         }
         else
         {
             AnimatorParapat.SetTrigger("unlock");
         }
     }
     else
     {
         FirstSelected     = "Parapat";
         goToSelected      = true;
         timeScale         = 0;
         startMovePosition = PanelItem.GetComponent <RectTransform>().localPosition.x;
     }
 }
Exemplo n.º 2
0
    public StaticLevel(string Season, string Place, int level)
        : base(EntityManager.XMLToInstance <StaticLevel>(Resources.Load <TextAsset>(Season + "/" + Place + "/" + level.ToString()).text))
    {
        this.Season = Season;
        this.Place  = Place;
        this.Level  = level;
        StaticLevel temp = EntityManager.XMLToInstance <StaticLevel>(Resources.Load <TextAsset>(Season + "/" + Place + "/" + level.ToString()).text);

        this.WhiteQuantity  = temp.WhiteQuantity;
        this.RedQuantity    = temp.RedQuantity;
        this.OrangeQuantity = temp.OrangeQuantity;

        UserScoreData userScore = UserScoreData.Load();

        this.HighScore = userScore.GetScore(Place, Level);
    }
Exemplo n.º 3
0
    public void Refresh()
    {
        dataLevel = new StaticLevel(Season, Place, Level);

        UserScoreData userScoreData = UserScoreData.Load();

        if (RequiredLevel < 1)
        {
            RequiredLevel = 1;
        }
        if (userScoreData.GetScore(RequiredPlace, RequiredLevel) > 0 || (Place == "Parbaba" && Level == 1) || canPlay)
        {
            canPlay = true;
            Image imageComponent = GetComponent <Image>();
            imageComponent.sprite = FinishedSprite;
        }
        if (dataLevel.HighScore > 0)
        {
            HideRubbishes();
        }
        ShowStar();
    }