Пример #1
0
 protected AIBehaviour(AIController controller) // behaviours should only have a constructor with an AIController
 {
     Controller = controller;
     Ped        = Controller.Owner.Ped;
 }
Пример #2
0
 protected AITaskPerformCPR(AIController controller, Ped patient) : base(controller)
 {
     cpr = new CPR(patient, Ped);
     CPRManager.Instance.Start(cpr);
 }
Пример #3
0
 protected AITaskGoTo(AIController controller, Vector3 position, float targetHeading, float distanceThreshold, float speed) : base(controller)
 {
     task = Ped.Tasks.FollowNavigationMeshToPosition(position, targetHeading, speed, distanceThreshold);
 }
Пример #4
0
 protected AITaskGoStraightTo(AIController controller, Vector3 position, float targetHeading, float distanceToSlideAt, float speed) : base(controller)
 {
     task = Ped.Tasks.GoStraightToPosition(position, speed, targetHeading, distanceToSlideAt, -1);
 }
Пример #5
0
 protected AITaskFollow(AIController controller, Entity entityToFollow, Vector3 offset, float stoppingRange, float speed, bool persistFollowing) : base(controller)
 {
     NativeFunction.Natives.TaskFollowToOffsetOfEntity(Ped, entityToFollow, offset.X, offset.Y, offset.Z, speed, -1, stoppingRange, persistFollowing);
     task = Task.GetTask(Ped, "TASK_FOLLOW_TO_OFFSET_OF_ENTITY");
 }
Пример #6
0
 protected AITask(AIController controller)
 {
     Controller = controller;
     Ped        = Controller.Owner.Ped;
 }
Пример #7
0
 internal AdvancedPed(Ped ped)
 {
     Ped = ped;
     Ped.BlockPermanentEvents = true;
     AI = new AIController(this);
 }