Esempio n. 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);
     }
 }
Esempio n. 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];
                }
            }
        }
Esempio n. 3
0
 public void ChangeMixedColor(MixedColor newMixedColor)
 {
     mixedColor = newMixedColor;
     ChangePotionsColors();
 }