private void OnTriggerStay2D(Collider2D collision) { LaundromatBag bag = collision.GetComponent <LaundromatBag>(); if (bag != null) { bag.GetComponent <Rigidbody2D>().velocity = new Vector3(0.0f, -speed, 0.0f); } }
protected virtual void OnClothesReady(LaundromatBag bag) { if (bag.customerID == ticketNumber) { state = CustomerState.PickingUpBag; spot.Free(); bagOnCounter = bag; } }
private void OnBagOutput() { if (step == 5 && !bagTooltip) { ToastManager.instance.SayLine("There you go! Grab that bag, and put it on the counter, left of the register.", 1.0f); bagTooltip = true; bag = FindObjectOfType <LaundromatBag>(); bagInit = true; } }
private void OnBagPickedUp(LaundromatBag bag) { if (ollie != null && bag.customerID == ollie.ticketNumber) { if (pants.Torn) { DangerResult(); } else { SafetyResult(); } } }
protected override void OnLaundryCompleted(LaundromatBag bag) { if (customerID == bag.customerID) { foreach (Garment garment in bag.contents) { if (garment is OllieFemur) { boneLaundered = garment.Clean && garment.Dry && garment.Folded; } } NextEvent(); } }
private void OnBagPickedUp(LaundromatBag bag) { if (ollie != null && bag.customerID == ollie.ticketNumber) { if (helmetBought) { SafetyResult(); } else { DangerResult(); } } }
private void OnTriggerStay2D(Collider2D collision) { LaundromatBag bag = collision.GetComponent <LaundromatBag>(); if (bag != null && !bag.ReadyForPickUp) { bag.ReadyForPickUp = true; bag.GetComponent <LaundromatSpriteSort>().CanBePlacedOnThings = false; collision.enabled = false; if (BagReadyForPickUp != null) { BagReadyForPickUp(bag); } } }
private void OnBagReadyForPickUp(LaundromatBag bag) { if (step == 5 && delayedNextStep == null) { delayedNextStep = DelayedNextStep(1.0f); StartCoroutine(delayedNextStep); bagReady = true; } //Make baskets appear at the counter whenever a bag is produced during Step 10B if (step == 6) { SpawnRandomBasket(); } StartCoroutine(DestroyBagAfterDelay(bag)); }
private void OnBagPickedUp(LaundromatBag bag) { if (ollie != null && bag.customerID == ollie.ticketNumber) { if (bone.Ruined) { SafetyResult(); } else if (bone.Clean && bone.Dry) { DangerResult(); } else { NeutralResult(); } } }
protected override void OnLaundryCompleted(LaundromatBag bag) { }
private void OnBagPickedUp(LaundromatBag bag) { CustomersServed--; }
protected virtual void PickUpBag() { BagPickedUp(bagOnCounter); Destroy(bagOnCounter.gameObject); bagOnCounter = null; }
private void OnBagPickedUp(LaundromatBag bag) { garmentsLaundered += bag.launderedGarments; }
private IEnumerator OutputBag(Customer customer, List <Garment> customersGarments) { yield return(new WaitForLaundromatSeconds(0.2f)); AudioManager.instance.PlaySound(SoundName.ProcessingEmb); yield return(new WaitForLaundromatSeconds(1.0f)); //Remove all of this customer's garments from the bagger int launderedGarments = 0; int perfectGarments = 0; int perfectIronedGarments = 0; int ruinedGarments = 0; foreach (Garment garment in customersGarments) { if (garment.Ruined) { ruinedGarments++; } else if (garment.Dry && garment.Clean && garment.Folded) { launderedGarments++; if (garment.Pressed || garment.fabric.pressingRestrictions == PressingRestrictions.NoIroning) { perfectGarments++; if (garment.Pressed) { perfectIronedGarments++; } } } contents.Remove(garment); } //Spawn a LaundromatBag LaundromatBag bag = Instantiate(laundromatBagPrefab, bagSpawnPoint.position, bagSpawnPoint.rotation).GetComponent <LaundromatBag>(); bag.contents = customersGarments; if (customer == null) { bag.customerID = customersGarments[0].customerID; } else { bag.customerID = customer.ticketNumber; } bag.totalGarments = customersGarments.Count; bag.launderedGarments = launderedGarments; bag.perfectGarments = perfectGarments; bag.ruinedGarments = ruinedGarments; bag.perfectIronedGarments = perfectIronedGarments; if (BagOutput != null) { BagOutput(); } //Check if there is another bag to output in the queue if (OutputQueue.Count > 0) { OutputData output = OutputQueue[0]; OutputQueue.RemoveAt(0); OutputCoroutine = OutputBag(output.customer, output.customersGarments); StartCoroutine(OutputCoroutine); } else { OutputCoroutine = null; } }
private IEnumerator DestroyBagAfterDelay(LaundromatBag bag) { yield return(new WaitForLaundromatSeconds(3.0f)); Destroy(bag.gameObject); }
//Evaluate the bag's contents and determine nextEvent protected abstract void OnLaundryCompleted(LaundromatBag bag);