Beispiel #1
0
    void CheckKill(DetectObstruction detectobs, GameObject bodypart)
    {
        //if used blades
        if (detectobs.Object.GetComponent <TitanDamageCollider>())
        {
            ErenTitanTemp = detectobs.Object.transform.parent.transform.gameObject;
            Invoke("BlownAway", 0.1f);
            return;
        }
        if (detectobs.Object.GetComponent <Throwable>())
        {
            detectobs.Object.GetComponentInParent <PlayerGFX>().player.BladeHit(bodypart.transform.position);

            detectobs.Object.GetComponent <Throwable>().DestroyObject();

            detectobs.Object = null;
            return;
        }

        if (bodypart == Nape.gameObject)
        {
            detectobs.Object.GetComponentInParent <PlayerGFX>().player.AnimSlashKill(bodypart.transform.position);
        }
        else
        {
            detectobs.Object.GetComponentInParent <PlayerGFX>().player.AnimSlash(bodypart.transform.position);
        }
    }
Beispiel #2
0
    void CheckKill(DetectObstruction detectobs, GameObject bodypart)
    {
        //if used blades

        if (detectobs.Object.GetComponent <Throwable>())
        {
            detectobs.Object.GetComponentInParent <PlayerGFX>().player.BladeHit(bodypart.transform.position);

            detectobs.Object.GetComponent <Throwable>().DestroyObject();

            detectobs.Object = null;
            return;
        }

        detectobs.Object.GetComponentInParent <PlayerGFX>().player.AnimSlash(bodypart.transform.position);
    }