Exemplo n.º 1
0
    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;
    }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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);
 }