Esempio n. 1
0
        /// <summary>
        /// レベルアップ
        /// </summary>
        public IEnumerator LevelUp()
        {
            var currentStatus = new CharacterStatus();

            currentStatus.Attack  = Status.Attack;
            currentStatus.Defense = Status.Defense;

            // レベルアップ処理
            Status.Level++;
            var statusTableKey = $"Level_{Status.Level.ToString().PadLeft(2, '0')}";
            var statusRow      = PlayerStatusTable.Instance.GetRow(statusTableKey);

            Status.UpdateStatus(statusRow);
            // ステータスパネル初期化
            BattleUIManager.I.StatusPanel.Setup(Status, Global.Inventory.Gold);

            var message = BattleLog.GetBattleLevelupMessage(CharaName, Status.Level);

            BattleUIManager.I.BattleLog.SetMessage(message);

            yield return(new WaitForSeconds(2f));

            // ステータスアップ表示①
            var messages = new List <string>()
            {
                $"こうげき が{Status.Attack - currentStatus.Attack}アップ!",
                $"ぼうぎょ {Status.Defense - currentStatus.Defense}アップ!",
            };
            var setting = new BattleLog.Setting(messages);

            BattleUIManager.I.BattleLog.SetMessage(setting);

            yield return(new WaitForSeconds(2f));
        }