Add Alot of stuff, Computer, repairStation, Whole game, Many things!
This commit is contained in:
42
Assets/Customer/CustomerVisibleController.cs
Normal file
42
Assets/Customer/CustomerVisibleController.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Customer {
|
||||
public enum MoodState {
|
||||
Normal,
|
||||
Angry
|
||||
}
|
||||
|
||||
public class CustomerVisibleController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject _customerNomal;
|
||||
[SerializeField] private GameObject _customerAngry;
|
||||
|
||||
private MoodState _state = MoodState.Normal;
|
||||
|
||||
private void SetNormal() {
|
||||
_customerNomal.SetActive(true);
|
||||
_customerAngry.SetActive(false);
|
||||
}
|
||||
|
||||
private void SetAngry() {
|
||||
_customerNomal.SetActive(false);
|
||||
_customerAngry.SetActive(true);
|
||||
}
|
||||
|
||||
public void SetState(MoodState state) {
|
||||
_state = state;
|
||||
switch (_state) {
|
||||
case MoodState.Normal:
|
||||
SetNormal();
|
||||
break;
|
||||
case MoodState.Angry:
|
||||
SetAngry();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public MoodState GetState() {
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user