Exemplo n.º 1
0
 public void DoClock(Context context, int hour)
 {
     if (9 <= hour && hour < 17)
     {
         context.ChangeState(DayState.GetInstance());
     }
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Awake()
 {
     state = DayState.GetInstance();
     buttonUse.onClick.AddListener(() => { ActionPerformed(buttonUse); });
     buttonAlarm.onClick.AddListener(() => { ActionPerformed(buttonAlarm); });
     buttonPhone.onClick.AddListener(() => { ActionPerformed(buttonPhone); });
     buttonExit.onClick.AddListener(() => { ActionPerformed(buttonExit); });
 }