protected AIBehaviour(AIController controller) // behaviours should only have a constructor with an AIController { Controller = controller; Ped = Controller.Owner.Ped; }
protected AITaskPerformCPR(AIController controller, Ped patient) : base(controller) { cpr = new CPR(patient, Ped); CPRManager.Instance.Start(cpr); }
protected AITaskGoTo(AIController controller, Vector3 position, float targetHeading, float distanceThreshold, float speed) : base(controller) { task = Ped.Tasks.FollowNavigationMeshToPosition(position, targetHeading, speed, distanceThreshold); }
protected AITaskGoStraightTo(AIController controller, Vector3 position, float targetHeading, float distanceToSlideAt, float speed) : base(controller) { task = Ped.Tasks.GoStraightToPosition(position, speed, targetHeading, distanceToSlideAt, -1); }
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"); }
protected AITask(AIController controller) { Controller = controller; Ped = Controller.Owner.Ped; }
internal AdvancedPed(Ped ped) { Ped = ped; Ped.BlockPermanentEvents = true; AI = new AIController(this); }