Example #1
0
    public void LightCheck(float Damage, bool Prism)
    {
        if (LightCount > 0)
        {
            LightCount -= Damage;
        }
        else if (LightCount == 0)
        {
            LightCount = 0;
            if (!Prism)
            {
                rigidbody.velocity = new Vector2(0, rigidbody.velocity.y);
                PS = PlayerState.Die;
                ui.FadeIn();
                SetItem      = false;
                render.color = new Color(render.color.r, render.color.b, render.color.b, 0);
                DieEffect.transform.position = transform.position;
                DieEffect.SetActive(true);
                rigidbody.simulated = false;

                if (SceneManager.GetActiveScene().name == "BossStage")
                {
                    camera.CameraShake();
                }
            }
        }
    }
Example #2
0
    public void DoorOn()
    {
        Off            = true;
        renderer.flipX = true;
        trap.enabled   = false;
        if (!Fall)
        {
            for (int i = 0; i < Doors.Length; i++)
            {
                if (DT == DoorType.Rock)
                {
                    Audio.OnePlay(7);
                }
                if (DT == DoorType.Wood)
                {
                    Audio.OnePlay(14);
                }
                if (DT == DoorType.Bush)
                {
                    Audio.OnePlay(13);
                }
                Doors[i].On = true;
            }
        }
        else
        {
            Rock.FallingOn();
        }

        cameraMove.CameraShake();
    }
Example #3
0
    //페이즈 1
    void Phase01()
    {
        OffDummyLazer();
        camera.CameraShake();
        Audio.OnePlay(17);
        for (int i = 0; i < Lazers.Length; i++)
        {
            Lazers[i].SetActive(true);
        }

        if (SubPhase == 0)
        {
            Invoke("Complete", Time.Phase1);
        }
        else
        {
            Invoke("SubComplete", Time.Phase1);
        }
    }