private void Start_Click(object sender, RoutedEventArgs e) { Ghost2.Visibility = Visibility.Visible; Ghost_Background.Pause(); Ghost2_Ef.Begin(); Ghost_Sound.Stop(); Ghost_Sound.Play(); }
// Start is called before the first frame update void Start() { //デフォルトでプレイヤーが設定されてない場合 if (player == null) { try { player = GameObject.FindGameObjectWithTag("Player"); } catch (System.NullReferenceException) { Debug.Log("プレイヤー未発見" + name); Destroy(gameObject); } } //デフォルトで泥棒が設定されてない場合 if (thief == null) { try { thief = GameObject.FindGameObjectWithTag("Thief"); } catch (System.NullReferenceException) { Debug.Log("Thief未発見" + name); Destroy(gameObject); } } //泥棒が見つかったら if (thief != null) { trb = thief.GetComponent <Rigidbody>(); ifThiefHide = thief.GetComponent <thiefHide>().ifHide; } GhostAnim = GetComponentInChildren <GhostAnimationController>(); SE = GetComponent <Ghost_Sound>(); SE.playSE(); GameOver = false; }
private void Ghost2_Ef_Completed(object sender, EventArgs e) { Ghost_Background.Stop(); Ghost_Sound.Stop(); NavigationService.Navigate(new Uri("/SolvePage.xaml", UriKind.Relative)); }
private void Ghost1_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e) { Ghost_Sound.Stop(); Ghost_Sound.Play(); Ghost_Sound_Ef.Begin(); }