示例#1
0
    IEnumerator C_StartBattle()                 // Start battle and pick a random attack until the hands are disabled
    {
        CenterHead.PlayClip(0, IntroRumble);

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

        LeftArm.WaveEffectObject(0, 0.5f, 5, 0, 0);
        LeftArm.StopWaveEffect(2);
        LeftArm.MoveObjectToPoint(3, LeftArmStartingPosition, 1);

        RightArm.WaveEffectObject(0, 0.5f, 5, 0, 0);
        RightArm.StopWaveEffect(2);
        RightArm.MoveObjectToPoint(3, RightArmStartingPosition, 1);

        yield return(new WaitForSeconds(3f));

        LeftArm.SetProjectile(0, KittenProjectile);
        RightArm.SetProjectile(0, KittenProjectile);
//		CenterHead.SetProjectile (0, KittenProjectile);
        yield return(new WaitForSeconds(1f));

//		while((LeftArmObject != null) || (RightArmObject != null))
        while ((LeftArmObject.activeInHierarchy) || (RightArmObject.activeInHierarchy))
        {
            int RandomNumber = Random.Range(0, 5);
//			print(RandomNumber);

            switch (RandomNumber)
            {
            case 0:
                yield return(StartCoroutine(C_PawStomp(0)));

                break;

            case 1:
                yield return(StartCoroutine(C_PawShoot(0)));

                break;

            case 2:
                yield return(StartCoroutine(C_PawCombine(0)));

                break;

            case 3:
                yield return(StartCoroutine(C_SpinnyHands(0)));

                break;

            case 4:
                yield return(StartCoroutine(C_PawSlam(0)));

                break;
            }
        }

        yield return(StartCoroutine(C_HeadAttack(0)));



        yield return(null);
    }