/// <summary> /// 初期化処理 /// </summary> /// <param name="manager"></param> public void Initialize(GameManager manager) { // 大会情報 CupStatus.Text = EVManager.Instance.CurrentCupStatus; // チーム名 TeamName1.Text = manager.GameData.UserTeamSetting.Name; TeamName2.Text = manager.GameData.ComTeamSetting.Name; // 先攻/後攻 if (manager.GameData.UserTeamTopOrBottom) { TopOrBottomText1.Text = "先攻"; TopOrBottomText2.Text = "後攻"; } else { TopOrBottomText1.Text = "後攻"; TopOrBottomText2.Text = "先攻"; } // チャートへのバインド Chart1.Initialize(manager.GameData.UserTeamSetting); Chart2.Initialize(manager.GameData.ComTeamSetting); // 表示状態に変更 this.Visibility = Visibility.Visible; }
/// <summary> /// 試合中のBGMを再生する /// </summary> /// <param name="gameManager"></param> public static void PlayGameBGM(GameManager gameManager) { if (gameManager.GameData.IsLastInning && !gameManager.HighSpeedGameMode) { // 最終回のBGM PlayBGM(SoundBGMKind.tr01_Versus); } else { if (EVManager.Instance.IsFinalGame) { // 決勝戦のBGM PlayBGM(SoundBGMKind.tr03_Charge); } else if (EVManager.Instance.CurrentCup == CupKind.SpringKoshien || EVManager.Instance.CurrentCup == CupKind.SummerKoshien) { // 甲子園のBGM PlayBGM(SoundBGMKind.mao_9_medley01); } else { // 通常試合のBGM PlayBGM(SoundBGMKind.tr08_TheDecisiveBattle); } } }
/// <summary> /// 初期化処理 /// </summary> /// <param name="manager"></param> public void Initialize(GameManager manager) { m_GameManager = manager; // チームのイニシャル名の設定 TopTeamName.Text = GameData.TopTeamSetting.InitialName; BottomTeamName.Text = GameData.BottomTeamSetting.InitialName; // コントロールのプロパティの初期設定(アニメーション実行後に元の値に戻るため必要) MistakeInfo.Opacity = 0; CatcherMistakeInfo.Opacity = 0; CountCall.Opacity = 0; CountCallBack.Opacity = 0; BollInfo1.Opacity = 0; BollInfo2.Opacity = 0; LeftSwing.Opacity = 0; LeftBunt.Opacity = 0; RightSwing.Opacity = 0; RightBunt.Opacity = 0; ImpactEffect.Opacity = 0; // 複数行ボタン名の設定(改行含む文字列はここからしか設定できないため) FastBollButton1.Content = "直球" + Environment.NewLine + "甘いコース"; FastBollButton2.Content = "直球" + Environment.NewLine + "厳しいコース"; FastBollButton3.Content = "直球" + Environment.NewLine + "わずかにボール"; BreakingButton1.Content = "変化球" + Environment.NewLine + "甘いコース"; BreakingButton2.Content = "変化球" + Environment.NewLine + "厳しいコース"; BreakingButton3.Content = "変化球" + Environment.NewLine + "わずかにボール"; SafetyBuntButton.Content = "セーフティ" + Environment.NewLine + "バント"; }
/// <summary> /// 消滅 /// </summary> public void Dispose() { m_GameManager = null; m_PreviousBatter = null; m_PreviousPitcher = null; }