Word Game Builder 2.0.1f2
Reference Manual
Public Member Functions | Properties | List of all members
IWordGamePlayer Interface Reference

An interface defining a word game player. Implementations must derive from MonoBehaviour in some form. More...

+ Inheritance diagram for IWordGamePlayer:
+ Collaboration diagram for IWordGamePlayer:

Public Member Functions

void ClearSelection ()
 Clears the player's selected tiles. Also deselected them if they implement ISelectableLetterTile. More...
 
bool DeselectTile (ILetterTile tile)
 Attempts to deselect a tile. If the tile implements ISelectableLetterTile, this follows selection rules. More...
 
void ResetAllData ()
 Resets all player data, and clears both selected and held tiles. More...
 
void ResetAllScores ()
 Resets all player scores. More...
 
void ResetBestWord ()
 Resets the best word. More...
 
void ResetHighScore ()
 Resets the high score. More...
 
void ResetLastWord ()
 Resets the last word. More...
 
void ResetScore ()
 Resets the current score. More...
 
bool SelectTile (ILetterTile tile)
 Attempts to select a tile. If the tile implements ISelectableLetterTile, this follows selection rules. More...
 
AsyncTask SubmitWord ()
 Submits the word for checking against the current langauge's word list. More...
 
- Public Member Functions inherited from IMonoBehaviour
void CancelInvoke ()
 Cancels all Invoke calls on this MonoBehaviour. More...
 
void CancelInvoke (string methodName)
 Cancels all Invoke calls with name methodName on this behaviour. More...
 
int GetInstanceID ()
 Returns the instance id of the object. More...
 
void Invoke (string methodName, float time)
 Invokes the method methodName in time seconds. More...
 
void InvokeRepeating (string methodName, float time, float repeatRate)
 Invokes the method methodName in time seconds. More...
 
bool IsInvoking ()
 Is any invoke pending on this MonoBehaviour? More...
 
bool IsInvoking (string methodName)
 Is any invoke on methodName pending? More...
 
Coroutine StartCoroutine (IEnumerator routine)
 Starts a coroutine. More...
 
Coroutine StartCoroutine (string methodName)
 Starts a coroutine named methodName. More...
 
Coroutine StartCoroutine (string methodName, object value)
 Starts a coroutine named methodName. More...
 
void StopAllCoroutines ()
 Stops all coroutines running on this behaviour. More...
 
void StopCoroutine (string methodName)
 Stops all coroutines named methodName running on this behaviour. More...
 
string ToString ()
 Returns the name of the game object. More...
 

Properties

string bestWord [get]
 Gets the player's best word. More...
 
int bestWordScore [get]
 Gets the score of the player's best word. More...
 
IList< ILetterTileheldTiles [get]
 Gets the list of held tiles. More...
 
int highScore [get]
 Gets the player's high score. More...
 
bool inputEnabled [get, set]
 Controls whether or not input has been enabled for this player. More...
 
WordGameResult lastResult [get]
 Gets the last word result. This value should be set before event callbacks. More...
 
string lastWord [get]
 Gets the player's last word. More...
 
int lastWordScore [get]
 Gets the score of the player's last word. More...
 
int maxTiles [get, set]
 The maximum amount of tiles that a player should hold. More...
 
bool multiplyByPermutations [get, set]
 If orderedWordCheck = false and multiplyByPermutations = true, the score will be multiplied by the amount of words found. More...
 
WGBEvent onWordResult [get, set]
 This event should fire whenever a word result is returned from a word check. More...
 
bool orderedWordCheck [get, set]
 Should word checks be ordered? More...
 
int score [get, set]
 Gets or sets the player's current score. More...
 
IList< ILetterTileselectedTiles [get]
 Gets a list of the player's play tiles. More...
 
- Properties inherited from IMonoBehaviour
bool enabled [get, set]
 Enabled Behaviours are Updated, disabled Behaviours are not. More...
 
GameObject gameObject [get]
 The game object this component is attached to. A component is always attached to a game object. More...
 
HideFlags hideFlags [get, set]
 Should the object be hidden, saved with the scene or modifiable by the user? More...
 
string name [get, set]
 The name of the object. More...
 
string tag [get, set]
 The tag of this game object. More...
 
Transform transform [get]
 The Transform attached to this GameObject. A component is always attached to a transform. More...
 
object userData [get, set]
 Additional user data associated with this object. This is unused by default. More...
 

Detailed Description

An interface defining a word game player. Implementations must derive from MonoBehaviour in some form.

Any implementation of this interface will work with other Word Game Builder classes. However, it is recommended to use the WordGamePlayer class instead.

Member Function Documentation

void ClearSelection ( )

Clears the player's selected tiles. Also deselected them if they implement ISelectableLetterTile.

Implemented in WordGamePlayer.

+ Here is the caller graph for this function:

bool DeselectTile ( ILetterTile  tile)

Attempts to deselect a tile. If the tile implements ISelectableLetterTile, this follows selection rules.

Parameters
tileThe tile to select.
Returns
True if the tile was deselected; otherwise, false.

Implemented in WordGamePlayer.

+ Here is the caller graph for this function:

void ResetAllData ( )

Resets all player data, and clears both selected and held tiles.

Implemented in WordGamePlayer.

void ResetAllScores ( )

Resets all player scores.

Implemented in WordGamePlayer.

void ResetBestWord ( )

Resets the best word.

Implemented in WordGamePlayer.

void ResetHighScore ( )

Resets the high score.

Implemented in WordGamePlayer.

void ResetLastWord ( )

Resets the last word.

Implemented in WordGamePlayer.

void ResetScore ( )

Resets the current score.

Implemented in WordGamePlayer.

+ Here is the caller graph for this function:

bool SelectTile ( ILetterTile  tile)

Attempts to select a tile. If the tile implements ISelectableLetterTile, this follows selection rules.

Parameters
tileThe tile to select.
Returns
True if the tile was selected; otherwise, false.

Implemented in WordGamePlayer.

+ Here is the caller graph for this function:

AsyncTask SubmitWord ( )

Submits the word for checking against the current langauge's word list.

This method should be asynchronous.

Returns
An object representing an asynchronous task.

Implemented in WordGamePlayer.

+ Here is the caller graph for this function:

Property Documentation

string bestWord
get

Gets the player's best word.

int bestWordScore
get

Gets the score of the player's best word.

IList<ILetterTile> heldTiles
get

Gets the list of held tiles.

Held tiles are tiles that belong to the player, but will not be submitted.

int highScore
get

Gets the player's high score.

Setting this value should automatically set a new high score, if it is higher than the previous high score.

bool inputEnabled
getset

Controls whether or not input has been enabled for this player.

It is the responsibilty of the letter tile to check for (or ignore) this value. This is handled automatically by the default LetterTile class.

WordGameResult lastResult
get

Gets the last word result. This value should be set before event callbacks.

string lastWord
get

Gets the player's last word.

int lastWordScore
get

Gets the score of the player's last word.

int maxTiles
getset

The maximum amount of tiles that a player should hold.

bool multiplyByPermutations
getset

If orderedWordCheck = false and multiplyByPermutations = true, the score will be multiplied by the amount of words found.

WGBEvent onWordResult
getset

This event should fire whenever a word result is returned from a word check.

bool orderedWordCheck
getset

Should word checks be ordered?

int score
getset

Gets or sets the player's current score.

IList<ILetterTile> selectedTiles
get

Gets a list of the player's play tiles.

Play tiles are tiles that will be submitted for checking.