Beispiel #1
0
 public RunBehavior(IMovingActor actor, float speed,
                    float accelerationTime, float deaccelerationTime)
 {
     this.actor     = actor;
     maximumSpeed   = speed;
     acceleration   = speed / accelerationTime;
     deacceleration = speed / deaccelerationTime;
 }
Beispiel #2
0
 public WalkBehavior(IMovingActor actor, float speed,
                     float accelerationTime, float deaccelerationTime,
                     float snailThreshold)
 {
     this.actor          = actor;
     maximumSpeed        = speed;
     acceleration        = speed / accelerationTime;
     deacceleration      = speed / deaccelerationTime;
     this.snailThreshold = snailThreshold;
 }
Beispiel #3
0
 public GlideBehavior(IMovingActor actor)
 {
     this.actor = actor;
 }
Beispiel #4
0
 private void Awake()
 {
     movingActor = GetComponent <IMovingActor>();
     anchorPoint = transform.position;
 }