Example #1
0
 public MovementBehaviour(GameObject character, float maxspeed, float maxAngularvelocity, float maxAcceleration,
                          float maxAngularAcceleration, float turnSmoothing)
 {
     this.character = character;
     this.MaxSpeed  = maxspeed;
     this.maxAngularAcceleration = maxAngularAcceleration;
     this.maxAngularVelocity     = maxAngularvelocity;
     this.maxAcceleration        = maxAcceleration;
     seekTargetDelegate         += SteeringSeek;
     this.TurnSmoothing          = turnSmoothing;
 }
Example #2
0
 public void InstatiateMovementBehaviour(GameObject character, float maxspeed, float maxAngularvelocity, float maxAcceleration,
                                         float maxAngularAcceleration, float turnSmoothing, float timeToTarget)
 {
     this.character = character;
     this.MaxSpeed  = maxspeed;
     this.maxAngularAcceleration = maxAngularAcceleration;
     this.maxAngularVelocity     = maxAngularvelocity;
     this.maxAcceleration        = maxAcceleration;
     seekTargetDelegate         += SteeringSeek;
     this.TurnSmoothing          = turnSmoothing;
     this.timeToTarget           = timeToTarget;
     resetTimer       = 3.5f;
     originalMaxSpeed = maxspeed;
 }