예제 #1
0
    public void OnTriggerEnter(Collider other)
    {
        CyclopsPlayer rPlayer = other.GetComponentInParent <CyclopsPlayer>();

        if (rPlayer)
        {
            rPlayer.StartEyeBlast();
        }
    }
예제 #2
0
    void OnTriggerEnter(Collider collider)
    {
        Rigidbody     rColRigid = collider.GetComponent <Rigidbody>();
        CyclopsPlayer rPlayer   = collider.GetComponent <CyclopsPlayer>();

        if (rColRigid && !rPlayer)
        {
            rColRigid.AddExplosionForce(500, transform.position, m_dMaxDiameter);
        }
    }
예제 #3
0
    private void OnTriggerEnter(Collider other)
    {
        CyclopsPlayer rPlayer = other.GetComponentInParent <CyclopsPlayer>();

        if (rPlayer)
        {
            rPlayer.m_dSHOOTEYEBLASTS = false;

            rPlayer.SetFinishedLevel();
            Destroy(transform.root.gameObject);
        }
    }
예제 #4
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Explosion")
        {
            gameOverScreen.gameObject.SetActive(true);

            isGameOver = true;

            GameObject rPlayer = GameObject.FindGameObjectWithTag("Player");

            if (rPlayer)
            {
                CyclopsPlayer rCyclops = rPlayer.GetComponent <CyclopsPlayer>();
                if (rCyclops)
                {
                    //rCyclops.ResetLevelOnNextBlink();
                }

                StartCoroutine(GameOverScreen_Cor());
            }
        }
    }