Esempio n. 1
0
        //private float waitTime { get; set; }
        //public float startWaitTime;

        // 2. Each (as defind in GameStarter script) seconds 1 customer enters the store, moves to a pre defined free random point and stops
        // need to control points
        // Start is called every time the script is enabled and before the first frame update
        // Construct the list of move points
        void Start()
        {
            CustomerDeathEvent.RegisterListener(OnCustomerDied);

            gs = gameStarterGameObject.GetComponentInChildren <GameStarter>();
            // waitTime = startWaitTime;

            ListOfKitchenMovePoints  = new List <NewPoint>();
            ListOfCustomersWandering = new List <NewCustomer>();

            startingPoint = new NewPoint(kitchenDoorSpawnPoint);

            // because the point was not made the best way we need to initialize the points this way
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint01));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint02));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint03));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint04));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint05));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint06));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint07));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint08));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint09));
            ListOfKitchenMovePoints.Add(new NewPoint(kitchenMovePoint10));

            customerIsOnTheTour = false;
        }
Esempio n. 2
0
        public void OnCustomerDied(CustomerDeathEvent customerDeath)
        {
            //Debug.Log("customersWandering size: " + ListOfCustomersWandering.Count);
            //NewCustomer customer = ListOfCustomersWandering[0];
            NewCustomer customer = customerDeath.DeadCustomerGO.GetComponent <NewCustomer>();

            ListOfCustomersWandering.Remove(customer);

            //add customer to OutsidePool list
            gs.AddCustomer(customer);
        }