Represents a word game player. It tracks scores, holds tiles, and can be controlled by an AI agent.
More...
|
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 | Initialize (int highScore, string bestWord, int bestWordScore, string lastWord, int lastWordScore, IList< string > previousWords, int lastPenalty) |
| Initialize the player. 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 | ResetLastPenalty () |
| Resets the last penalty. More...
|
|
void | ResetLastWord () |
| Resets the last word. More...
|
|
void | ResetPreviousWords () |
| Resets all previous words. 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...
|
|
AsyncTask | SubmitWord (float wordMultiplier) |
| Submits the word for checking against the current langauge's word list. More...
|
|
AsyncTask | SubmitWord (WordGameLanguage language, float wordMultiplier=1) |
| Submits the word for checking against the specified langauge's word list. More...
|
|
T | GetComponentFromInterface< T > () |
| Gets a component from its interface type. More...
|
|
T | GetComponentInChildrenFromInterface< T > () |
| Gets a component from its interface type, searching through this GameObject and all children. More...
|
|
T[] | GetComponentsFromInterface< T > () |
| Gets all components from its interface type. More...
|
|
T[] | GetComponentsInChildrenFromInterface< T > () |
| Gets all components from its interface type, searching through this GameObject and all children. More...
|
|
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...
|
|
|
static IWordGamePlayer | FindPlayer (string name) |
| Finds a player by name. More...
|
|
static IWordGamePlayer[] | GetAllPlayers () |
| Finds all active players in the scene. More...
|
|
static T | FindObjectOfTypeFromInterface< T > () |
| Finds the first object of interface type T. More...
|
|
static T[] | FindObjectsOfTypeFromInterface< T > () |
| Finds all objects of interface type T. More...
|
|
static T | InstantiateFromInterface< T > (T original) |
| Instantiate a GameObject from interface type T. More...
|
|
static T | InstantiateFromInterface< T > (T original, Vector3 position, Quaternion rotation) |
| Instantiate a GameObject from interface type T at the specified position and rotation. More...
|
|
static void | Log (object message, string prefix, string type) |
| Logs a prefixed message. More...
|
|
static void | Log (object message, string prefix, string type, Object context) |
| Logs a prefixed message, with context. More...
|
|
static void | LogError (object message, string prefix, string type) |
| Logs a prefixed erorr. More...
|
|
static void | LogError (object message, string prefix, string type, Object context) |
| Logs a prefixed exception, with context. More...
|
|
static void | LogException (System.Exception ex) |
| Logs an exception. More...
|
|
static void | LogException (System.Exception ex, Object context) |
| Logs an exception, with context. More...
|
|
static void | LogWarning (object message, string prefix, string type) |
| Logs a prefixed warning. More...
|
|
static void | LogWarning (object message, string prefix, string type, Object context) |
| Logs a prefixed warning, with context. More...
|
|
|
string | bestWord [get] |
| Gets the player's best word. More...
|
|
int | bestWordScore [get] |
| Gets the score of the player's best word. More...
|
|
IList< ILetterTile > | heldTiles [get] |
| Gets the list of the player's 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...
|
|
int | lastPenalty [get] |
| Gets the last penalty value applied to the player. More...
|
|
WordGameResult | lastResult [get] |
| Gets the last word result. This value is 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 true, the score will be multiplied by the amount of permutations found. More...
|
|
WGBEvent | onWordResult [get, set] |
| This event fires whenever a word result is returned from a word check. More...
|
|
bool | orderedWordCheck [get, set] |
| Should word checks be ordered? More...
|
|
string | playerID [get, set] |
| The player ID. Use this for games with multiple players. More...
|
|
IList< string > | previousWords [get] |
| Gets the list of previous words used by the player. More...
|
|
int | previousWordsCapacity [get, set] |
| The amount of previous words to track. More...
|
|
int | score [get, set] |
| Gets or sets the player's current score. More...
|
|
int | scorePenalty [get, set] |
| The penalty for submitting the same word multiple times, multiplied by the number of pervious submissions. More...
|
|
IList< ILetterTile > | selectedTiles [get] |
| Gets the list of the player's selected tiles. More...
|
|
string | wordStringPlural [get, set] |
| The plural string for "word". Used for localization. More...
|
|
string | wordStringSingular [get, set] |
| The singular string for "word". Used for localization. More...
|
|
object | userData [get, set] |
| Additional user data associated with this object. This is unused by default. More...
|
|
string | bestWord [get] |
| Gets the player's best word. More...
|
|
int | bestWordScore [get] |
| Gets the score of the player's best word. More...
|
|
IList< ILetterTile > | heldTiles [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< ILetterTile > | selectedTiles [get] |
| Gets a list of the player's play tiles. More...
|
|
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...
|
|
Represents a word game player. It tracks scores, holds tiles, and can be controlled by an AI agent.
This class contains many convenient methods for creating a word game.
- Note
- Loading and saving scores from disk are not implemented - in order to have persistent data, the player will need to be initialized on load.