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