Example #1
0
    public void Continue()
    {
        Time.timeScale = 1;
        WadeMachine wade = GameObject.Find("Wade").GetComponent <WadeMachine>();

        wade.inPause = false;
        Destroy(gameObject);
    }
Example #2
0
    private void OnTriggerExit(Collider other)
    {
        WadeMachine wade = other.GetComponent <WadeMachine>();

        if (wade != null)
        {
            canUse = false;
        }
    }
Example #3
0
    public void RestartPause()
    {
        Time.timeScale = 1;
        WadeMachine wade = GameObject.Find("Wade").GetComponent <WadeMachine>();

        wade.inPause = false;
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        Destroy(gameObject);
    }
Example #4
0
    private void OnTriggerEnter(Collider other)
    {
        WadeMachine wade = other.GetComponent <WadeMachine>();

        if (wade != null)
        {
            wade.DoTakeDamage(hitPower);
        }
        print("dfdfs");
    }
Example #5
0
    // Use this for initialization
    void Start()
    {
        lockOnInstance = Instantiate(lockOnIndicator, PlayerTarget.transform.position + transform.forward * 50, PlayerTarget.transform.rotation);
        Vector3 rot = transform.localRotation.eulerAngles;

        heading = rot.y;
        tilt    = 360;
        input   = PlayerTarget.GetComponent <WadeInputs>();
        machine = PlayerTarget.GetComponent <WadeMachine>();
        target  = followTarget.transform;
    }
Example #6
0
    private void OnTriggerEnter(Collider other)
    {
        WadeMachine wade = other.GetComponent <WadeMachine>();

        if (wade != null)
        {
            wade.pearls += 1;

            Destroy(gameObject);
        }
    }
Example #7
0
    private void OnTriggerEnter(Collider other)
    {
        WadeMachine wade = other.GetComponent <WadeMachine>();

        if (wade != null)
        {
            if (!isHealth)
            {
                wade.ChangeWeapon(placeInList);
                Destroy(gameObject);
            }
            else
            {
                wade.health = wade.startHealth;
                Destroy(gameObject);
            }
        }
    }
    private void OnTriggerEnter(Collider other)
    {
        Enemy              enemy  = other.gameObject.GetComponent <Enemy>();
        WadeMachine        wade   = other.gameObject.GetComponent <WadeMachine>();
        WadeBoatController boat   = other.gameObject.GetComponent <WadeBoatController>();
        BulletStandard     bullet = other.gameObject.GetComponent <BulletStandard>();
        Slash              slash  = other.gameObject.GetComponent <Slash>();
        AudioTrigger       mt     = other.gameObject.GetComponent <AudioTrigger>();

        if (!slash)
        {
            if (wade)
            {
                if (!wadesBullet)
                {
                    wade.DoTakeDamage(damage);
                    Instantiate(explosionEffect, transform.position, transform.rotation);
                    Destroy(gameObject);
                }
            }

            if (enemy)
            {
                if (wadesBullet)
                {
                    enemy.DoTakeDamage(damage);
                    Instantiate(explosionEffect, transform.position, transform.rotation);
                    Destroy(gameObject);
                }
            }


            if (!wade && !bullet && !boat && !mt)
            {
                if (other.gameObject.name != "BoatTrigger" && other.gameObject.name != "Mover")
                {
                    Instantiate(explosionEffect, transform.position, transform.rotation);
                    Destroy(gameObject);
                }
            }
        }
    }
Example #9
0
    void Explode()
    {
        Instantiate(explosionEffect, transform.position, transform.rotation);
        Collider[] colliders = Physics.OverlapSphere(transform.position, blastRadius);

        foreach (Collider nearbyObject in colliders)
        {
            Enemy       enemy = nearbyObject.GetComponent <Enemy>();
            WadeMachine wade  = nearbyObject.GetComponent <WadeMachine>();
            if (enemy != null)
            {
                if (!enemyGrenade)
                {
                    enemy.DoTakeDamage(damage);
                }
            }

            if (wade != null)
            {
                wade.DoTakeDamage(damage);
            }
        }
        Destroy(gameObject);
    }