예제 #1
0
 private void DoArmExtension(params object[] parameters)
 {
     if (isAnimating)
     {
         if (stateVariables.eatTargetEnemy)
         {
             // stateVariables.statsManager.MakeHappy();
             IEatable eatable = stateVariables.eatTargetEnemy.GetComponent <IEatable>();
             if (!eatable.IsNull())
             {
                 Assert.IsNotNull(eatable);
                 grabSpot = eatable.GetGrabObject().transform.position;
                 clawArmController.StartExtension(eatable.GetGrabObject(), stateVariables.clawExtensionTime, stateVariables.clawRetractionTime);
                 SFXManager.Instance.Play(stateVariables.ArmExtensionSFX, transform.position);
             }
         }
         else
         {
             stateVariables.eatTargetEnemy  = dummyObject;
             dummyObject.transform.position = stateVariables.modelHead.transform.position + stateVariables.modelHead.transform.forward * 5.0f;
             grabSpot = dummyObject.transform.position;
             clawArmController.StartExtension(dummyObject, stateVariables.clawExtensionTime, stateVariables.clawRetractionTime);
             SFXManager.Instance.Play(stateVariables.ArmExtensionSFX, transform.position);
         }
     }
 }