示例#1
0
 public void DoClock(Context context, int hour)
 {
     if (9 <= hour && hour < 17)
     {
         context.ChangeState(DayState.GetInstance());
     }
 }
 // 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); });
 }