Example #1
0
        protected float ChangeState(Weapon.State state, CharacterAnimation.Layer layer)
        {
            float time = TRANSITION;

            if (state.state != null)
            {
                if (state.state.enterClip != null)
                {
                    time = state.state.enterClip.length;
                }

                time = Mathf.Max(TRANSITION, time) * 0.5f;
                this.animator.SetState(
                    state.state, state.mask,
                    1f, time, 1f, layer
                    );
            }

            return(time);
        }
Example #2
0
 public void SetState(Weapon.State state)
 {
     this.state           = state;
     this.targetStability = this.state.stabilizeBody ? 1f : 0f;
 }