void OnTriggerEnter(Collider other) { if (other.CompareTag("Ball")) { PickupTracker pickupTracker = Object.FindObjectOfType <PickupTracker>(); pickupTracker.lost = true; } }
void Start() { fishPool = FindObjectOfType <FishPool>(); musicPlayer = FindObjectOfType <MusicPlayer>(); pickupTracker = FindObjectOfType <PickupTracker>(); pilot = FindObjectOfType <Pilot>(); pilot_ID_Field = FindObjectOfType <Pilot_ID_Field>(); player = FindObjectOfType <Player>(); records = FindObjectOfType <Records>(); }
void Init() { audioSources = GetComponents <AudioSource>(); thisRigidbody = GetComponent <Rigidbody>(); thrustParticleSystem = GetComponent <ParticleSystem>(); fishDrones = FindObjectsOfType <FishDrone>(); fishPool = FindObjectOfType <FishPool>(); glueCam = FindObjectOfType <GlueCam>(); musicPlayer = FindObjectOfType <MusicPlayer>(); pickupTracker = FindObjectOfType <PickupTracker>(); pilot = FindObjectOfType <Pilot>(); timeKeeper = FindObjectOfType <Timekeeper>(); uiControl = FindObjectOfType <UIcontrol>(); cockpit = GameObject.FindGameObjectWithTag("Cockpit"); thrusterBell = GameObject.FindGameObjectWithTag("Thruster_Bell"); thrustLight = GameObject.FindGameObjectWithTag("Thruster_Light"); tutorialText = GameObject.FindGameObjectWithTag("Tutorial_Text"); debugMode = Debug.isDebugBuild; startPosition = transform.position; startRotation = transform.rotation; thrustAudioLength = thrustSound.length; thrustAudioTimer = 0 - thrustAudioLength; thrustBubbles = thrustParticleSystem.emission; thrustAudio = audioSources[0]; xAudio = audioSources[1]; casualMode = false; deRotating = false; invulnerable = false; paused = false; thrustAudioTrack = true; tutorialIsVisible = true; AdjustEmissionRate(EMISSION_RATE_INACTIVE); thrustPowerSlider.maxValue = THRUST_MAX; thrustPowerSlider.minValue = THRUST_MIN; thrustPowercapSlider.minValue = 0f; thrustPowercapSlider.maxValue = 1f; thrustPowercapSlider.value = maxPower; SetPower(INITIAL_POWER_LEVEL); DoPowercapUpdate(); gasLevelSlider.maxValue = FUEL_MAX; gasLevelSlider.minValue = 0; gasLevelSlider.value = fuelLevel; DoGasUpdate(); pilotNameText.text = pilot.ID; IndicateMode(); }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Ball")) { PickupTracker pickupTracker = Object.FindObjectOfType <PickupTracker>(); pickupTracker.current += 1; LostPickupTracker lostPickupTracker = Object.FindObjectOfType <LostPickupTracker>(); lostPickupTracker.current += 1; Destroy(this.gameObject); } }
public void CreatePickupListing([Bind(Include = "pickupDate,employeeId,customerId")] PickupTracker pickupTracker, Customer customer, Employee employee) { var customerToConfirm = customer.customerId; var employeeToConfirm = employee.employeeId; var dateOfConfirmation = DateTime.Now.Date; pickupTracker.pickupDate = dateOfConfirmation; pickupTracker.customerId = customerToConfirm; pickupTracker.employeeId = employeeToConfirm; db.PickupTracker.Add(pickupTracker); db.SaveChanges(); }
public ActionResult ConfirmPickup([Bind(Include = "customerId,firstName,lastName,balance,pickupDay,pickupDateSelected,Date,streetAddress,city,zipCode,ApplicationUserId,AccountSuspensionStartDate,AccountSuspensionEndDate,pickupDateSelected,pickupConfirmed,longitute,latitude")] Customer customer) { try { var currentUser = User.Identity.GetUserId(); var currentEmployee = db.Employee.FirstOrDefault(e => e.ApplicationUserId == currentUser); PickupTracker newPickupListings = new PickupTracker(); CreatePickupListing(newPickupListings, customer, currentEmployee); double weeklyTrashCharge = 10.00; customer.balance += weeklyTrashCharge; customer.pickupConfirmed = true; db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details")); } catch { return(View()); } }