Example #1
0
        void AlarmEnabledChange(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled"));

            EnableAlarm(_selectedAlarm, e.IsChecked);
            if (!e.IsChecked)
            {
                StopRinging();
            }
        }
Example #2
0
        void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e)
        {
            var shouldAdd = PreferenceManager.GetDefaultSharedPreferences(this)
                            .GetBoolean(SettingsScreen.AddMarkerOnLongTap, SettingsScreen.AddMarkerOnLongTapDefaultValue);

            if (shouldAdd && Mode == Mode.None)
            {
                Mode = Mode.Add;
                MapClickWhileAddMode(e.Point);

                GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click,
                                                   "map long click used to add alarm");
            }
        }
        void AlarmEnabledChange(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            if (_selectedAlarm == null || _selectedAlarm.Enabled == e.IsChecked)
            {
                return;
            }

            EnableAlarm(_selectedAlarm, e.IsChecked);
            Mode = Mode.MarkerSelected;
            if (!e.IsChecked)
            {
                StopRinging();
            }

            GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled"));
        }
Example #4
0
	// Use this for initialization
	void Start ()
	{
		gameManager = GameObject.Find ("GameManager").GetComponent<GameManager> ();

        googleAnalyticsManager = GameObject.Find("GAv3").GetComponent<GoogleAnalyticsManager>();

		completeLevelSound = gameObject.GetComponent<AudioSource> ();
		currentSpawnRockQuantity = spawnRockQuantity;
        if (mode == 0)
        {
            autoShootingModeOn = false;
        }
        else 
        {
            autoShootingModeOn = true;
        }
	}
Example #5
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.delete:
                GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "alarm deleted");
                DeleteSelectedMarker();
                StopRinging();
                return(true);

            case Resource.Id.stop_noise:
                GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "sound muted");
                StopRinging();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
Example #6
0
	void Start ()
	{
		gameManager = GameObject.Find ("GameManager").GetComponent<GameManager> ();
        googleAnalyticsManager = GameObject.Find("GAv3").GetComponent<GoogleAnalyticsManager>();

		lifeBonus = gameObject.GetComponent<AudioSource> ();
		// Initialise total live value
		lives = totalLives;

		// Initialise high score array with 0s 
		if (!PlayerPrefs.HasKey ("HighScore-1")) {
			for (int i=0; i<10; i++) {
				highScore [i] = 0;
			}
		} else {
			for (int i=0; i<10; i++) {
				highScore [i] = PlayerPrefs.GetInt ("HighScore-" + (i + 1).ToString ());
			}
		}
	}
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                if (Mode != Mode.None)
                {
                    OnBackPressed();
                }
                return(true);

            case Resource.Id.add_alarm:
                Mode = Mode.Add;
                return(true);

            case Resource.Id.accept:
                if (Mode == Mode.Add)
                {
                    if (AcceptAdd())
                    {
                        Mode = Mode.None;
                        GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm added");
                    }
                }
                return(true);

            case Resource.Id.delete:
                DeleteSelectedMarker();
                StopRinging();
                Mode = Mode.None;
                GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm deleted");
                return(true);

            case Resource.Id.action_settings:
                OpenSettings();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
Example #8
0
 void Awake()
 {
     i = this;
 }