public void Awake() { if (SaveControl.GetInt("GhostForm") == 1) { DirectGhostForm(); } }
private void Awake() { if (ActivateKey != "" && !Active && SaveControl.GetInt(ActivateKey) == 1) { Active = true; } }
// Update is called once per frame void Update() { if (Character.Main.GhostForm) { TEXT.text = "Ghost Form"; int a = (int)SaveControl.GetFloat("GhostTimeII"); if (a >= 0) { TimeText.text = a.ToString(); } else { TimeText.text = ""; } } else { TEXT.text = ""; int a = (int)SaveControl.GetFloat("GhostTime"); if (a >= 0) { TimeText.text = a.ToString(); } else { TimeText.text = ""; } } }
public void LoadNumbers() { for (int i = 0; i < CurrentNumbers.Count; i++) { CurrentNumbers[i] = SaveControl.GetInt("Number" + i); } }
public override void Effect() { base.Effect(); SaveControl.SetString("Room", RoomKey); SaveControl.SetInt("Entrance", EntranceIndex); OutlinersControl.Main.ChangeLevel(); }
public void SaveNumbers() { for (int i = 0; i < CurrentNumbers.Count; i++) { SaveControl.SetInt("Number" + i, CurrentNumbers[i]); } }
public void Awake() { if (SaveControl.GetInt(Key) == 1) { IO.gameObject.SetActive(false); Destroy(IO.gameObject); } }
// Update is called once per frame void Update() { RenderNumbers(); if (SaveControl.GetFloat("GhostTime") <= 0 && !AlreadyLoaded) { AlreadyLoaded = true; OutlinersControl.Main.ChangeLevel(); } }
public void Awake() { if (SaveControl.GetInt(KillKey) == 1) { AnimBase.SetActive(false); C2D.enabled = false; Destroy(gameObject); } }
public void Awake() { if (GameObject.FindGameObjectsWithTag("SaveControl").Length > 1 && Main != this) { Destroy(gameObject, 0.1f); return; } Main = this; DontDestroyOnLoad(gameObject); }
public void GhostForm() { if (!GhostControl) { return; } SaveControl.SetInt("GhostForm", 1); Character.Main.SetGhostForm(true); GhostFormEffectAnim.SetTrigger("GhostForm"); KillProtectTime = 1.5f; }
public void Ini() { int i = SaveControl.GetInt("Entrance"); if (Entrances.Count <= i) { i = 0; } Character.Main.SetPosition(Entrances[i].GetCharacterPosition().x, Entrances[i].GetCharacterPosition().y); Character.Main.SetDirection(Entrances[i].direction); OutlinersControl.Main.SetRoom(this); }
public void Kill() { /* * Anim.SetBool("Kill", true); * Destroy(gameObject, 10);*/ C2D.enabled = false; SaveControl.SetInt(KillKey, 1); Character.Main.StartKill(); OutlinersControl.Main.CreateKillEffect(TargetPoint.transform.position); Destroy(gameObject, KillDelay); }
public void OnMouseDown() { if (AlreadyDead) { return; } AlreadyDead = true; Anim.SetBool("Coin", true); SaveControl.SetInt("Coin", SaveControl.GetInt("Coin") + 1); SaveControl.SetInt("PuzzleFinished", 1); }
public void Awake() { if (SaveControl.GetString("Room") == Key) { Base.SetActive(true); Ini(); } else { Base.SetActive(false); } }
public void ChangeBack() { SaveControl.SetInt("GhostForm", 0); Character.Main.SetGhostForm(false); GhostFormEffectAnim.SetTrigger("ChangeBack"); if (SaveControl.GetFloat("MaxGhostTime") > 60) { SaveControl.SetFloat("MaxGhostTime", SaveControl.GetFloat("MaxGhostTime") - 30); SaveControl.SetFloat("MaxGhostTimeII", SaveControl.GetFloat("MaxGhostTimeII") - 10); } SaveControl.SetFloat("GhostTime", SaveControl.GetFloat("MaxGhostTime")); SaveControl.SetFloat("GhostTimeII", SaveControl.GetFloat("MaxGhostTimeII")); }
public void Awake() { if (SaveControl.GetInt(Key) == 1) { if (IO) { IO.Active = true; } if (Anim) { Anim.SetBool("Active", true); } } }
// Update is called once per frame void Update() { int a = SaveControl.GetInt(Key); if (a <= 0) { Base.SetActive(false); } CountText.text = a.ToString(); if (a > 0) { Base.SetActive(true); } }
// Update is called once per frame void Update() { if (SaveControl.GetInt("GhostForm") != 1) { SaveControl.SetFloat("GhostTime", SaveControl.GetFloat("GhostTime") - Time.deltaTime); if (SaveControl.GetFloat("GhostTime") <= 0) { GhostForm(); } } else { SaveControl.SetFloat("GhostTimeII", SaveControl.GetFloat("GhostTimeII") - Time.deltaTime); if (SaveControl.GetFloat("GhostTimeII") <= 0 && !AlreadyDead) { AlreadyDead = true; ChangeScene("Defeat"); } } KillProtectTime -= Time.deltaTime; }
public override void Effect() { base.Effect(); SaveControl.SetInt(Key, SaveControl.GetInt(Key) + Change); }
public override void Effect() { base.Effect(); SaveControl.SetInt(Key, Value); }
public override bool Active() { int a = SaveControl.GetInt(Key); return(base.Active() && a <= ValueMax && a >= ValueMin); }