// Start is called before the first frame update
    void Start()
    {
        ModeManager.SetMode(Mode.SET_TIME);
        CurrentHour = Time.GetHour().ToString();
        if (Time.GetMinute() <= 9)
        {
            CurrentMin = "0" + Time.GetMinute().ToString();
        }
        else
        {
            CurrentMin = Time.GetMinute().ToString();
        }

        AlarmHour    = Alarm.GetHour().ToString();
        AlarmMin     = Alarm.GetMinute().ToString();
        AlarmUI.text = "";

        AlarmOff.onClick.AddListener(TurnAlarmOff);
        ShowAlarm.onClick.AddListener(ShowAlarmFunction);
        ShowTime.onClick.AddListener(ShowTimeFunction);
        CurrentMinUp.onClick.AddListener(MinutePlusOne);
        SetAlarm.onClick.AddListener(SetAlarmFunction);
        SnoozeButton.onClick.AddListener(Snooze);

        StartCoroutine("IncreaseMinute");
    }
 public void GetPhoto(Texture2D photo)
 {
     Debug.Log("got photo");
     mm.SetMode(ModeManager.ModeManagerMode.Preview);
     try
     {
         GameObject.FindGameObjectWithTag("PictureFrame").GetComponent <Renderer>().material.mainTexture = photo;
     }
     catch (Exception e)
     {
         Debug.Log(e);
     }
     AddPhotoToRoll(photo);
     currentImage = photo;
 }
Ejemplo n.º 3
0
 void Select()
 {
     // Debug.Log("Selected");
     modeManager.SetMode(mode);
 }
Ejemplo n.º 4
0
 private void OnDisable()
 {
     modeManager.SetMode(0);
 }
 public void TimeSetTest()
 {
     modeManager.SetMode(Mode.SET_TIME);
     Assert.AreEqual(Mode.SET_TIME, modeManager.GetMode());
 }
Ejemplo n.º 6
0
        public void Off()
        {
            ModeManager modeMgr = new ModeManager();

            modeMgr.SetMode(Mode.ALARM_OFF);
        }
Ejemplo n.º 7
0
        public void On()
        {
            ModeManager modeMgr = new ModeManager();

            modeMgr.SetMode(Mode.ALARM_ON);
        }