예제 #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));
        }
        private void Start()
        {
            MasterAudio.PlaySound("Battle_001");

            Global.BattleManager.PrepareBattle();

            var setting = new BattleLog.Setting("バトルかいし!");

            BattleUIManager.I.BattleLog.SetMessage(setting);
        }
예제 #3
0
        public void Damage(CharacterStatus attacker)
        {
            var damage = attacker.Attack;

            Status.Damage(damage);

            BattleUIManager.I.StatusPanel.Setup(Status, Global.Inventory.Gold);

            // ログ表示
            var messages = new List <string>()
            {
                $"{attacker.CharaName}のこうげき!",
                $"{CharaName}に\n{damage}のダメージ!",
            };
            var setting = new BattleLog.Setting(messages);

            BattleUIManager.I.BattleLog.SetMessage(setting);

            MainCamera.I.Shake();
        }
예제 #4
0
        public void Damage(CharacterStatus attacker)
        {
            var damage = attacker.Attack;

            Status.Damage(damage);

            if (IsDead)
            {
                onDead.SafeCall();
            }

            // ログ表示
            var messages = new List <string>()
            {
                $"{attacker.CharaName}のこうげき!",
                $"{CharaName}に\n{damage}のダメージ!",
            };
            var setting = new BattleLog.Setting(messages);

            BattleUIManager.I.BattleLog.SetMessage(setting);
        }