Ejemplo n.º 1
0
    // Wiggle then stomp the ground with both paws
    IEnumerator C_PawStomp(float StartDelay)
    {
        yield return(new WaitForSeconds(StartDelay));

        CenterHead.WaveEffectObject(0, 0.1f, 10, 0, 0);
        CenterHead.MoveObjectToPoint(4, CenterStartingPosition, 1);
        CenterHead.StopWaveEffect(4);

        CenterHead.PlayClip(2.8f, ArmMove);
        CenterHead.PlayClip(3.5f, Pound1);

        if (LeftArm.gameObject.activeInHierarchy)
        {
            LeftArm.WaveEffectObject(0, 1, Random.Range(-2f, 2f), 0, 0);
            LeftArm.StopWaveEffect(2);
            LeftArm.MoveToPosition_Y(2, gameObject.transform, 1);
            LeftArm.MoveToPosition_Y(3, BottomLeft.transform, 2);
            LeftArm.MoveObjectToPoint(4, LeftArmStartingPosition, 1);
        }

        if (RightArm.gameObject.activeInHierarchy)
        {
            RightArm.WaveEffectObject(0, 1, Random.Range(-2f, 2f), 0, 0);
            RightArm.StopWaveEffect(2);
            RightArm.MoveToPosition_Y(2, gameObject.transform, 1);
            RightArm.MoveToPosition_Y(3, BottomLeft.transform, 2);
            RightArm.MoveObjectToPoint(4, RightArmStartingPosition, 1);
        }

        yield return(new WaitForSeconds(7));
    }