Add Alot of stuff, Computer, repairStation, Whole game, Many things!
This commit is contained in:
27
UIElementsSchema/Assets/CustomerManager.cs
Normal file
27
UIElementsSchema/Assets/CustomerManager.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CustomerManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject _customerPrefab;
|
||||
[SerializeField] private Transform _customerSpawnPoint;
|
||||
|
||||
private
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.T)) {
|
||||
GameObject customer = Instantiate(_customerPrefab, _customerSpawnPoint.position, Quaternion.identity);
|
||||
if (customer.TryGetComponent<CustomerController>(out CustomerController customerController)) {
|
||||
customerController.SetDestination(new Vector3(0, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user