예제 #1
0
 void Start()
 {
     repu          = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Reputation>();
     money         = GameObject.FindGameObjectWithTag("GameManager").GetComponent <MoneyCounter>();
     passangerData = GameObject.FindGameObjectWithTag("Notepad").GetComponent <StorePassangerData>();
     currentState  = driverState.waiting;
 }
예제 #2
0
    private void Start()
    {
        repu = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Reputation>();

        passangerData = GameObject.FindGameObjectWithTag("Notepad").GetComponent <StorePassangerData>();

        waitingTime = Random.Range(10, 20);

        // randomize things
        passengerID       = Random.Range(100, 10000);
        passengerLocation = locations[Random.Range(0, locations.Length)];
        time              = Random.Range(5, 20);
        passangerName     = names[Random.Range(0, names.Length)];
        emergency         = Random.Range(0, 11);
        money             = Random.Range(10, 101);
        profilePic.sprite = profilePics[Random.Range(0, profilePics.Length)];

        namePlate.text        = passangerName;
        emergencySlider.value = emergency;
        moneyPlate.text       = money.ToString();
        TimeTakenPlate.text   = time.ToString();
    }