void SetNewVideogameSettings() { VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameData(); RenderSettings.fogColor = videogameData.fog; Game.Instance.gameCamera.cam.backgroundColor = videogameData.fog; }
void SetNewVideogameSettings() { VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameData(); RenderSettings.skybox = videogameData.skybox; RenderSettings.fogColor = videogameData.fog; }
void OnBossActive(bool isOn) { VideogameData vd = Data.Instance.videogamesData.GetActualVideogameData(); if (isOn) { Game.Instance.gameCamera.cam.backgroundColor = vd.bossFog; foreach (SpriteRenderer sr in Game.Instance.gameCamera.backgrundImage) { sr.sprite = vd.bossBackgrouond; } RenderSettings.fogColor = vd.bossFog; panel.SetActive(true); state = states.IDLE; Laugh(3); } else { Game.Instance.gameCamera.cam.backgroundColor = vd.fog; foreach (SpriteRenderer sr in Game.Instance.gameCamera.backgrundImage) { sr.sprite = vd.normalBackgrouond; } RenderSettings.fogColor = vd.fog; Mad(3); } }
void SetSelected() { List <VoicesManager.VoiceData> list = VoicesManager.Instance.videogames_names; VoicesManager.Instance.PlaySpecificClipFromList(list, videgameID); videogameData = Data.Instance.videogamesData.all [videgameID]; missionSelector.LoadVideoGameData(videgameID); diskette.Init(videogameData); int _videgameID = videgameID + 1; if (_videgameID > 2) { _videgameID = 0; } VideogameData _videogameData = Data.Instance.videogamesData.all[_videgameID]; diskette2.Init(_videogameData, false); //videogameUI.Change (); if (Data.Instance.playMode == Data.PlayModes.STORYMODE) { Data.Instance.handWriting.WriteTo(credits, videogameData.credits, null); } else { Data.Instance.handWriting.WriteTo(creditsParty, videogameData.credits, null); } }
public void setMission(int num) { missions.MissionActiveID = num; int idByVideogame = missions.GetActualMissionByVideogame(); if (playMode == PlayModes.COMPETITION) { SocialEvents.OnMissionReady(num); } else { VideogameData vdata = videogamesData.GetActualVideogameData(); Mission mission = Data.Instance.missions.missions [num]; if (vdata.id == 0 && num > levelUnlocked_level_1) { levelUnlocked_level_1 = idByVideogame; PlayerPrefs.SetInt("levelUnlocked_level_1", idByVideogame); } else if (vdata.id == 1 && num > levelUnlocked_level_2) { levelUnlocked_level_2 = idByVideogame; PlayerPrefs.SetInt("levelUnlocked_level_2", idByVideogame); } } }
void InitButton(MissionButton diskette, int id) { VideogameData data = Data.Instance.videogamesData.all[id]; diskette.Init(data); diskette.SetMobile(this); diskette.GetComponent <MissionSelector>().LoadVideoGameData(id); diskette.GetHiscore(); }
public void OnInit(MissionsManager.MissionsData data) { SetSelector(false); VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameDataByID(videoGameID); logo.sprite = videogameData.logo; floppyCover.sprite = videogameData.floppyCover; int unblockedID = UserData.Instance.GetMissionUnblockedByVideogame(videoGameID + 1); if (UserData.Instance.missionUnblockedID_1 == 0 && videoGameID == 1) { unblockedID = -1; } if (UserData.Instance.missionUnblockedID_2 == 0 && videoGameID == 2) { unblockedID = -1; } if (missionID <= unblockedID || Data.Instance.isAdmin) { isBlocked = false; if (missionID == unblockedID) { Animation anim = GetComponent <Animation>(); anim[anim.clip.name].time = Random.Range(0, 300) / 10; anim.Play(); } } else { isBlocked = true; } if (isBlocked) { blocked.SetActive(true); } else { blocked.SetActive(false); } int id = missionID + 1; //field.text = "MISION " + id; if (id < 10) { field.text = "0" + id; } else { field.text = id.ToString(); } }
void SetNewVideogameSettings() { VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameData(); RenderSettings.fogColor = videogameData.fog; Game.Instance.gameCamera.cam.backgroundColor = videogameData.fog; foreach (SpriteRenderer sr in Game.Instance.gameCamera.backgrundImage) { sr.sprite = videogameData.normalBackgrouond; } }
// se usa tanto para mobile como para Standalone! public void Init(VideogameData videogameData, bool animate = true) { this.videogameData = videogameData; logo.sprite = videogameData.logo; floppyCover.sprite = videogameData.floppyCover; if (animate) { anim["MissionButtonOn"].normalizedTime = 0; anim.Play("MissionButtonOn"); } missionField.text = videogameData.name; usernameField.text = "MISSION 0"; }
// se usa tanto para mobile como para Standalone! public void Init(VideogameData videogameData, bool animate = true) { this.videogameData = videogameData; logo.sprite = videogameData.logo; floppyCover.sprite = videogameData.floppyCover; if (animate) { anim["MissionButtonOn"].normalizedTime = 0; anim.Play("MissionButtonOn"); } missionField.text = videogameData.name; usernameField.text = TextsManager.Instance.GetText("DISKETTE") + " 0"; }
public override void OnRestart(Vector3 pos) { falling = false; base.OnRestart(pos); collider.enabled = true; int newVideoGameID = Data.Instance.videogamesData.actualID; if (newVideoGameID != videoGame_ID) { if (type == types.FLOOR) { videoGame_ID = newVideoGameID; VideogameData vd = Data.Instance.videogamesData.GetActualVideogameData(); Color newColorTop = vd.floor_top; if (floor_top == null || newColorTop != floor_top) { floor_top = newColorTop; floor_border = vd.floor_border; MaterialPropertyBlock floor_top_mat = new MaterialPropertyBlock(); MaterialPropertyBlock floor_border_mat = new MaterialPropertyBlock(); render.GetPropertyBlock(floor_top_mat, 1); render.GetPropertyBlock(floor_border_mat, 0); floor_top_mat.SetColor("_Color", floor_top); floor_border_mat.SetColor("_Color", floor_border); render.SetPropertyBlock(floor_top_mat, 1); render.SetPropertyBlock(floor_border_mat, 0); // render.materials[1].color = floor_top; // render.materials[0].color = floor_border; //Renderer[] renderers = GetComponentsInChildren<Renderer>(); //foreach (Renderer r in renderers) // ChangeMaterials(r); } } else { GetComponent <Renderer>().material = Data.Instance.videogamesData.GetActualVideogameData().wallMaterial; } } }
void OnBossActive(bool isOn) { VideogameData vd = Data.Instance.videogamesData.GetActualVideogameData(); if (isOn) { Game.Instance.gameCamera.cam.backgroundColor = vd.bossFog; RenderSettings.fogColor = vd.bossFog; panel.SetActive(true); state = states.IDLE; Laugh(3); } else { Game.Instance.gameCamera.cam.backgroundColor = vd.fog; RenderSettings.fogColor = vd.fog; Mad(3); } }
IEnumerator LoadingRoutineAndroid() { VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameData(); HiscoresByMissions.MissionHiscoreUserData missionHiscoreUserData = UserData.Instance.hiscoresByMissions.GetHiscore(videogameData.id, Data.Instance.missions.MissionActiveID); string username = UserData.Instance.username; Data.Instance.voicesManager.PlaySpecificClipFromList(Data.Instance.voicesManager.UIItems, 1); Data.Instance.GetComponent <MusicManager>().OnLoadingMusic(); field.text = ""; AddText("*** MAD ROLLERS ***"); yield return(new WaitForSeconds(0.5f)); AddText("Loading " + videogameData.name + "..."); yield return(new WaitForSeconds(0.2f)); if (missionHiscoreUserData != null) { AddText("*****************"); yield return(new WaitForSeconds(0.12f)); AddText("Hiscore by:"); yield return(new WaitForSeconds(0.1f)); AddText("HACKER: " + missionHiscoreUserData.username + " [" + Utils.FormatNumbers(missionHiscoreUserData.score) + "]"); yield return(new WaitForSeconds(0.15f)); AddText("in mission_id: [" + Data.Instance.missions.MissionActiveID + "]"); AddText("*****************"); AddText(" "); yield return(new WaitForSeconds(5f)); } AddText("Buenos Aires <" + username + "> USER ALLOWING ACCESS!"); yield return(new WaitForSeconds(0.35f)); AddText(username + " -> GOTO 1985 "); UnityEngine.SceneManagement.SceneManager.LoadScene("Game"); AddText("COMPLETE!"); yield return(new WaitForSeconds(0.35f)); SetOn(false); }
// Use this for initialization public void Init(Mission mission, int id) { this.mission = mission; this.id = id; VideogameData data = Data.Instance.videogamesData.GetActualVideogameDataByID(mission.videoGameID); if (Data.Instance.playMode == Data.PlayModes.COMPETITION) { foreach (Text m in missionFields.GetComponentsInChildren <Text>()) { m.text = Data.Instance.videogamesData.GetActualVideogameDataByID(mission.videoGameID).name; } foreach (Text m in missionNames.GetComponentsInChildren <Text>()) { m.text = "COMPETITION-MODE"; } } else { foreach (Text m in missionFields.GetComponentsInChildren <Text>()) { m.text = data.name + " " + ((int)id + 1).ToString() + "/9"; } foreach (Text m in missionNames.GetComponentsInChildren <Text>()) { m.text = mission.description; } int starsQty = Data.Instance.userData.GetStars(id); stars.Init(starsQty); background.transform.localEulerAngles = new Vector3(30, 0, 0); } logo.sprite = data.logo; floppyCover.sprite = data.floppyCover; }
public void Clicked(int videoGameID, int MissionActiveID) { if (clicked) { return; } clicked = true; if (Data.Instance.playMode == Data.PlayModes.SURVIVAL) { Data.Instance.playMode = Data.PlayModes.STORYMODE; } //print("videogame: " + videoGameID + " MissionActiveID: " + MissionActiveID); if (Data.Instance.playMode == Data.PlayModes.STORYMODE) { foreach (MissionButtonMobile mbm in allButtons) { if (mbm.videoGameID == Data.Instance.videogamesData.actualID && mbm.missionID == Data.Instance.missions.MissionActiveID) { if (mbm.isBlocked) { ClickedABlockedButton(); return; } } } } Data.Instance.events.OnSoundFX("whip", -1); List <VoicesManager.VoiceData> list = VoicesManager.Instance.videogames_names; VoicesManager.Instance.PlaySpecificClipFromList(list, videoGameID); if (canvas != null) { canvas.enabled = false; } string m = (MissionActiveID + 1).ToString(); if (Data.Instance.playMode == Data.PlayModes.PARTYMODE) { m = (Data.Instance.multiplayerData.levelID_for_partyMode + 1).ToString(); } if (MissionActiveID < 10) { disketteField.text = "0" + m; } else { disketteField.text = m; } VideogameData videogameData = Data.Instance.videogamesData.GetActualVideogameDataByID(videoGameID); disketteLogo.sprite = videogameData.logo; disketteFloppy.sprite = videogameData.floppyCover; Data.Instance.videogamesData.actualID = videoGameID; Data.Instance.missions.MissionActiveID = MissionActiveID; anim.Play("levelSelectorOn"); StartCoroutine(LoadGame()); Data.Instance.events.SetHamburguerButton(false); }