/// <summary> /// 初期設定を行います /// </summary> /// <param name="character">表示するキャラクター</param> /// <param name="window">元となるウィンドウ</param> public void setState(IPlayable character, MenuUseWindow window) { this.character = character; this.window = window; Debug.Log("character " + character.getName()); //デバッグ character.healed(1, Skill.ActiveSkillParameters.HealSkillAttribute.HP_HEAL); nameText.text = character.getName(); }
/// <summary> /// 選ばれた時の処理 /// </summary> public void chosen() { Debug.Log("character " + character.getName()); //デバッグ character.healed(1, Skill.ActiveSkillParameters.HealSkillAttribute.HP_HEAL); window.targetChosen(character); }
/// <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" : "なし"; }