/// <summary> /// タスクを追加します /// </summary> /// <param name="addedTask">Add task.</param> private void addTask(BattleTask addedTask) { Debug.Log("added " + addedTask.getName()); tasks.Add(addedTask); listView.setTask(addedTask); battletaskIdCount++; chosenActiveSkill = null; inputActiveSkillList(); }
/// <summary> /// ステートがACTIONの時に毎フレーム行う処理 /// </summary> private void actionState() { BattleTask runTask = tasks[0]; Debug.Log("run " + runTask.getName()); if (runTask.getIsSkill()) { IActiveSkill runSkill = runTask.getSkill(); runSkill.action(player, runTask); if (ActiveSkillSupporter.isAffectSkill(runSkill)) { Debug.Log("into isAffect"); deleteTargetingLine(player); } } else { IItem runItem = runTask.getItem(); player.getInventory().useItem(runItem, player); } tasks.Remove(runTask); battleState = BattleState.IDLE; }
/// <summary> /// タスクを設定します /// </summary> /// <param name="task"> 設定するタスク </param> public void setTask(BattleTask task) { this.task = task; name.text = task.getName(); }