Exemplo n.º 1
0
    public override void Die(LivingObject sender)
    {
        base.Die(sender);

        if (sender != null && sender.GetType() == typeof(Player))
        {
            GameManager.instance.playerScore += 10000;
        }

        foreach (Transform trans in spawnedChildList)
        {
            if (trans == null)
            {
                continue;
            }

            LivingObject obj = trans.GetComponent <LivingObject>();
            if (obj != null)
            {
                obj.Die(sender);
            }
        }

        if (GameManager.instance.config.gameOptions.effectEnabled)
        {
            Instantiate(explosion, transform.position, transform.rotation);
        }

        Functions.PlayAudioClip(transform.position, exposionSound);

        Destroy(gameObject);
        Destroy(bezierCurveManagers.gameObject);
        Destroy(mineChildSpawnPoints[0].gameObject);
    }
Exemplo n.º 2
0
    public override void Die(LivingObject sender)
    {
        if (sender != null && sender.GetType() == typeof(Player))
        {
            //
        }

        Destroy(gameObject);
    }
Exemplo n.º 3
0
    /*public override */ void Die(LivingObject sender)
    {
        if (sender != null && sender.GetType() == typeof(Player))
        {
            GameManager.instance.playerScore += 25;
            if (GameManager.instance.config.gameOptions.effectEnabled)
            {
                Instantiate(explosion, transform.position, transform.rotation);
            }
        }

        Functions.PlayAudioClip(transform.position, explosionSound);
        terrorVille.UnRegisterChild(this);
        Destroy(gameObject);
    }
Exemplo n.º 4
0
    public override void Die(LivingObject sender)
    {
        if (sender != null && sender.GetType() == typeof(Player))
        {
            GameManager.instance.playerScore += 50;
            Instantiate(explosion, transform.position, transform.rotation);
        }

        Functions.PlayAudioClip(transform.position, exposionSound);
        Destroy(gameObject);

        if (OnObjectDied != null)
        {
            OnObjectDied(this);
        }
    }
Exemplo n.º 5
0
    public override void Die(LivingObject sender)
    {
        base.Die(sender);

        if (sender != null && sender.GetType() == typeof(Player))
        {
            GameManager.instance.playerScore += 15000;
        }

        Functions.PlayAudioClip(transform.position, explosionSound);
        if (GameManager.instance.config.gameOptions.effectEnabled)
        {
            Instantiate(explosion, transform.position, transform.rotation);
        }

        transform.GetComponent <Rigidbody>().useGravity  = true;
        transform.GetComponent <Rigidbody>().isKinematic = false;
    }
Exemplo n.º 6
0
    public override void Die(LivingObject sender)
    {
        base.Die(sender);

        if (sender != null && sender.GetType() == typeof(Player))
        {
            GameManager.instance.playerScore += 5000;
        }

        if (GameManager.instance.config.gameOptions.effectEnabled)
        {
            Instantiate(explosion, transform.position, transform.rotation);
        }

        Functions.PlayAudioClip(transform.position, exposionSound);

        Destroy(gameObject);
        Destroy(bezierCurveManager.gameObject);
    }