private void MainPage_Loaded(object sender, RoutedEventArgs e) { DataService.Instance.Dispatcher = new DispatcherWrapper(Dispatcher); BackgroundContainer.Blur(20, 0).Start(); if (_isHost) { if (App.IsXbox()) { PlayPause.Focus(FocusState.Keyboard); } this.PointerMoved += MainPage_PointerMoved; this.KeyDown += MainPage_KeyDown; _playerService.PropertyChanged += _dataService_PropertyChanged; _timer = new DispatcherTimer(); _timer.Interval = TimeSpan.FromSeconds(10); _timer.Tick += _timer_Tick; _timer.Start(); } else { AddButton.Focus(FocusState.Pointer); UserSongCollection.ItemsSource = (_viewModel as ClientViewModel).UserSongs; var t = (_viewModel as ClientViewModel).LoadUserSongs(); this.SizeChanged += MainPage_SizeChanged; } }
// Start is called before the first frame update void Start() { thisObj = this.transform; audioManager = FindObjectOfType <AudioManager>(); playCube = GameObject.Find("Cube"); playPauseScript = playCube.GetComponent <PlayPause>(); }
void Awake() { rb = gameObject.GetComponent <Rigidbody>(); audioManager = FindObjectOfType <AudioManager>(); playCube = GameObject.Find("Cube"); playPauseScript = playCube.GetComponent <PlayPause>(); }
void Awake() { rate = 0.8f; depth = 0.03f; audioManager = FindObjectOfType <AudioManager>(); playCube = GameObject.Find("Cube"); playPauseScript = playCube.GetComponent <PlayPause>(); }
void Awake() { foreach (Sound s in sounds) { s.source = gameObject.AddComponent <AudioSource>(); s.source.clip = s.clip; s.source.volume = s.volumn; s.source.pitch = s.pitch; } current = Array.Find(sounds, sound => sound.name == "TNPN"); playpauseAni = gameObject.GetComponent <PlayPause>(); audioChrousFilter = gameObject.GetComponent <AudioChorusFilter>(); }
protected override void OnMouseDown(MouseEventArgs e) { if (e.Location.Y > Height - TimelineHeight) { _navTimeline = true; } //if (distance(e.Location, _tbSpeed.Grab) < 6) // _tbSpeed.Nav = true; if (distance(e.Location, _tbVolume.Grab) < 6) { _tbVolume.Nav = true; } if (distance(e.Location, new Point(Width - 20, Height - TimelineHeight - 20)) < 20) { PlayPause?.Invoke(this); } }
public void PlayPauseTest() { PlayPause request = new PlayPause(1, true); var result = JsonConvert.DeserializeObject <KodiJSON.Player.Response.PlayPauseResponse>(ExecuteTest.GetResponse(request)); }
void Awake() { instance = this; }
public static void OnPlayPause() { PlayPause?.Invoke(null, null); }