|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.fdi.hysteria.game.scene.Topic
public class Topic
This class implements a topic to talk about
Field Summary | |
---|---|
protected boolean |
_enabled
|
protected boolean |
_final
|
protected java.lang.String |
_text
|
protected java.lang.String |
_title
|
protected boolean |
_watched
|
Constructor Summary | |
---|---|
Topic(java.lang.String title,
java.lang.String text)
Constructor |
|
Topic(java.lang.String title,
java.lang.String text,
boolean end)
Constructor |
|
Topic(java.lang.String title,
java.lang.String text,
boolean end,
boolean enabled)
Constructor |
Method Summary | |
---|---|
void |
addItem(Item i)
It adds an item to the topic |
boolean |
addRelated(Topic topic,
boolean enable)
It adds a topic to enable or disable after this topic ends. |
java.lang.Object |
clone()
|
ItemRepository |
getItems()
It returns the items linked |
java.lang.String |
getTitle()
It returns the topic title |
boolean |
givesItem()
This topic gives any item? |
boolean |
isEnabled()
Is the topic enabled? |
boolean |
isFinal()
Is the topic final (And ends the scene)? |
java.lang.String |
reportText()
It returns the topic text if it's enabled, and then enables or disables the topics related. |
void |
setEnabled(boolean enabled)
Sets the "enabled" flag to the value given |
boolean |
wasWatched()
Was the topic watched? |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean _enabled
protected boolean _watched
protected boolean _final
protected java.lang.String _title
protected java.lang.String _text
Constructor Detail |
---|
public Topic(java.lang.String title, java.lang.String text)
title
- The topic titletext
- The topic textpublic Topic(java.lang.String title, java.lang.String text, boolean end)
title
- The topic titletext
- The topic textend
- Is the topic final?public Topic(java.lang.String title, java.lang.String text, boolean end, boolean enabled)
title
- The topic titletext
- The topic textend
- Is the topic final?enabled
- Is the topic enabled?Method Detail |
---|
public java.lang.String getTitle()
public java.lang.String reportText()
public boolean wasWatched()
public boolean isEnabled()
public boolean isFinal()
public void setEnabled(boolean enabled)
enabled
- The valuepublic boolean addRelated(Topic topic, boolean enable)
topic
- The topicenable
- It has to enable, or disable the topic?
public void addItem(Item i)
i
- The itempublic boolean givesItem()
public ItemRepository getItems()
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |