protected virtual void Start() { laundromatBasketPrefab = (GameObject)Resources.Load("LaundromatBasket"); animator = GetComponentInChildren <Animator>(); garments = new List <Garment>(); //Generate random customer SpriteRenderer spriteRenderer = GetComponentInChildren <SpriteRenderer>(); silhouetteIndex = UnityEngine.Random.Range(0, silhouettes.Length); spriteRenderer.sprite = silhouettes[silhouetteIndex]; ticketNumber = CustomerManager.instance.GetTicketNumber(); waitTimer = 0; state = CustomerState.Queueing; basket = LaundryManager.GetRandomBasket(); foreach (Garment garment in basket.contents) { garment.customerID = ticketNumber; garments.Add(garment); } //Upon arrival, a new Customer requests a spot in Queue from the CustomerManager CustomerManager.instance.AssignQueueSpot(this); }
public async Task <ActionResult> DeleteConfirmed(int id) { LaundryManager laundryManager = await db.LaundryManagers.FindAsync(id); db.LaundryManagers.Remove(laundryManager); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public async Task <ActionResult> Edit([Bind(Include = "ID,ClientNo,ContractNo,FullName,ShirtNo,TrouserNo,JeanNo,AgbadaCompleteNo,ClientRemark,IsActive,Email,Branch,TrxnDate")] LaundryManager laundryManager) { if (ModelState.IsValid) { db.Entry(laundryManager).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(laundryManager)); }
private LaundromatBasket SpawnRandomBasket() { Basket basket = LaundryManager.GetRandomBasket(); CreateTutorialCustomer(basket); LaundromatBasket laundromatBasket = Instantiate(laundromatBasketPrefab, firstBasketSpawn.position, firstBasketSpawn.rotation).GetComponent <LaundromatBasket>(); laundromatBasket.basket = basket; return(laundromatBasket); }
public LaundriesUtilController(ApplicationDbContext appDbContext, IMapper mapper, IdentityManager identityManager, LaundryManager laundryManager, IHostingEnvironment environment) { _appDbContext = appDbContext; _mapper = mapper; _identityManager = identityManager; _laundryManager = laundryManager; _environment = environment; }
// GET: LaundryManagers/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LaundryManager laundryManager = await db.LaundryManagers.FindAsync(id); if (laundryManager == null) { return(HttpNotFound()); } return(View(laundryManager)); }
void Start() { // SINGLETON if (LM == null) { DontDestroyOnLoad(gameObject); LM = this; } else { Destroy(gameObject); } //start laundry as unwashed, not dry, dialogue to 0 laundryWashed = false; laundryDryed = false; laundryCounter = 0; UpdateLaundryCountUI(); }
private void Start() { GameObject laundromatBasketPrefab = (GameObject)Resources.Load("LaundromatBasket"); RecurringCustomer customer = CustomerManager.instance.GetRecurringCustomer(characterIndex); Garment bone = new OllieFemur(); Basket basket = LaundryManager.GetRandomBasket(); while (!basket.AddGarment(bone)) { //If there is no space in the basket for the bone, remove something Garment removed = basket.RemoveTopGarment(); //If the removed garment is a sock, remove its match if (removed is GarmentSock) { foreach (Garment garment in basket.contents) { if (garment is GarmentSock) { if (garment.color.Equals(removed.color) && garment.fabric.Equals(removed.fabric)) { basket.RemoveGarment(garment); break; } } } } } List <Garment> olliesGarments = new List <Garment>(); foreach (Garment garment in basket.contents) { garment.customerID = customerID; olliesGarments.Add(garment); } customer.basket = basket; customer.garments = olliesGarments; }
// GET: LaundryManagers/Create public ActionResult Create(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var fg = db.ClientDetails.Find(id); var userId = User.Identity.GetUserId(); var user = UserManager.FindById(userId); LaundryManager ng = new LaundryManager() { ClientNo = fg.ClientNo, FullName = fg.FullName, Email = user.Email, Branch = user.CompanyToken.Branch, ContractNo = RandomPassword(), }; if (ng == null) { return(HttpNotFound()); } return(View(ng)); }
public EmailTemplateController(LaundryManager laundryManager) { _laundryManager = laundryManager; }