void Awake() { Counts = SaveSystem.GetInstance().generalCounts; Counts.Index = 0; SaveSystem.GetInstance().SaveState(); LoadScene(); }
void Start() { Counts = SaveSystem.GetInstance().generalCounts; player_mov = PlayerPosition.GetComponent <MovimentPlayer>(); DF = GetComponent <DisplayFrase>(); fullhealth = health; agent = GetComponent <NavMeshAgent>(); skills = new List <Skills>(); hoScript = GetComponent <HeartOrbit>(); Orbit = new Skills(hoScript.getProb(), hoScript.getCD(), true, hoScript.Expansion); skills.Add(Orbit); hlScript = GetComponent <HeartLaunch>(); Launch = new Skills(hlScript.getProb(), hlScript.getCD(), false, hlScript.Launch); skills.Add(Launch); hcScript = GetComponent <HeartClap>(); Clap = new Skills(hcScript.getProb(), hcScript.getCD(), false, hcScript.Clap); skills.Add(Clap); SkillCD = GetComponent <BossSkillsCD>(); anim = GetComponentInChildren <Animator>(); _rb = GetComponent <Rigidbody>(); StartCoroutine(StartBattle()); }
// Start is called before the first frame update void Start() { df = GetComponent <DisplayFrase>(); headAnimator = GetComponentInChildren <Animator>(); counts = SaveSystem.GetInstance().generalCounts; skills = new List <Skills>(); skillsCD = GetComponent <BossSkillsCD>(); exmScript = GetComponent <ExMissile>(); Missile = new Skills(exmScript.getProb(), exmScript.getCD(), false, exmScript.Shoot); skills.Add(Missile); expScript = GetComponent <ExPillar>(); Pillar = new Skills(expScript.getProb(), expScript.getCD(), false, expScript.InkPillar); skills.Add(Pillar); StartCoroutine(ResetCooldown()); HitTentacle.tentacleHit += TakeDamage; //registra a funcao TakeDamage ao evento tentacleHit }
void Start() { DF = GetComponent <DisplayFrase>(); Counts = SaveSystem.GetInstance().generalCounts; Agent = GetComponent <NavMeshAgent>(); Path = new NavMeshPath(); skills = new List <Skills>(); srScript = GetComponent <SadRain>(); spScript = GetComponent <SadPistol>(); Pistol = new Skills(spScript.getProb(), spScript.getCD(), false, spScript.Pistol); skills.Add(Pistol); srlScript = GetComponent <SadRoll>(); Roll = new Skills(srlScript.getProb(), srlScript.getCD(), false, srlScript.Roll); skills.Add(Roll); SkillCD = GetComponent <BossSkillsCD>(); anim = GetComponentInChildren <Animator>(); StartCoroutine(StartBattle()); }
void Start() { Counts = SaveSystem.GetInstance().generalCounts; NormalDialogue = GetComponent <DisplayFrase>(); CoordenadaPlayer = 0; NumberOfChoices = 0; ControlAcess = true; }
public void NewGame() { generalCounts = GameObject.Instantiate(emptySave); SaveState(); SucessfulLoad = true; string path = Path.Combine(Application.persistentDataPath, saveFileName + ".dat"); Debug.Log("new save on path:" + path); }
public void Start() { //encontra e define carinhoArea, emissor de partículas que demonstra raio dos corações ps = hearts.GetComponentInChildren <ParticleSystem>(); carinhoArea = ps.shape; Counts = SaveSystem.GetInstance().generalCounts; StartCoroutine(DestroyParticles()); }
// Start is called before the first frame update void Start() { Footsteps = GetComponent <AudioSource>(); pegadas = Footsteps.clip; _rb = GetComponent <Rigidbody>(); anim = GetComponentInChildren <Animator>(); Counts = SaveSystem.GetInstance().generalCounts; CurrentScene = SceneManager.GetActiveScene().name; }
public bool LoadState() { string path = SavePath; string versionPath = VersionSavePath; if (!File.Exists(path) || !File.Exists(versionPath)) { return(false); } using (StreamReader streamReader = File.OpenText(versionPath)) { string str = streamReader.ReadToEnd(); try { float ver = float.Parse(str); if (ver < saveVersion) { Debug.LogWarning("Warning: old save version"); return(ValidateOldSave()); } } catch (Exception e) { Debug.LogWarning("Warning: invalid save-version format" + e.Message); return(ValidateOldSave()); } } try { byte[] buffer = File.ReadAllBytes(path); for (int i = 0; i < buffer.Length; i++) { buffer[i] = (Byte)((~buffer[i]) & 0xFF); } string jsonString = Encoding.UTF8.GetString(buffer); generalCounts = ScriptableObject.CreateInstance <GeneralCounts>(); JsonUtility.FromJsonOverwrite(jsonString, generalCounts); for (int i = 0; i < generalCounts.EventsStrings.Count; i++) { generalCounts.Events.Add(generalCounts.EventsStrings[i], generalCounts.EventsBools[i]); } for (int i = 0; i < generalCounts.StatsStrings.Count; i++) { generalCounts.Stats.Add(generalCounts.StatsStrings[i], generalCounts.StatsInts[i]); } SucessfulLoad = true; return(true); } catch (Exception e) { Debug.LogWarning("Unable to load savefile " + e.Message); return(false); } }
void Start() { Counts = SaveSystem.GetInstance().generalCounts; Canvas.SetActive(false); DeathScreen.SetActive(false); PauseMenuUI.SetActive(false); GameConfigUI.SetActive(false); CurrentScene = SceneManager.GetActiveScene().name; player_particle = player.transform.GetChild(0).Find("DeathParticle").GetComponent <ParticleSystem>(); player_particle.Stop(); player_particle.Clear(); }
void Start() { statsObject.transform.parent.gameObject.SetActive(false); Counts = SaveSystem.GetInstance().generalCounts; stats = new StatsObject[5]; for (int i = 0; i < stats.Length; i++) { stats[i].ValuesText = statsObject.transform.GetChild(i + 2).GetChild(0).GetComponent <Text>(); stats[i].LabelText = statsObject.transform.GetChild(i + 2).GetChild(1).GetComponent <Text>(); stats[i].CoverImage = statsObject.transform.GetChild(i + 2).GetChild(3).GetChild(1).gameObject; } }
// Start is called before the first frame update void Start() { Counts = SaveSystem.GetInstance().generalCounts; if (Counts.CarinhoIsMorto) { PortalCarinho.GetComponent <PortalScript>().CanEnter = false; } if (Counts.TristezaIsMorto) { PortalTristeza.GetComponent <PortalScript>().CanEnter = false; } if (Counts.ExpressividadeIsMorto) { portalExpressividade.GetComponent <PortalScript>().CanEnter = false; } }
public void NewGame() { save.NewGame(); Counts = save.generalCounts; foreach (string s in EventKeys) { Counts.Events.Add(s, true); Counts.EventsStrings.Add(s); Counts.EventsBools.Add(true); } foreach (string s in CounterKeys) { Counts.Stats.Add(s, 0); Counts.StatsStrings.Add(s); Counts.StatsInts.Add(0); } LoadingSceneControl.CurrentScene = "Hub"; SceneManager.LoadScene("LoadingScene", LoadSceneMode.Single); }
void Start() { DF = GetComponent <DisplayFrase>(); Counts = SaveSystem.GetInstance().generalCounts; Level = 0; Charger = 0; CurrentHP = HitPoints; skills = new List <Skills>(); SkillCD = GetComponent <NewBossSkillCD>(); PFScript = GetComponent <PunchFloor>(); Floor = new Skills(100, PFScript.GetCD(), true, PFScript.Floor); skills.Add(Floor); PFOScript = GetComponent <PunchFollow>(); Follow = new Skills(100, PFOScript.GetCD(), true, PFOScript.Follow); skills.Add(Follow); PPScript = GetComponent <PunchPrison>(); Prison = new Skills(100, PPScript.GetCD(), true, PPScript.Prison); //skills.Add(Prison); PRScript = GetComponent <PunchRain>(); Rain = new Skills(100, 0, true, PRScript.Rain); PUScript = GetComponent <PunchUltimate>(); Ultimate = new Skills(100, 0, true, PUScript.Ultimate); anim = GetComponentInChildren <Animator>(); StartCoroutine(ResetCooldown()); Platform(); }
void Start() { Counts = SaveSystem.GetInstance().generalCounts; }
// Start is called before the first frame update void Start() { _rb = GetComponent <Rigidbody>(); anim = GetComponentInChildren <Animator>(); Counts = SaveSystem.GetInstance().generalCounts; }
public void ClearState() { generalCounts = GameObject.Instantiate(emptySave); }
void Start() { SceneTheme.Play(); Counts = SaveSystem.GetInstance().generalCounts; }
void Start() { mp = Player.GetComponent <MovimentPlayer>(); Counts = SaveSystem.GetInstance().generalCounts; }
void Start() { Counts = SaveSystem.GetInstance().generalCounts; Chat = ChatBox.transform.GetChild(0).GetComponent <Text>(); anim = GetComponentInChildren <Animator>(); }