Ejemplo n.º 1
0
    private void OpenClose()
    {
        // pre open time
        if (_timeLink.GetCurrentTime() == preOpeningHour && !preOpenBool)
        {
            _timeLink.StopTimer();
            _timeLink.StartTimer();
            preOpenBool = true;

            // create UI stuff to show next day
        }

        //open time
        else if (_timeLink.FCurrentHour == openingHour && !openOnce)
        {
            arcadeStatus = ArcadeOpeningStatus.Open;
            mainDoors.OpenDoor();

            openOnce     = true;
            preOpenBool  = false;
            closedOnce   = false;
            doorAnimBool = true;
        }
        //close time
        else if (_timeLink.FCurrentHour == closingHour && !closedOnce)
        {
            if (_economyLink.Bankrupt == true)
            {
                _timeLink.StopTimer();
                _economyLink.bankruptcyUI.SetActive(true);
                _economyLink.bankruptcyUI.GetComponent <BankruptcyUIController>().Bankrupt();
            }
            customerManager.MassLeave();
            arcadeStatus = ArcadeOpeningStatus.Closed;
            // enable UI element to show data of the day

            closedOnce = true;
            openOnce   = false;
            _economyLink.ClosingTime();
        }
    }
Ejemplo n.º 2
0
 public void BaseSpeed()
 {
     timeAndCalendarLink.StartTimer();
 }