Пример #1
0
 IEnumerator StartChanges()
 {
     for (int i = 1; i < 11; i++)
     {
         Debug.Log("Level" + i);
         fishLevel.SkinLevel(i);
         fishEyes.SetEyeLevel(i);
         yield return(new WaitForSeconds(3));
     }
 }
Пример #2
0
    public void SetFishLevel(int fishLevel)
    {
        //check skin level
        if (fishLevel == fishLevelControl.GetCurrentLevel())
        {
            firstAssign = false;
            //do nothing if same skin level
        }
        else
        {
            //change if incorrect
            fishLevelControl.SkinLevel(fishLevel);
            fishEyeControl.SetEyeLevel(fishLevel);

//			if (fishLevelControl.GetCurrentLevel() > fishLevel)
//			{
//				//don't play level up if it is level down skin change
//				firstAssign = false;
//			}
//			else if (fishLevel == 1)
//			{
//				//do nothing if it is level 1 skin
//				firstAssign = false;
//			}
//			else if (firstAssign)
//			{
//				//if the fish is firstly assigned no need level up
//				firstAssign = false;
//			}
//			else
//			{
//				fishLevelControl.LevelUpAnimationStart ();
//			}

            if (firstAssign)
            {
                firstAssign = false;
            }
            else
            {
                fishLevelControl.LevelUpAnimationStart();
            }
        }
    }