Пример #1
0
        /// <summary>
        /// キャラクターのパラメータを表示せます
        /// </summary>
        /// <param name="character">表示させたいキャラクター</param>
        public void setCharacter(IPlayable character)
        {
            nameText.text = character.getName();

            parameterView.setAbilities(character.getLevel(), character.getBattleAbilities(), character.getFriendlyAbilities());

            var weapon = character.getWeapon();

            weaponText.text = (weapon != null) ?  "E:" + weapon.getName() : "武器非装備";
            var armor = character.getArmor();

            armorText.text = (armor != null) ? "E:" + armor.getName() : "防具非装備";

            hpBar.fillAmount = (float)character.getHp() / (float)character.getMaxHp();
            mpBar.fillAmount = (float)character.getMp() / (float)character.getMaxMp();
            hpValue.text     = character.getHp() + "/" + character.getMaxHp();
            mpValue.text     = character.getMp() + "/" + character.getMaxMp();

            metalText.text += (character is Player) ? ((Player)character).getMetal() + "mt" : "なし";
        }