protected void AnimationComplete(int animationType) { if (FtueAgentAnimationEvent.OnFtueAgentAnimationComplete != null) { FtueAgentAnimationEvent.OnFtueAgentAnimationComplete(this, new FtueAgentAnimationEvent(Agent, animationType, currentClip)); } }
protected void OnFtueAnimationClipComplete(FtueAgentAnimationEvent eventArgs) { if (string.Equals(eventArgs.Clip, AnimationClip_Interaction1_SaberStance)) { // displaying saber position helper SaberPositionHelper.SetActive(true); } }
protected void OnFtueAnimationWaiting(FtueAgentAnimationEvent eventArgs) { if (string.Equals(eventArgs.Clip, KyloInterstitialStrikeNow)) { currentInteraction = DarkSideFtueInteractionType.AttackKylo1; } else if (string.Equals(eventArgs.Clip, KyloInterstitialStrikeAgain)) { currentInteraction = DarkSideFtueInteractionType.AttackKylo2; } }
protected void OnFtueAnimationWaiting(FtueAgentAnimationEvent eventArgs) { // checking which interaction if (string.Equals(eventArgs.Clip, AnimationClip_Interaction1_SwitchOnSaber)) { SetupInteraction(FtueInteractionType.ActivationMatrix); } else if (string.Equals(eventArgs.Clip, AnimationClip_Interaction2_MoveToBust)) { SetupInteraction(FtueInteractionType.AssaultMode); } }
protected void OnFtueAnimationCompleteHandler(object sender, FtueAgentAnimationEvent eventArgs) { // setting state animationState = FtueAnimationState.Waiting; // getting the completed step FtueAnimationStep completedStep = CurrentSequence[currentStepNumber]; // incrementing the event number currentStepNumber++; // checking if there are next steps if (currentStepNumber < CurrentSequence.Count) { if (completedStep.AutoPlay) { if (OnFtueAnimationClipComplete != null) { OnFtueAnimationClipComplete(new FtueAgentAnimationEvent(completedStep.Agent, -1, completedStep.Clip)); } if (!IsErrorState) { Play(); } } else { if (OnFtueAnimationWaiting != null) { OnFtueAnimationWaiting(new FtueAgentAnimationEvent(completedStep.Agent, -1, completedStep.Clip)); } } } else { // dispatching the event if (OnFtueAnimationSequenceComplete != null) { OnFtueAnimationSequenceComplete(ftueType); } } }
protected void OnFtueAnimationClipComplete(FtueAgentAnimationEvent eventArgs) { }