// Use this for initialization new public void Start() { base.Start(); imgControl = GameObject.Find("AlertImage").GetComponent <alertImageController> (); string[] instr0 = { "delay", "5.0" }; //string[] instr1 = { "startAction", "AlertImage", "setAlertMessage", "non-blocking", "Destroy!" }; //string[] instr2 = { "startAction", "AlertImage", "setSelfTimeout", "blocking", "3.0" }; string[] instr3 = { "sendMessage", "this", "setMatColor", "1.0", "0.0", "0.0" }; string[] instr4 = { "playSound", "insect1" }; string[] instr5 = { "playMusic", "putaMierdasDeMusica" }; this.addProgram(); this.addInstructionToProgram(instr5); this.addInstructionToProgram(instr0); //this.addCommandToProgram(instr1); //this.addCommandToProgram(instr2); this.addInstructionToProgram(instr3); this.addInstructionToProgram(instr0); this.addInstructionToProgram(instr4); this.startProgram(0); imgControl.reset(); //imgControl.setAlertMessage ("Destroy"); //imgControl.setSelfTimeout (3.0f); //waitForActionToComplete (imgControl); //state = State.FirstAlert; rendRef = this.GetComponent <Renderer> (); //matRef = this.GetComponent<Renderer> ().GetComponent<Material> (); //matRef = this.GetComponent<Material> (); //matRef.color = new Color (1.0f, 1.0f, 0.0f); rendRef.material.color = new Color(1.0f, 1.0f, 0.0f); }
// Use this for initialization void Start() { level = GameObject.Find("LevelController").GetComponent <LevelControllerScript> (); currentAmount = level.retrieveIntValue("TVFerfuflosTimes" + id); if (currentAmount == amount) { tvChannelSwitch._wm_switchChannel(1); level.storeIntValue("TVFerfuflosClearFirstTime", 1); } _wm_storeTVid(); alert = GameObject.Find("AlertImage").GetComponent <alertImageController> (); }
public void reset() { frasesTotales = nFrasesMente + nFrasesCiencia; frasesCorrectas = 0; state = 0; cienciaPart.Stop(); espirituPart.Stop(); this.programIsWaitingForActionToComplete = new List <bool> (); this.programIsWaitingForActionToComplete.Add(false); alert = GameObject.Find("AlertImage").GetComponent <alertImageController> (); nFrasesMente = espirituTabla.nRows(); nFrasesCiencia = cienciaTabla.nRows(); }
void Start() { alert = GameObject.Find("AlertImage").GetComponent <alertImageController> (); charGen = this.GetComponent <CharacterGenerator> (); mcref = GameObject.Find("MasterController").GetComponent <MasterControllerScript> (); }
new public void Start() { if (started) { return; } started = true; GameObject hud = GameObject.FindGameObjectWithTag("HUD"); if (hud != null) { dialogueController = hud.GetComponentInChildren <DialogueObject> (); alertController = hud.GetComponentInChildren <alertImageController> (); fader = hud.GetComponentInChildren <UIFaderScript> (); SetFaderColor(); vignette = hud.GetComponentInChildren <VignetteScript> (); } Application.targetFrameRate = 30; mcRef.changeLocation(locationName); if (locationName.StartsWith("Level")) { Debug.Log("<color=purple>Storing CurrentLevel : " + locationName.Substring(0, 6) + "</color>"); ds.storeStringValue("CurrentLevel", locationName.Substring(0, 6)); } if (locationName.StartsWith("Level")) { string lvl = locationName.Substring(5, 1); mcRef.getStorage().storeBoolValue("HasVisitedWorld" + lvl, true); } plyr = GameObject.Find("Player"); //GameObject hud = null; if (plyr != null) { hud = plyr.GetComponent <PlayerScript>().currentHUD; //GameObject.FindGameObjectWithTag ("HUD"); } if (hud != null) { dialogueController = hud.GetComponentInChildren <DialogueObject> (); alertController = hud.GetComponentInChildren <alertImageController> (); fader = hud.GetComponentInChildren <UIFaderScript> (); vignette = hud.GetComponentInChildren <VignetteScript> (); SetFaderColor(); } string objectToDestroy; // take care of flame re-spawning into the level int flameCount; string lvlname = SceneManager.GetActiveScene().name; for (int k = 0; k < MaxFlames; ++k) { flameCount = mcRef.getStorage().retrieveIntValue("Flame" + k + "Resurrect" + lvlname); if (flameCount > 0) { --flameCount; if (flameCount == 0) { string flamename = mcRef.getStorage().retrieveStringValue("Flame" + k + "Resurrect" + lvlname); mcRef.unPickUpObject(flamename); } mcRef.getStorage().storeIntValue("Flame" + k + "Resurrect" + lvlname, flameCount); } } /* destroy all objects that have already been picked up * on this location */ objectToDestroy = mcRef.nextPickedUpObject(); while (!objectToDestroy.Equals("")) { Debug.Log("<color=red> -> Pick up destroying " + objectToDestroy + "</color>"); Destroy(GameObject.Find(objectToDestroy)); objectToDestroy = mcRef.nextPickedUpObject(); } if (mcRef.hasCurrentLocationBeenVisited()) { //plyr.transform.position = mcRef.getPlayerSpawnLocation (); } if (openVignette) { //vignette.setVignetteScale (0.0f); if (vignette != null) { bool inhibit = retrieveBoolValue("InhibitVignette"); if (!inhibit) { vignette._wm_open(); } else { if (ds.retrieveBoolValue("FadeWhite")) { ds.storeBoolValue("FadeWhite", false); foreach (UIFaderScript fullScreenFader in fullScreenFaders) { fullScreenFader.setFadeColor(1.0f, 1.0f, 1.0f); fullScreenFader.autoFadeIn = true; fullScreenFader.setFadeValue(0.0f); fullScreenFader.fadeIn(); } } else { fader.autoFadeIn = false; fader.preventAutoFader(); fader.setFadeValue(1.0f); foreach (UIFaderScript fullScreenFader in fullScreenFaders) { fullScreenFader.setFadeValue(1.0f); fullScreenFader.autoFadeIn = false; } } } storeBoolValue("InhibitVignette", false); } } if (alertController != null) { alertController._wm_reset(); } if (!BGMusic.Equals("")) { mcRef.playMusic(BGMusic); } }
void Start() { level = GameObject.Find("LevelController").GetComponent <LevelControllerScript> (); alert = GameObject.Find("AlertImage").GetComponent <alertImageController> (); }
new void Start() { aic = GameObject.Find("AlertImage").GetComponent <alertImageController> (); lastNum = -1; }