public AbstractAction(GameObject actor) { this.actor = actor; state = actor.GetComponent(typeof(CharacterState)) as CharacterState; animator = actor.GetComponent(typeof(CharacterAnimator)) as CharacterAnimator; mover = actor.GetComponent(typeof(CharacterMover)) as CharacterMover; actionRunner = actor.GetComponent(typeof(ActionRunner)) as ActionRunner; animationName = null; wrapMode = WrapMode.Once; emotionBodyParts = Emotion.BodyParts.NONE; canStartDialogueWithPC = true; canStartDialogueWithAgents = true; canEndAnyTime = true; //canCancelDuringMovement = true; quickReaction = null; moveToAction = null; started = false; endedASAP = false; endNextRound = false; finished = false; }
protected void InitAnimationInfo(string animationName, WrapMode wrapMode, Emotion.BodyParts emotionBodyParts) { if (animationName == null || animationName.Equals("")){ Debug.LogError("AbstractAction.InitAnimationInfo(): " + actor.name + ". Provide a name of the animation!"); } this.animationName = animationName; this.wrapMode = wrapMode; this.emotionBodyParts = emotionBodyParts; }
protected void StartAnimation(string animationName, WrapMode wrapMode, Emotion.BodyParts emotionBodyParts) { this.animationName = animationName; this.wrapMode = wrapMode; this.emotionBodyParts = emotionBodyParts; animator.StartAnimation(animationName, wrapMode, emotionBodyParts); }
public void StartAnimation(string animationName, WrapMode wrapMode, Emotion.BodyParts emotionBodyParts, float speed) { StartAnimation(animationName, wrapMode, BOTTOM_LAYER, new string[]{}, new string[]{}, speed); this.emotionBodyParts = emotionBodyParts; UpdateEmotionLayer(emotionBodyParts); }