Exemple #1
0
 public MotorAnimator(DirectionProvider directionProvider, Animator anim, string walkAnimation, string idleAnimation)
 {
     this.directionProvider = directionProvider;
     this.animator          = anim;
     this.walkAnimation     = walkAnimation;
     this.idleAnimation     = idleAnimation;
     anim.Play(idleAnimation);
 }
Exemple #2
0
 public KinimaticMotor(KinimaticMotorConfig config, Rigidbody body, DirectionProvider dirProvider, float groundCheckDistance, LayerMask groundLayerMask, float wallCheckDistance, float wallCheckHeight)
 {
     this.body                = body;
     body.isKinematic         = false;
     this.config              = config;
     this.dirProvider         = dirProvider;
     this.groundLayerMask     = groundLayerMask;
     this.groundCheckDistance = groundCheckDistance;
     this.wallCheckDistance   = wallCheckDistance;
     this.wallCheckHeight     = wallCheckHeight;
 }
Exemple #3
0
 public KinimaticMotor GetMotor(KinimaticMotorConfig config, Rigidbody body, DirectionProvider dirProvider)
 {
     return(new KinimaticMotor(config, body, dirProvider, groundCheckDistance, groundLayerMask, wallCheckDistance, wallCheckHeight));
 }