// Use this for initialization new void Start() { mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); ds = mcRef.getStorage(); visitNumber = ds.retrieveIntValue("TopFloorVisitNumber"); bank = stringBankCol.getBank(visitNumber); bank.rosetta = rosetta; bank.reset(); int nFloaters; nFloaters = bank.nItems(); floater = new HeavyLevitatingFollower[nFloaters]; for (int i = 0; i < nFloaters; ++i) { Vector3 newPos = player.transform.position; newPos.x -= 5 * i; GameObject newFloater = (GameObject)Instantiate(floaterPrefab, newPos, Quaternion.Euler(0, 0, 0)); floater [i] = newFloater.GetComponent <HeavyLevitatingFollower> (); floater [i].player = player; floater [i].nearRadius = 2.0f + i * 1.0f; floater [i].initialize(); } questionNumber = 0; }
// Use this for initialization void Start() { if (rosetta == null) { rosetta = GameObject.Find("RosettaWrapper").GetComponent <RosettaWrapper> ().rosetta; } }
public override void Refresh() { var text = gameObject.GetComponent <Text>(); text.text = Rosetta.GetText(_devString, I18NSpace); if (IsVirtualFont) { text.font = Rosetta.IsDefault() ? _devFont : Rosetta.GetFont(VirtualFontName); } }
void Start() { if (rosetta == null) { rosetta = GameObject.Find("RosettaWrapper").GetComponent <RosettaWrapper> ().rosetta; } this.text = rosetta.retrieveString(key); locale = rosetta.locale(); }
public override void Refresh() { var audioSource = gameObject.GetComponent <AudioSource>(); var status = audioSource.isPlaying; audioSource.clip = Rosetta.IsDefault() ? _devAudio : Rosetta.GetAudio(ResName, I18NSpace); if (status) { audioSource.Play(); } }
// Use this for initialization void Start() { elapsedTime = 0.0f; rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); tryAgainBank.rosetta = rosetta; tryAgainBank.reset(); t1.text = tryAgainBank.getString(0); t2.text = tryAgainBank.getString(0); mc = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); ds = mc.getStorage(); aSource = this.GetComponent <AudioSource> (); }
void Start() { ros = GameObject.Find("Rosetta").GetComponent <Rosetta>(); cam = GameObject.Find("Main Camera").GetComponent <Camera> (); cam.farClipPlane = 300000; StringBank bank = stringBanks.bank[0]; bank.reset(); bank.rosetta = ros; for (int i = 0; i < 7; ++i) { string sId = bank.getNextString(); //texts [i].text = StringUtils.chopLines (sId, 35); texts[i].GetComponent <ThoughtText>().setText(StringUtils.chopLines(sId, 35)); } }
/* methods */ new void Start() { textHeaderRef.text = ""; textHeaderRef.color = new Vector4(1, 1, 1, 0); descriptionRef.text = ""; descriptionRef.color = new Vector4(1, 1, 1, 0); individualNameRef.text = ""; individualNameRef.color = new Vector4(1, 1, 1, 0); individualDescrRef.text = ""; individualDescrRef.color = new Vector4(1, 1, 1, 0); state = WarriorsActivityState.Categories; if (rosetta == null) { rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); } isWaitingForActionToComplete = false; mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); }
/* methods */ public void initialize() { if (level == null) { level = GameObject.Find("LevelController").GetComponent <LevelControllerScript> (); } if (player == null) { player = GameObject.Find("Player"); } whirlDifficulty = 1.0f; elapsedTime = 0.0f; targetAngle = angle = (floatRandomRange(0.0f, 360.0f) / 360.0f) * 2.0f * 3.1416f; timeToWhirl = floatRandomRange(minTimeToWhirl / whirlDifficulty, maxTimeToWhirl / whirlDifficulty); timeToChasePlayer = floatRandomRange(minTimeToChasePlayer, maxTimeToChasePlayer); timeToVeer = floatRandomRange(minTimeToChasePlayer, maxTimeToChasePlayer); frozen = false; targetLinearSpeed = linearSpeed = maxLinearSpeed; rigidBody = this.GetComponent <Rigidbody> (); elapsedChasingTime = 0.0f; elapsedVeeringTime = 0.0f; rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); ds = mcRef.getStorage(); string lvl = level.locationName.Substring(0, 6); string key = lvl + "SpawnedShadows"; ds.storeIntValue(key, 0); int waveNumber = ds.retrieveIntValue(lvl + "ShadowWaveNumber"); if (waveNumber > shadowSpawnController.waveType.Length) { Destroy(this.gameObject); } state = InterconNetworkState.busy; if (freezer == null) { freezer = GameObject.Find("Freezer").GetComponent <Freezer> (); } }
public void go() { StringBank[] allStringBanks = GameObject.FindObjectsOfType(typeof(StringBank)) as StringBank[]; Rosetta rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); for (int i = 0; i < allStringBanks.Length; ++i) { StringBank bank = (StringBank)(allStringBanks [i]); bank.rosetta = rosetta; for (int j = 0; j < bank.phrase.Length; ++j) { rosetta.registerString(bank.extra + bank.wisdom + bank.subWisdom + j, bank.phrase [j]); } } PrefabUtility.SaveAsPrefabAssetAndConnect(rosetta.gameObject, "Assets/Prefabs/Rosetta.prefab", InteractionMode.AutomatedAction); }
public static void NotifyAllSubscribers <T>(string a_message, T a_arg, bool a_holdMessage = false, bool a_excludeTypeT = false) { Type typeT = typeof(T); TryAddTypedSubscription <T>(); foreach (Type type in m_knownTypes) { if (a_excludeTypeT && type == typeT) { continue; } else if (Rosetta.TryGetExplicitCastFromTo(typeT, type, out MethodInfo o_implicit)) { dynamic arg = o_implicit == null ? a_arg : o_implicit.Invoke(null, new object[] { a_arg }); //Rosetta.InvokeGenericMethodAsType(null, "NotifySubscribers", new object[] { a_message, arg, a_holdMessage }, typeof(Catalogue<>), type); } } }
public object getElement(int c, int r) { if (rosetta == null) { rosetta = GameObject.Find("RosettaWrapper").GetComponent <RosettaWrapper> ().rosetta; } object res = 0; if (column [c].getType() == TypeInteger) { FGIntColumn intCol = (FGIntColumn)column [c]; res = intCol.getRow(r); } else if (column [c].getType() == TypeString) { FGStringColumn strCol = (FGStringColumn)column [c]; res = rosetta.retrieveString(strCol.rosettaPrefixName, r).Replace("\\n", "\n\n");; } return(res); }
// void Awake() // { // // } // Use this for initialization void Start() { estado = "logo"; elapsedTime = 0.0f; beginTime = 0.0f; mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); tocaParaEmpezar.SetActive(false); // loadingStringBank.rosetta = rosetta; // loadingStringBank.reset (); // loadingText.text = loadingStringBank.getNextString (); // touchToStartText.text = loadingStringBank.getNextString (); // touchToStartText.GetComponent<Renderer> ().enabled = false; count = 0; elapsedTimeTitle = 0.0f; state = 0; aspect = ((float)Screen.width) / ((float)Screen.height); theCamera.fieldOfView = minFOV + (1.0f - (aspect - minAspect) / (maxAspect - minAspect)) * (maxFOV - minFOV); if (Version.mustShowVersion()) { vText.text = Version.getVersionString(); } else { vText.enabled = false; } // mcRef.setVolume (0); // mcRef.selectMixer (2); // mcRef.attachMusic (music); //mcRef.playMusic (2); // mcRef.setVolume (1, 3); }
void Awake() { locationName = SceneManager.GetActiveScene().name; Debug.Log("Setting location name to: " + locationName); mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript>(); ds = mcRef.getStorage(); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); GameObject PlayerGO = GameObject.Find("Player"); if (PlayerGO != null) { player = PlayerGO.GetComponent <PlayerScript> (); } footstepMngr = GameObject.Find("FootstepSoundManager").GetComponent <FootstepSoundManager> (); GameObject cam = GameObject.Find("Main Camera"); if (cam != null) { cameraGrab = cam.GetComponent <CameraUtils> (); } string savedSound = ds.retrieveStringValue("GroundType"); if (!savedSound.Equals("")) { footstepMngr.setGroundType(savedSound); } else { if (!groundType.Equals("")) { footstepMngr.setGroundType(groundType); } } aSource = this.GetComponent <AudioSource> (); }
public void go() { StringBank[] allStringBanks = GameObject.FindObjectsOfType(typeof(StringBank)) as StringBank[]; Rosetta rosetta = GameObject.Find("RosettaWrapper").GetComponent <RosettaWrapper> ().rosetta; for (int i = 0; i < allStringBanks.Length; ++i) { StringBank bank = (StringBank)(allStringBanks [i]); bank.rosetta = rosetta; for (int j = 0; j < bank.phrase.Length; ++j) { rosetta.registerString(bank.extra + bank.wisdom + bank.subWisdom + "_" + j, bank.phrase [j]); } } Object prefab = PrefabUtility.CreateEmptyPrefab("Assets/Prefabs/Rosetta.prefab"); PrefabUtility.ReplacePrefab(rosetta.gameObject, prefab, ReplacePrefabOptions.ConnectToPrefab); }
public override void OnInspectorGUI() { DrawDefaultInspector(); Rosetta rosRef = (Rosetta)target; if (rosRef.data.Count == 0) { rosRef.reset(); } RosettaHashDict currentTranslation = rosRef.data[rosRef.currentTranslationIndex]; GUI.backgroundColor = Color.red; EditorGUILayout.LabelField("Dict data: " + currentTranslation); EditorGUILayout.LabelField("Dict data.data: " + currentTranslation.data); GUI.backgroundColor = Color.white; if (GUILayout.Button("Reset")) { rosRef.reset(); } EditorGUILayout.LabelField("Number of translations loaded: " + rosRef.nTranslations); EditorGUILayout.LabelField("Number of strings per translation: " + rosRef.nStrings); EditorGUILayout.LabelField("First level hash size: " + rosRef.firstLevelHashSize); EditorGUILayout.LabelField("Second level hash size: " + rosRef.secondLevelHashSize); EditorGUILayout.LabelField("Current locale: " + currentTranslation.localeName); string[] translationList = rosRef.getLoadedTranslationsNames(); rosRef.currentTranslationIndex = EditorGUILayout.Popup(rosRef.currentTranslationIndex, translationList); rosRef.setLocale(rosRef.data [rosRef.currentTranslationIndex].localeName); rosRef.deletePrefix = GUILayout.TextField(rosRef.deletePrefix, GUILayout.Width(200)); if (GUILayout.Button("Delete prefix", GUILayout.Width(200))) { rosRef.deleteStringsByPrefix(); } if (GUILayout.Button("Export to clipboard", GUILayout.Width(200))) { EditorGUIUtility.systemCopyBuffer = rosRef.translationToString(); } if (GUILayout.Button("Import from clipboard", GUILayout.Width(200))) { AllTerrainParser parser = new AllTerrainParser(EditorGUIUtility.systemCopyBuffer + "%%%%%%%%%"); // parse locale name parser.setParserMode(ParserMode.begin); parser.scanToChar(':'); parser.setParserMode(ParserMode.end); parser.scanToNextValidChar(); parser.scanUntilValidChar(); parser.setParserMode(ParserMode.begin); parser.scanToNextValidChar(); string newLocaleName = parser.extract(); if (newLocaleName.Length == 0) // parse failed { goto parseEnd; } RosettaHashDict targetDict = null; // See if locale already exists int dictionaryIndex = 0; for (int loc = 0; loc < rosRef.data.Count; ++loc) { if (rosRef.data [loc].localeName.Equals(newLocaleName)) { targetDict = rosRef.data [loc]; dictionaryIndex = loc; } continue; } // If it doesn't exist, add it if (targetDict == null) { targetDict = new RosettaHashDict(); targetDict.initialize(rosRef.firstLevelHashSize, rosRef.secondLevelHashSize); targetDict.localeName = newLocaleName; rosRef.data.Add(targetDict); dictionaryIndex = rosRef.data.Count - 1; } string newKey = "", newTranslation = ""; // start parsing key:translation pairs do { parser.scanToNextLine(); parser.setParserMode(ParserMode.end); parser.scanToChar(':'); parser.addOffset(-1); newKey = parser.extract(); newKey = newKey.Trim(); parser.scanToChar('\"'); parser.scanToChar('\"'); parser.setParserMode(ParserMode.begin); parser.scanToChar('\"'); // parse default string parser.setParserMode(ParserMode.end); parser.scanToChar('\"'); parser.addOffset(-1); parser.setParserMode(ParserMode.begin); parser.scanToChar('\"'); newTranslation = parser.extract(); bool valid = true; if (newTranslation.Length == 0) { valid = false; } for (int w = 0; w < newTranslation.Length; ++w) { if ((newTranslation[w] != '\n') && (newTranslation[w] != ' ') && (newTranslation[w] != '-') && (newTranslation[w] != '>')) { valid = false; continue; } } // if translation field is valid... if (valid) { parser.setParserMode(ParserMode.end); parser.scanToChar('\"'); parser.scanToChar('\"'); parser.addOffset(-1); parser.setParserMode(ParserMode.begin); parser.scanToChar('\"'); newTranslation = parser.extract(); newKey = newKey.Trim(); rosRef.registerString(newKey, newTranslation, dictionaryIndex); } else { parser.rewindEndHead(); // and loop over } parser.setParserMode(ParserMode.begin); } while(newTranslation.Length > 0); } parseEnd: // if (GUILayout.Button("Update prefab (Create instance first!)")) { // // // Object prefab = PrefabUtility.CreateEmptyPrefab ("Assets/Prefabs/Rosetta.prefab"); // PrefabUtility.ReplacePrefab (rosRef.gameObject, prefab, ReplacePrefabOptions.ConnectToPrefab); // // // } int t = 06; }
new void Start() { rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); ds = mcRef.getStorage(); mcRef.playMusic("QAMusic"); /* retrieve status from MasterController general storage */ /*enabled = new bool[qa.Length]; * for (int i = 0; i < qa.Length; ++i) { * * enabled [i] = mcRef.getStorage ().retrieveBoolValue ("QuestionSetIsEnabled" + i); * * } * * header = new int[qa.Length]; * for (int i = 0; i < qa.Length; ++i) { * * header [i] = mcRef.getStorage ().retrieveIntValue ("QuestionSetHeader" + i); * * }*/ keyChannel = ds.retrieveIntValue("CurrentFlameIndex"); nLevel = ds.retrieveIntValue("Level"); if (nLevel == 0) { nLevel = 1; } imageSwitch.setChannel(keyChannel); keyImage.GetComponent <Image> ().sprite = imageSwitch.getSprite(); string sss = obtainTexts.getStringId(keyChannel); youGotAKeyText.GetComponent <Text> ().text = rosetta.retrieveString(sss); state = QAControllerState.idle; questionLetterOutput = 0.0f; elapsedTime = 0.0f; answerGO = new GameObject[maxAnswers]; currentQuestion = 0; //string curLev = ds.retrieveStringValue ("CurrentLevel"); //int n = ds.retrieveIntValue (curLev + "NumberOfKeys"); // int n = ds.retrieveIntValue ("GlobalQACounter"); // ds.storeIntValue ("GlobalQACounter", n + 1); // // n = FirstSetIndex + (n % (LastSetIndex-FirstSetIndex+1)) - 1; // // bankIndex = n; qa = QAHelper.getNextBank(); qa.reset(); qb = qa.getNextBank(); qb.reset(); nMisses = 0; flowerAnim = flower.GetComponent <Animator> (); spark1Anim = spark1.GetComponent <Animator> (); spark2Anim = spark2.GetComponent <Animator> (); spark3Anim = spark3.GetComponent <Animator> (); keyImageFader = keyImage.GetComponent <UIImageFader> (); youGotAKeyTextFader = youGotAKeyText.GetComponent <UITextFader> (); particles.Stop(); spark1.transform.localScale = Vector3.zero; spark2.transform.localScale = Vector3.zero; spark3.transform.localScale = Vector3.zero; }
public override void Refresh() { var image = gameObject.GetComponent <SpriteRenderer>(); image.sprite = Rosetta.IsDefault() ? _devSprite : Rosetta.GetSprite(ResName, I18NSpace); }
public void reset() { mc = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); currentAlphaCurtain = alphaCurtains [0]; currentCurtainPosition = targetCurtainPosition = rightClosedCurtain; currentAlphaCurtain.transform.position = new Vector3(currentCurtainPosition, currentAlphaCurtain.transform.position.y, currentAlphaCurtain.transform.position.z); amountRequired = mc.getStorage().retrieveIntValue("TVFerfuflosAmount"); adsAnim = ads.GetComponent <Animator> (); // do not always start at the beginning... adsAnim.SetFloat("offset", FloatRandom.floatRandomRange(0.0f, 1.0f)); answer.text = ""; state = 0; chipScale = 1.0f; opacity = 0.0f; whiteCard.GetComponent <Image>().color = new Color(1, 1, 1, 0); blackCard.GetComponent <Image> ().color = new Color(1, 1, 1, 0); chip.GetComponent <Image> ().color = new Color(1, 1, 1, 0); whiteHalo.color = new Color(1, 1, 1, 0); blackHalo.color = new Color(1, 1, 1, 0); answer.GetComponent <Renderer> ().material.SetColor("_Tint", new Color(1, 1, 1, 0)); assertion.GetComponent <Renderer> ().material.SetColor("_Tint", new Color(1, 1, 1, 0)); transmission.GetComponent <Renderer> ().material.SetColor("_Tint", new Color(1, 1, 1, 0)); chipOnWhite = chipOnBlack = false; // //propositionBank = stringBanks [0].bank [0]; //wiseAnswers = stringBanks [0].bank [2]; /* just in case */ propositionBank.rosetta = rosetta; propositionBank.reset(); //wiseAnswers.rosetta = rosetta; transmissionBank.rosetta = rosetta; transmissionBank.reset(); //propositionBank.reset (); //wiseAnswers.reset (); chipInserted = false; // update number of screen id usage foreach (StringBank sb in sabias) { sb.rosetta = rosetta; sb.reset(); } foreach (StringBank sb in ignorantes) { sb.rosetta = rosetta; sb.reset(); } chip.transform.position = chipRelaxPos; chipCurrentPos = chipRelaxPos; chip.transform.localScale = Vector3.one; }
new void Start() { rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta>(); state = WordFightControllerState.delay0; chispaStuff.rosetta = rosetta; chispaStuff.reset(); elapsedTime = 0.0f; //difficulty = 1.0f; GenericGoodStuffBank.rosetta = rosetta; GenericNaughtyStuffBank.rosetta = rosetta; GenericGoodStuffBank.reset(); GenericNaughtyStuffBank.reset(); mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); ds = mcRef.getStorage(); cam = GameObject.Find("Main Camera").GetComponent <CameraManager> (); cam.lookingTarget = false; string wis = ds.retrieveStringValue("WordFightRequiredWisdom"); //if (!wis.Equals ("")) { // requiredWisdom = wis; //} requiredWisdom = wis; if (requiredWisdom.Equals("Warrior")) { specificGoodStuff = WarriorGoodStuff; specificNaughtyStuff = WarriorNaughtyStuff; } else if (requiredWisdom.Equals("Philosopher")) { specificGoodStuff = PhilosopherGoodStuff; specificNaughtyStuff = PhilosopherNaughtyStuff; } else if (requiredWisdom.Equals("Wizard")) { specificGoodStuff = WizardGoodStuff; specificNaughtyStuff = WizardNaughtyStuff; } else if (requiredWisdom.Equals("Sage")) { specificGoodStuff = SageGoodStuff; specificNaughtyStuff = SageNaughtyStuff; } else if (requiredWisdom.Equals("Explorer")) { specificGoodStuff = ExplorerGoodStuff; specificNaughtyStuff = ExplorerNaughtyStuff; } else if (requiredWisdom.Equals("Master")) { specificGoodStuff = MasterGoodStuff; specificNaughtyStuff = MasterNaughtyStuff; } else if (requiredWisdom.Equals("Yogi")) { specificGoodStuff = YogiGoodStuff; specificNaughtyStuff = YogiNaughtyStuff; } tutorialMode = !ds.retrieveBoolValue("WordFightTutorialDone"); //ds.storeBoolValue ("CurrentLevelHasHeroWarrior", true); //ds.storeBoolValue ("CurrentLevelHasHeroPhilosopher", true); //ds.storeBoolValue ("CurrentLevelHasHeroWizard", true); //tutorialMode = true; justYin.GetComponent <Renderer> ().enabled = false; justYang.GetComponent <Renderer> ().enabled = false; //blackSquare.GetComponent<Renderer> ().enabled = false; //playerLightMat.GetComponent<Renderer>().material.SetColor ("_TintColor", new Color (1, 1, 1, 1)); //playerDarkMat.GetComponent<Renderer>().material.SetColor ("_TintColor", new Color (1, 1, 1, 0)); hero.setHealth(1.0f); //shadowLightMat.GetComponent<Renderer>().material.SetColor ("_TintColor", new Color (1, 1, 1, 0)); //shadowDarkMat.GetComponent<Renderer>().material.SetColor ("_TintColor", new Color (1, 1, 1, 1)); shadow.setHealth(1.0f); string darkMirror = ds.retrieveStringValue("CurrentMirror"); ds.storeBoolValue(darkMirror, false); substate = -5; }
// Use this for initialization new void Start() { mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); ds = mcRef.getStorage(); status = AlphabetState.initial; scrollbar.gameObject.SetActive(false); conversationList = new List <StoredConversation> (); entryList = new List <AlphabetEntry> (); lastScroll = 0.0f; StoredConversation con; int numberOfConversations = ds.retrieveIntValue("NumberOfStoredConversations"); for (int index = 0; index < numberOfConversations; ++index) { con = new StoredConversation(); con.initialize(); string title; title = ds.retrieveStringValue("TitleOfConversation" + index); con.setTitle(rosetta.retrieveString(title)); int nBubbles = ds.retrieveIntValue("LengthOfConversation" + index); for (int jindex = 0; jindex < nBubbles; ++jindex) { string contents = ds.retrieveStringValue("Conversation" + index + "_" + jindex); StoredConversationSpeaker convSpeak = StoredConversationSpeaker.player; string speaker = ds.retrieveStringValue("Conversation" + index + "_" + jindex + "Speaker"); if (speaker.Equals("Player")) { convSpeak = StoredConversationSpeaker.player; } if (speaker.Equals("NPC1")) { convSpeak = StoredConversationSpeaker.npc0; } if (speaker.Equals("NPC2")) { convSpeak = StoredConversationSpeaker.npc1; } con.addBubble(rosetta.retrieveString(contents), convSpeak); } conversationList.Add(con); } conversationBarGO = new List <GameObject> (); for (int i = 0; i < conversationList.Count; ++i) { GameObject newBar; newBar = new GameObject(); AlphabetEntry entry = newBar.AddComponent <AlphabetEntry> (); entry.theParent = container; entry.yPos = 253 - 106 - i * 100; entry.timeDelay = i * 0.25f; entry.theConversation = conversationList [i]; entry.initialize(); entry.index = i; entry.dialogueController = dialogueController; entry.theController = this.GetComponent <AlphabetController> (); conversationBarGO.Add(newBar); entryList.Add(entry); // if the list is too long, enable scrollbar if (entry.yPos < (-400 + 100)) { //scrollbar.GetComponent<Image>().enabled = true; scrollbar.gameObject.SetActive(true); } } this.isWaitingForActionToComplete = false; }