Beispiel #1
0
        private void OnClickInspect(AiController aiController, SmartObject smartObject)
        {
            smartObject.activeAction     = this;
            smartObject.animationTrigger = "Inspect"; //might need a ref for diff types of inspect animations later on
            Debug.Log(aiController.GetRuntimeAnimationClipInfo(smartObject.animationTrigger).length);

            smartObject.actionLength = aiController.GetRuntimeAnimationClipInfo(smartObject.animationTrigger).length; //get length of animation to be played

            aiController.StartAction(smartObject, false);                                                             //commence the action based on given data
        }
Beispiel #2
0
        private void OnCliCkPracticeShooting(AiController aiController, SmartObject smartObject)
        {
            smartObject.activeAction     = this;
            smartObject.animationTrigger = "Shoot";                                                                          //might need a ref for diff types of inspect animations later on

            smartObject.actionLength        = aiController.GetRuntimeAnimationClipInfo(smartObject.animationTrigger).length; //get length of animation to be played
            aiController._animationWaitTime = animationLengthModifier;

            aiController.StartAction(smartObject, true); //commence the action based on given data
        }