예제 #1
0
 public void MoveToBlockAccordingToColor(MixedColor color, string successBlock, string failBlock)
 {
     Debug.Log("Comparing colors! " + color.color + " " + image.color);
     if (color.color == image.color)
     {
         flowchart.ExecuteBlock(successBlock);
     }
     else
     {
         flowchart.ExecuteBlock(failBlock);
     }
 }
예제 #2
0
        public void ChangeToRandomMixedColor()
        {
            int randomIndex = Random.Range(0, mixColors.Length - 1);

            while (mixColors[randomIndex] == mixedColor)
            {
                randomIndex = Random.Range(0, mixColors.Length - 1);
            }
            mixedColor = mixColors[randomIndex];
            ChangePotionsColors();
            int randomObjectIndex = 0;

            for (int i = 0; i < randomColorOptions.Count; i++)
            {
                if (randomColorOptions[i] != mixedColor.FirstColor && randomColorOptions[i] != mixedColor.SecondColor)
                {
                    randomColorObjects[randomObjectIndex++].color = randomColorOptions[i];
                }
            }
        }
예제 #3
0
 public void ChangeMixedColor(MixedColor newMixedColor)
 {
     mixedColor = newMixedColor;
     ChangePotionsColors();
 }