Esempio n. 1
0
    private void Start()
    {
        if (PlayerPrefs.HasKey("DailyCount"))
        {
            Singleton.instance.DailyGifts = PlayerPrefs.GetInt("DailyCount");
        }
        else
        {
            Singleton.instance.DailyGifts = 1;
            DateTimeController.SaveDailyCount();
        }
        if (PlayerPrefs.HasKey("ButtonDaily"))
        {
            ActiveBtn = PlayerPrefs.GetInt("ButtonDaily");
        }
        else
        {
            ActiveBtn = 1;
            PlayerPrefs.SetInt("ButtonDaily", activeBtn);
        }

        if (ActiveBtn == 0)
        {
            buttonDaily.interactable = false;
        }
        else
        {
            buttonDaily.interactable = true;
        }
    }
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Esempio n. 3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
Esempio n. 4
0
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var vc = new DateTimeController(this)
            {
                Autorotate = dvc.Autorotate
            };

            DatePicker              = CreatePicker();
            DatePicker.Frame        = PickerFrameWithSize(DatePicker.SizeThatFits(SizeF.Empty));
            vc.View.BackgroundColor = tableView.BackgroundColor;
            vc.View.AddSubview(DatePicker);

            //dvc.PresentModalViewController(vc, true);
            dvc.ActivateController(vc, dvc);
        }
Esempio n. 5
0
    public void GettingGift()
    {
        NotificationManager.Send(TimeSpan.FromHours(24), "Daily gift!", "Daily gift available", Color.white);
        GameAnalytics.NewDesignEvent("DailyGift");
        switch (Singleton.instance.DailyGifts)
        {
        case 1:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(50));
            break;

        case 2:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(150));
            break;

        case 3:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(300));
            break;

        case 4:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(500));
            break;

        case 5:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(600));
            break;

        case 6:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(900));
            break;

        case 7:
            StartCoroutine(WriteVbles.sharedInstance.CountCoins(1500));
            SeventhDay();
            break;
        }

        AudioController.sharedInstance.SoundClaimGift();
        DateTimeController.SaveDateTime();
        dateTime.GetTime();
        PlayerPrefs.SetInt("ButtonDaily", 0);
        OnNotifyFalse();
        buttonDaily.interactable = false;
        StartCoroutine(AnimCoin());
    }
Esempio n. 6
0
    public void  FinishTimeRequest(string name)
    {
        if (gameObject.CompareTag("HoldOffTime"))
        {
            reminderText = "Please enter a surrender time for the " + name + " Hold Off.";
        }
        if (gameObject.CompareTag("CSEntrantTime"))
        {
            reminderText = "Please enter a Time Out for confined space entrant " + name + ".";
        }
        if (gameObject.CompareTag("CSEPTime"))
        {
            reminderText = "Please enter a surrender time for CSEP # " + name + ".";
        }
        DateTimeController timeController = FindObjectOfType <DateTimeController>();

        timeController.OpenTimePicker();
        Text controllerText = GameObject.Find("Canvas/TimePicker(Clone)/Text").GetComponentInChildren <Text>();

        controllerText.text = reminderText;
        timecheckactive     = true;
        GetNewTime();
    }
Esempio n. 7
0
    Text myText;               // text component of the date field


    // Use this for initialization
    void Start()
    {
        myDate = GameObject.FindObjectOfType <DateTimeController>();
        myText = GetComponent <Text>();
        SetDate();
    }
Esempio n. 8
0
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var vc = new DateTimeController(this) { Autorotate = dvc.Autorotate };
			DatePicker = CreatePicker();
			DatePicker.Frame = PickerFrameWithSize(DatePicker.SizeThatFits(SizeF.Empty));
			vc.View.BackgroundColor = tableView.BackgroundColor;
			vc.View.AddSubview(DatePicker);
		
			//dvc.PresentModalViewController(vc, true);
			dvc.ActivateController(vc, dvc);
		}
Esempio n. 9
0
 public void DeleteKeysAfterTwoDays()
 {
     Singleton.instance.DailyGifts = 1;
     DateTimeController.SaveDailyCount();
     Debug.Log("Han pasado dos días");
 }
Esempio n. 10
0
 void SeventhDay()
 {
     Debug.Log("Seventh Gift");
     Singleton.instance.DailyGifts = 0;
     DateTimeController.SaveDailyCount();
 }
Esempio n. 11
0
        public async Task <IList <MassMailTimeZoneInfo> > GetAllTimeZone()
        {
            DateTimeController objDateCon = new DateTimeController();

            return(await objDateCon.GetAllTimeZone());
        }