private void CheckTarget() { if (targetVehicleGO != prevVehicleGO) { targetVehicle = targetVehicleGO.GetComponent <AbstractDriver>(); } prevVehicleGO = targetVehicleGO; }
public void AddBountyOption(BountyData bounty, AbstractDriver bountyHunter) { var bountyOption = bountyOptionsPool.Get <BountyOption>(); bountyOption.bounty = bounty; bountyOption.compassRelativeTo = bountyHunter; bountyOption.vehicles = viewedVehicle; //Debug.Log("Vehicle switcher being set is null: " + (viewedVehicle == null)); bountyOption.viewButton.onClick.AddListener(() => { ViewBountyPressed(bountyOption); }); shownBounties.Add(bountyOption); }
void Awake() { bountyTrackerInScene = this; bountyHunter = bountyHunterObject.GetComponent <AbstractDriver>(); currentBounties = new BountyData[activeBountyCount]; for (int i = 0; i < currentBounties.Length; i++) { currentBounties[i] = GenerateRandomBounty(); } }
public AbstractDriver GetDriverInFront(float distance = 15) { AbstractDriver driver = null; Vector3 centerPoint = self.GetVehicle().vehicleRigidbody.transform.GetPointInBounds(Vector3.zero); RaycastHit hitInfo; if (Physics.Raycast(centerPoint, self.GetVehicle().vehicleRigidbody.transform.forward, out hitInfo, distance)) { driver = hitInfo.transform.GetComponentInParent <AbstractDriver>(); } return(driver); }
public void SetTarget(AbstractDriver target) { if (currentTarget != null) { currentTarget.GetCarHUD().showPointer = false; } currentTarget = target; if (currentTarget != null) { currentTarget.GetCarHUD().showPointer = true; } }
private void Awake() { //botCars = PoolManager.GetPool("Bots"); driverToAdjustTrafficTo = adjustTrafficTo.GetComponent <AbstractDriver>(); }
private void Start() { modifying = modifyingDriver.GetComponent <AbstractDriver>(); }
private void Awake() { self = GetComponent <AbstractDriver>(); }
void Start() { bountyHunter = bountyHunterObject.GetComponent <AbstractDriver>(); }
private void Awake() { self = GetComponent <AbstractDriver>(); sirenLights = GetComponentsInChildren <SirenLightController>(true); }
private void ShowLicense(AbstractDriver driver) { driver.GetCarHUD().showLicense = true; }