private void OnTriggerStay2D(Collider2D collision) { if (collision.tag.Contains(StringManager.TAG_PLAYER)) { BlackAlpha.ScreenFade(); Application.LoadLevel("level1"); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { FadeIn.ScreenFade(); Player.GetComponent <CharacterControl2>().Movement = false; Invoke("ResetPlayer", 1.7f); } }
private void OnTriggerStay2D(Collider2D collision) { if (collision.tag.Contains(StringManager.TAG_PLAYER)) { { isEnter = true; BlackAlpha.ScreenFade(); Invoke("ChangeCamera", BlackAlpha.fadeTime + 0.5f); } } }
// Update is called once per frame private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { cam1.SetActive(false); cam2.SetActive(true); maincam.SetActive(false); cam.SetActive(true); BlackAlpha.ScreenFade(); } }
private void OnTriggerStay2D(Collider2D collision) { if (collision.tag.Contains(StringManager.TAG_PLAYER)) { if ((Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow)) && !isEnter) { GetComponent <AudioSource>().Play(); isEnter = true; BlackAlpha.ScreenFade(); Invoke("ChangeCameraEnterTowFloor", BlackAlpha.fadeTime + 0.5f); } } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { GetComponent <BoxCollider2D>().enabled = false; Player.GetComponent <CharacterControl2>().move = 0; Player.GetComponent <CharacterControl2>().Movement = false; Invoke("RemovePlayer", 2.2f); BlackAlpha.ScreenFade(); Invoke("ChangeCamera", 1.6f); Invoke("EnterStage", 3.5f); SkyWall[0].SetActive(true); SkyWall[1].SetActive(true); music.SetActive(false); } }
// Use this for initialization void Start() { playerCtr = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterControl2>(); Animators = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator>(); Player = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); m_animator = GetComponent <Animator>(); m_animator.enabled = false; //-------------------------------- m_animator.enabled = true; playerCtr.Movement = false; Invoke("ResetPlayer", 2.3f); Invoke("Boss033", 1.6f); Invoke("StartStage", 2.8f); GetComponent <BoxCollider2D>().enabled = false; screenFade.ScreenFade(); }
public void LifeChange() { if (Boss.m_Alpha > 0.5f) { --m_Life; LifeImage.fillAmount = m_Life / 10.0f; } if (m_Life == 0) {//boss死亡 Destroy(Boss.gameObject); Destroy(Boss2.gameObject); BossLife.SetActive(false); BlackAlpha.ScreenFade(); Invoke("ChangeCamera", 1.6f); wall.SetActive(false); music.SetActive(true); XiaoJiangShi.GetComponent <Animator>().SetBool("fear", false); } }
private void ShowMask() { BlackAlpha.ScreenFade(); Invoke("ToLevel01", BlackAlpha.fadeTime * 1.5f); }