void Update() { back.GetComponentInChildren <Text>().text = LanguageManager.Instance.GetTextValue(LanguageChangeScript.exitKey); if (firstSceneMenuScript.versionNumber == 1 && ParseScript.exist1 && !set && ParseScript.scaleA != 0) { boxA.localScale = new Vector3(ParseScript.scaleA, ParseScript.scaleA, ParseScript.scaleA); boxB.localScale = new Vector3(ParseScript.scaleB, ParseScript.scaleB, ParseScript.scaleB); ParseScript.SetScale("BoxAScale", ParseScript.scaleA + ""); ParseScript.SetScale("BoxBScale", ParseScript.scaleB + ""); set = true; } else if (firstSceneMenuScript.versionNumber == 2 && ParseScript.exist2 && !set && ParseScript.scaleA != 0) { boxA.localScale = new Vector3(ParseScript.scaleA, ParseScript.scaleA, ParseScript.scaleA); boxB.localScale = new Vector3(ParseScript.scaleB, ParseScript.scaleB, ParseScript.scaleB); ParseScript.SetScale("BoxAScale", ParseScript.scaleA + ""); ParseScript.SetScale("BoxBScale", ParseScript.scaleB + ""); boxC.localScale = new Vector3(ParseScript.scaleC, ParseScript.scaleC, ParseScript.scaleC); ParseScript.SetScale("BoxCScale", ParseScript.scaleC + ""); set = true; } else if (firstSceneMenuScript.versionNumber == 3 && ParseScript.exist3 && !set && ParseScript.scaleC != 0) { boxC.localScale = new Vector3(ParseScript.scaleC, ParseScript.scaleC, ParseScript.scaleC); ParseScript.SetScale("BoxCScale", ParseScript.scaleC + ""); boxD.localScale = new Vector3(ParseScript.scaleD, ParseScript.scaleD, ParseScript.scaleD); ParseScript.SetScale("BoxDScale", ParseScript.scaleD + ""); set = true; } aField.placeholder.GetComponentInChildren <Text>().text = LanguageManager.Instance.GetTextValue(LanguageChangeScript.enterKey) + " " + LanguageManager.Instance.GetTextValue(LanguageChangeScript.cubeKey) + " A " + LanguageManager.Instance.GetTextValue(LanguageChangeScript.scaleKey); bField.placeholder.GetComponentInChildren <Text>().text = LanguageManager.Instance.GetTextValue(LanguageChangeScript.enterKey) + " " + LanguageManager.Instance.GetTextValue(LanguageChangeScript.cubeKey) + " B " + LanguageManager.Instance.GetTextValue(LanguageChangeScript.scaleKey); }
public void EnterB() { Debug.Log("Scale B box set to " + bField.text); float scale = float.Parse(bField.text); boxB.localScale = new Vector3(scale, scale, scale); ParseScript.SetScale("BoxBScale", scale + ""); }
public void EnterA() { Debug.Log("Scale A box set to " + aField.text); float scale = float.Parse(aField.text); boxA.localScale = new Vector3(scale, scale, scale); ParseScript.SetScale("BoxAScale", scale + ""); }
public void EnterD() { Debug.Log("Scale B box set to " + dScrollbar.value); float scale = dScrollbar.value * 3; boxD.localScale = new Vector3(scale, scale, scale); ParseScript.SetScale("BoxDScale", scale + ""); }
public void EnterC() { Debug.Log("Scale A box set to " + cScrollbar.value); float scale = cScrollbar.value * 2; boxC.localScale = new Vector3(scale, scale, scale); ParseScript.SetScale("BoxCScale", scale + ""); }
public void GoToVersion1() { GetComponent <AudioSource>().PlayOneShot(buttonSound); Debug.Log("Go to v.1"); versionNumber = 1; if (ParseScript.exist2 || ParseScript.exist3) { error = true; } else { ParseScript.AddUser("Version_1"); } }
void Awake() { Scrollbar bar = GetComponent <Scrollbar>(); providedButton = (GameObject)Resources.Load("Button"); if (providedButton == null) { throw new System.Exception("providedButton template could not be loaded from resources."); } ParseScript parser = new ParseScript(); branches = parser.LoadScript(); lastToken = Tokens.none; //Init(); //BeginStory(); }
public void GoToVersion3() { GetComponent <AudioSource>().PlayOneShot(buttonSound); Debug.Log("Go to v.3"); versionNumber = 3; if (!ParseScript.exist3 && !ParseScript.exist2 && ParseScript.exist1) { error = true; } else if (!ParseScript.exist3 && ParseScript.exist2) { ParseScript.CopyUser("Version_2", "Version_3"); } else { ParseScript.AddUser("Version_3"); } }
public void Check() { ParseScript.CheckUser("Version_1", InputField.text); ParseScript.CheckUser("Version_2", InputField.text); ParseScript.CheckUser("Version_3", InputField.text); }