Ejemplo n.º 1
0
    public void AnimationKillCaller(DamagedBodyPart bpart)
    {
        StopAllCoroutines();
        npcAnimator.enabled = true;
        Material[] mats = new Material[] { blockTransparent, blockFader };
        skinmesh.materials = mats;        //materials[0] = blockTransparent;		// make the interior transparent
        //skinmesh.sharedMaterials[0] = blockTransparent;
        //blockFader.SetTexture = blockFader_texture;

        switch (bpart)
        {
        case DamagedBodyPart.Head:
            StartCoroutine(ActivateTrigger("killHead"));
            break;

        case  DamagedBodyPart.Chest:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.LowerLegL:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.UpperLegL:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.LowerLegR:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.UpperLegR:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.LowerArmL:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.UpperArmL:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.LowerArmR:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;

        case  DamagedBodyPart.UpperArmR:
            StartCoroutine(ActivateTrigger("killHead"));                // call one if none found
            break;
        }
    }
Ejemplo n.º 2
0
    public void AnimationHurtCaller(DamagedBodyPart bpart)              //-- call the animator for hurt
    {
        npcAnimator.enabled = true;

        print("Hurt animation");

        //switch (bpart) {
        //
        //	case DamagedBodyPart.Chest:
        //
        //	print ("Called chest trigger");
        //	StartCoroutine (ActivateHurtTrigger ("hurtChest"));
        //	break;
        //
        //	StartCoroutine (ActivateHurtTrigger ("hurtChest"));	// call one if none found
        //
        //}
        StartCoroutine(ActivateHurtTrigger("hurtChest"));               // call one if none found
    }