Package com.prineside.tdi2.systems
Class QuestSystem.RegularQuest
java.lang.Object
com.prineside.tdi2.systems.QuestSystem.RegularQuest
- All Implemented Interfaces:
QuestSystem.Quest
- Direct Known Subclasses:
QuestSystem.BasicLevelQuest
,QuestSystem.BasicLevelWaveQuest
- Enclosing class:
- QuestSystem
-
Constructor Summary
ConstructorsConstructorDescriptionRegularQuest
(String id, CharSequence title, double requiredValue, com.badlogic.gdx.utils.Array<ItemStack> prizes, GameSystemProvider systemProvider) -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.prineside.tdi2.systems.QuestSystem.Quest
onCompletion
-
Constructor Details
-
RegularQuest
public RegularQuest(String id, CharSequence title, double requiredValue, com.badlogic.gdx.utils.Array<ItemStack> prizes, GameSystemProvider systemProvider)
-
-
Method Details
-
getValue
public abstract double getValue() -
getTitle
Description copied from interface:QuestSystem.Quest
Отдает название при создании квеста. Чтобы изменить название во время update(): questSystem.getListItem(quest).setText("New title")- Specified by:
getTitle
in interfaceQuestSystem.Quest
- Returns:
- заголовок квеста в чистом виде (не ключ для i18n)
-
update
public void update()Description copied from interface:QuestSystem.Quest
Вызывается каждый раз при обновлении квестов. Можно использовать для изменения названия квеста или его статуса (например, перечеркнуть, если уже провален)- Specified by:
update
in interfaceQuestSystem.Quest
-
isCompleted
public boolean isCompleted()- Specified by:
isCompleted
in interfaceQuestSystem.Quest
- Returns:
- true, если квест выполнен. Это удалит его из массива квестов системы и вызовет onCompletion()
-