void Start() { saveload = GetComponent<SaveLoad>(); YUh.Sono = 100; YUh.Beth_viu = false; YUh.Escondida = false; Camera_principal = GameObject.Find("Main Camera"); Camera_beth = GameObject.Find("CameraBeth"); Player = GameObject.Find("Player"); Plight = GameObject.Find("Plight"); Plight2 = GameObject.Find("Plight2"); Seta_dir = GameObject.Find("Seta_dir"); Seta_esq = GameObject.Find("Seta_esq"); Lifebar = GameObject.Find("lifebar"); Pausemenu = GameObject.Find("Pausemenu"); B_menu = GameObject.Find("Botao_menu"); B_play = GameObject.Find("Botao_Play"); B_reset = GameObject.Find("Botao_reset"); B_pausar = GameObject.Find("Botao_Pausar"); Painel = GameObject.Find("Painel"); Loading = GameObject.Find("Loading"); Soundb = GameObject.Find("Sound"); Texto = GameObject.Find("Texto"); Caixa = GameObject.Find("Caixa"); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this){ Destroy(gameObject); } DontDestroyOnLoad (gameObject); }
void Start () { mSaveLoad = new SaveLoad(); mSaveLoad.SetMissionTextAsset(MISSION_TEXT_ASSET); mUserData = mSaveLoad.LoadUser(); mMissionData = mSaveLoad.LoadMissionData(); Application.LoadLevel("Gameplay"); }
void Awake() { SaveLoad sv = new SaveLoad (); sv.loadFileLevel (); }
private void Start() { SLManager = SaveLoad.Instance; ActualizateUI(); }
public void Settings() { effectsVolume.value = SaveLoad.LoadEffectsVolume(); soundVolume.value = SaveLoad.LoadSoundVolume(); settingsPanel.SetActive(true); }
private void GameWon() { SaveLoad.Save(GameManager.instance.time.ToString(), GameManager.instance.score.ToString(), GameManager.instance.coin.ToString()); SceneManager.LoadScene(SCREEN_TO_OPEN); }
public void OnClick() { SaveLoad.SaveHero(); }
// Use this for initialization void Start() { GetComponentInChildren <Text>().text = Convert.ToString(SaveLoad.getPlayerTemp().getOro()); }
private void Awake() { saveLoadManager = GameObject.Find("Game").GetComponent <SaveLoad>(); Camera.main.gameObject.GetComponent <CameraSmoothFollow>().enabled = true; Camera.main.gameObject.GetComponent <CameraSmoothFollow>().player = this; }
/// <summary> /// Occurs on game save. /// </summary> public override void OnSave() { // Written, 30.03.2019 SaveLoad.SerializeSaveFile(this, this.truckEngine.getSaveInfo(), fileName); }
public static void DeleteFile() { SaveLoad.Delete(0, false); DataStorage.ResetValues(); Objectives.ResetValues(); }
void Awake() { if(Instance==null){ Instance=this; } }
public void Start() { if (SaveLoadManager == null) { DontDestroyOnLoad(SaveLoadManager); SaveLoadManager = this; } else if (SaveLoadManager != this) Destroy(gameObject); Manager = FindObjectOfType<GameManager>(); Player = FindObjectOfType<PlayerController>(); Eva = GameObject.FindGameObjectWithTag("Eva"); PlatformSpawner = FindObjectOfType<SpawnManager>(); HorizontalSpawner = PlatformSpawner.GetComponent<HorizontalSpawner>(); VerticalSpawner = PlatformSpawner.GetComponent<VerticalSpawner>(); }
public void button_Reset_Save() { SaveLoad.Reset(); }
//back button code public void Menu() { SaveLoad.Save(); SceneManager.LoadScene(0); }
private void SaveCurrentLevel() { SaveLoad.GetInstance().Load(); SaveLoad.GetInstance().pData.lastLevel = LevelManager.instance.levelData.levelNumber; SaveLoad.GetInstance().Save(SaveLoad.GetInstance().pData); }
public static SaveLoad Get() { if (m_Instance == null) m_Instance = (SaveLoad)FindObjectOfType(typeof(SaveLoad)); return m_Instance; }
public TimingValueService(IConfiguration configuration, SaveLoad repo, ITimy3Reader timy3Reader) { _configuration = configuration; _repo = repo; _timy3Reader = timy3Reader; }
void Update() { AudioListener.volume = gameVolume; if (SceneManager.GetActiveScene().name != "Main Menu") { if ((SceneManager.GetActiveScene().name != "Super Seoul Ball 3D") && (startTime == -1) && (!(transform.Find("Codec").gameObject.activeInHierarchy))) { startTime = Time.time; transform.Find("Timer").gameObject.SetActive(true); } if ((SceneManager.GetActiveScene().name != "Super Seoul Ball 3D") && (transform.Find("Timer").gameObject.activeInHierarchy == true) && (finalBossKilled == false)) { currentTime = Time.time - startTime; transform.Find("Timer/Timer Minutes").GetComponent <Text>().text = ((int)(currentTime / 60)).ToString("00"); transform.Find("Timer/Timer Seconds").GetComponent <Text>().text = ((int)(currentTime % 60)).ToString("00"); transform.Find("Timer/Timer Milliseconds").GetComponent <Text>().text = (((int)(currentTime * 100f) % 100)).ToString("00"); } if (Input.GetButtonDown("Start")) { transform.Find("Global Menu").gameObject.SetActive(!transform.Find("Global Menu").gameObject.activeInHierarchy); } try { levelCompleted = GameObject.Find("levelCompleted").gameObject; if (levelCompleted != null) { if (levelTesting != null) { Destroy(levelCompleted); StartCoroutine(fadeOutSpecial()); } else if (SceneManager.GetActiveScene().buildIndex == 9) { SaveLoad.Load(); if (currentTime > SaveLoad.bestScore) { SaveLoad.bestScore = currentTime; SaveLoad.Save(); } Destroy(levelCompleted); StartCoroutine(fadeOutSpecial()); } else { Destroy(levelCompleted); StartCoroutine(fadeOut()); } } } catch (NullReferenceException e) { } } else { if (levelTesting != null) { Destroy(levelTesting); } transform.Find("Fade").GetComponent <Canvas>().sortingOrder = 8; transform.Find("Fade/Fade").gameObject.SetActive(false); Destroy(transform.gameObject); } }
public void ResetLevelProgress() { SaveLoad.levelsUnlocked = 1; SaveLoad.Save(); FindObjectOfType <SaveLoadManager>().RefreshUnlockedLevels(); }
private void Awake() { GMInst = GameObject.Find("-GM"); saveload = GMInst.GetComponent <SaveLoad>(); }
/* *@brief : all the functions call when the player tap play */ public void launchGame() { SaveLoad.Load(); setPlayer(); }
public void Initialize() { //Debug.Log ( System.IO.Directory.GetFiles(Application.dataPath + LevelData.DIRECTORY)[0]); CreateLevel(SaveLoad.Load <LevelData> (System.IO.Directory.GetFiles(Application.dataPath + LevelData.DIRECTORY)[0])); }
void optionListener() { SaveLoad.clearSave(); }
void Start() { SetVolumes(SaveLoad.GetInstance().pData.musicValue); AudioListener.pause = SaveLoad.GetInstance().pData.musicMute; }
void lootListener() { SaveLoad.chargeLoot(); }
private bool IsFirstTime() { return(SaveLoad.IsFirstTime()); }
public void saveState(string filename) { state.reset(); state.failures++; SaveLoad.Save(state, filename); }
private void gStateUpdate() { #region Menu State if (this.gState == GameState.Menu) { this.menu.Update(mouseInput); // Update Main Menu Option Highlight *IF* user is currently in MENU. if (menu.GetChoice() == MenuChoice.Play && mouseInput.IsLeftClicked() == true) { gState = GameState.Playing; } else if (menu.GetChoice() == MenuChoice.Help && mouseInput.IsLeftClicked() == true) { gState = GameState.Help; } else if (menu.GetChoice() == MenuChoice.Editor && mouseInput.IsLeftClicked() == true) { this.editorGUI = new Editor.EditorGUI(32, 22, false); this.editorGUI.LoadContent(Content); gState = GameState.Editor; this.editorGUI.Show(); } else if (menu.GetChoice() == MenuChoice.Exit && mouseInput.IsLeftClicked() == true) { this.Exit(); } else if (menu.GetChoice() == MenuChoice.Load && mouseInput.IsLeftClicked() == true) { this.saveLoad = new SaveLoad(hero, xMap, yMap); this.saveLoad.LoadGame(this.hero, this, this.Content); } } #endregion #region Help State else if (gState == GameState.Help) { if (keyboardInput.Pressed(Keys.Escape)) { gState = GameState.Menu; } } #endregion #region Editor State else if (gState == GameState.Editor) { if (keyboardInput.Pressed(Keys.Escape)) { this.editorGUI.Close(); gState = GameState.Menu; } this.editorGUI.UpdateInput(mouseInput, keyboardInput); } #endregion #region Playing State else if (gState == GameState.Playing) { this.hero.Update(mouseInput, keyboardInput, levels[xMap, yMap], saveLoad, gameTime); this.hero.UpdateStats(); this.Warp(this.hero); if (this.hero.isAlive == false) { ReinitializeGame(); this.gState = GameState.Dead; } if (keyboardInput.Pressed(Keys.Escape)) { gState = GameState.Pause; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "slime") { this.fight.ResetFight(hero, new Slime(Content)); this.gState = GameState.Fight; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "wizard") { this.fight.ResetFight(hero, new Wizard(Content)); this.gState = GameState.Fight; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "necromancer") { this.fight.ResetFight(hero, new Necromancer(Content)); this.gState = GameState.Fight; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "bird") { this.fight.ResetFight(hero, new Bird(Content)); this.gState = GameState.Fight; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "goblin") { this.fight.ResetFight(hero, new Goblin(Content)); this.gState = GameState.Fight; } if (this.levels[xMap, yMap].CollideWith(this.hero.collisionRect) == "store") { this.gState = GameState.Store; } if (keyboardInput.Pressed(Keys.I)) { gState = GameState.Inventory; } } #endregion #region Inventory State else if (gState == GameState.Inventory) { if (keyboardInput.Pressed(Keys.I)) { gState = GameState.Playing; } this.heroInventory.Update(mouseInput, keyboardInput); this.hero.UpdateStats(); } #endregion #region Store State else if (gState == GameState.Store) { if (keyboardInput.Pressed(Keys.Escape)) { gState = GameState.Playing; } this.hero.UpdateStats(); this.storeGUI.Update(mouseInput, keyboardInput); } #endregion #region Pause State else if (gState == GameState.Pause) { this.pause.Update(mouseInput); // Update Pause Menu Option Highlight *IF* user is currently in MENU. if (pause.GetChoice() == MenuChoice.Resume && mouseInput.IsLeftClicked() == true) { gState = GameState.Playing; } else if (keyboardInput.Pressed(Keys.Escape)) { gState = GameState.Playing; } else if (pause.GetChoice() == MenuChoice.Save && mouseInput.IsLeftClicked() == true) { this.saveLoad = new SaveLoad(hero, xMap, yMap); this.saveLoad.SaveGame(); } else if (pause.GetChoice() == MenuChoice.Load && mouseInput.IsLeftClicked() == true) { this.saveLoad = new SaveLoad(hero, xMap, yMap); this.saveLoad.LoadGame(this.hero, this, this.Content); } else if (pause.GetChoice() == MenuChoice.Menu && mouseInput.IsLeftClicked() == true) { gState = GameState.Menu; } } #endregion #region Dead State else if (gState == GameState.Dead) { if (keyboardInput.Pressed(Keys.Escape)) { gState = GameState.Menu; } } #endregion #region Fight State else if (gState == GameState.Fight) { this.fight.Update(gameTime, mouseInput, keyboardInput); if (this.fight.CheckFinished() == true) { this.levels[xMap, yMap].EntityToBlank(hero.collisionRect); this.gState = GameState.Playing; } } #endregion }
void Save() { SaveLoad.Save <List <GameObject> >(objects, "Defeated"); }
// Start is called before the first frame update void Start() { Instance = this; lastLevel = SaveLoad.Load(); Time.timeScale = 1f; }
public void Show() { musicSlider.value = SaveLoad.GetInstance().pData.musicValue; enabled = true; }
public void save() { Driver driver = Camera.main.GetComponent <Driver> (); SaveLoad.Save(); }
private void OnMute() { SaveLoad.GetInstance().pData.musicMute = true; SaveLoad.GetInstance().Save(); }
//it's static so we can call it from anywhere void Awake() { saver = this; }
private void OnNoMute() { SaveLoad.GetInstance().pData.musicMute = false; SaveLoad.GetInstance().Save(); }
void Start() { obj = GameObject.Find ("Gerenciador"); save = (SaveLoad)obj.GetComponent(typeof(SaveLoad)); }
public void save() { SaveLoad.save(rd); }