/// <summary> /// ヒントUI、メッセージを初期化 /// </summary> private void InitHint() { hintPos = new Vector2(30, Def.WindowDef.WINDOW_HEIGHT - 30); hintUI = new DungeonHintUI(gameDevice); hintUI.SetPosition(hintPos); hintUI.Switch(false); hintUI.SetSpeed(0.07f); hint = new string[(int)ButtonEnum.NULL]; hint[(int)ButtonEnum.Dungeonbutton] = "ダンジョン:ダンジョンへ冒険する"; hint[(int)ButtonEnum.Guildtbutton] = "ギルド:ギルドから依頼を受ける"; hint[(int)ButtonEnum.Shopbutton] = "ショップ:アイテムを売買できる"; hint[(int)ButtonEnum.Upgradebutton] = "鍛冶屋:武器や防具の強化ができる"; hint[(int)ButtonEnum.Depotbutton] = "倉庫:アイテムを保存できる"; }
/// <summary> /// ヒントUIの更新 /// </summary> private void UpdateHint() { hintUI.Update(); Vector2 pos = Vector2.Lerp(hintPos + new Vector2(200, 0), hintPos, hintUI.CurrentAlpha()); hintUI.SetPosition(pos); //文字位置調整 if (onButton == ButtonEnum.NULL) //マウスがボタン上でない場合 { hintUI.Switch(false); //表示しない return; } hintUI.Switch(true); //表示する hintUI.SetMessage(hint[(int)onButton]); //Hint文字設定 }