//public List<Dishwasher> Dishwashers { get; private set; } public DiningRoom(int nbOfHeadWaiter, int nbOfWaiter, Countertop countertop) { Countertop = countertop; Butler = new Butler(this); HeadWaiters = new List<HeadWaiter>(); Waiters = new List<Waiter>(); //parallel fork for (int i = 0; i < nbOfHeadWaiter; i++) HeadWaiters.Add(new HeadWaiter(this)); for (int i = 0; i < nbOfWaiter; i++) Waiters.Add(new Waiter(this)); /*for (int i = 0; i < nbOfCommis; i++) Dishwashers.Add(new Dishwasher(this));*/ Tables = new List<Table>(); for (int i = 0; i < 10; i++) { Tables.Add(new Table(1, 1, 2)); } for (int i = 0; i < 10; i++) { Tables.Add(new Table(1, 1, 4)); } for (int i = 0; i < 5; i++) { Tables.Add(new Table(1, 1, 6)); } for (int i = 0; i < 5; i++) { Tables.Add(new Table(1, 1, 8)); } Tables.Add(new Table(2, 1, 10)); Tables.Add(new Table(2, 2, 10)); Reception = new Reception(); }
void HandleHighlight() { RaycastHit hit; Ray ray = new Ray(transform.position, transform.forward); if (Physics.Raycast(ray, out hit, 2)) { if (hit.transform.GetComponent <Countertop>()) { highlightedCountertop = hit.transform.GetComponent <Countertop>(); //highlightedCountertop.Highlight(true); } } }