Word Game Builder 2.0.1f2
Reference Manual
|
An interface defining a pool of letter tiles. Implementations must derive from MonoBehaviour in some form. More...
Public Member Functions | |
bool | Contains (Letter letter) |
Returns true if the tile pool currently contains the specified letter. This method does not look at spawned tiles. More... | |
void | CreateTile (Letter letter) |
Spawns a brand new tile into the pool, based on the specified letter. More... | |
void | CreateTilePool () |
Creates the tile pool. More... | |
void | DestroyAllTiles () |
Destroys all tiles that were created by this tile pool (whether it is currently in the pool or not). More... | |
void | DestroyTile (ILetterTile tile) |
Destroys the tile from the scene, if the tile is associated with the pool. More... | |
void | DistributeTiles (IWordGamePlayer player) |
Distributes the specified amount of tiles to the specified IWordGamePlayer, up to the player's maximum tile count. More... | |
void | DistributeTiles (IWordGamePlayer player, int count) |
Distributes the specified amount of tiles to the specified IWordGamePlayer, up to count or the player's maximum tile count (whichever comes first). More... | |
void | DistributeTiles (IWordGamePlayer player, Letter letter, int count) |
Distributes the specified amount of tiles, with the specified letter, to the specified IWordGamePlayer, up to count or the player's maximum tile count (whichever comes first). More... | |
void | DistributeTiles (IWordGamePlayer player, IList< Letter > letters) |
Distributes the specified list of letters to the specified IWordGamePlayer, up to the length of the specified letter list or the player's maximum tile count (whichever comes first). More... | |
int | GetOccurances (Letter letter) |
Gets the amount of occurances of the specified letter within the tile pool. This method does not look at spawned tiles. More... | |
int | IndexOf (Letter letter) |
Determines the index of a specific letter in the ITilePool. More... | |
void | Insert (ILetterTile item) |
Inserts a tile into the pool at a random position, if it does not already contain it. More... | |
int | LastIndexOf (Letter letter) |
void | ResetTilePool () |
Resets the tile pool. 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 | |
WordGameLanguage | language [get, set] |
The language associated with the tile pool. More... | |
int | lastDistributionCount [get] |
Gets the last tile distribution count. This value is set before event callbacks. More... | |
WGBEvent | onTileDistribution [get, set] |
This event should fire when a tile is distributed from the tile pool. More... | |
Dictionary< Letter, int > | tileDistribution [get] |
Gets the tile distribution dictionary. 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... | |
An interface defining a pool of letter tiles. 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 TilePool class instead.
bool Contains | ( | Letter | letter | ) |
Returns true if the tile pool currently contains the specified letter. This method does not look at spawned tiles.
letter | The letter to search for. |
Implemented in TilePool.
void CreateTile | ( | Letter | letter | ) |
Spawns a brand new tile into the pool, based on the specified letter.
letter | The letter to spawn. |
Implemented in TilePool.
void CreateTilePool | ( | ) |
Creates the tile pool.
This destroys any tiles currently created by the pool (whether it is in the pool or not), and instantiates tile pool objects based on the letter distribution.
Implemented in TilePool.
void DestroyAllTiles | ( | ) |
Destroys all tiles that were created by this tile pool (whether it is currently in the pool or not).
If a tile's parent object is changed, it will not be destroyed with this method and will become unmanaged by the pool.
Implemented in TilePool.
void DestroyTile | ( | ILetterTile | tile | ) |
Destroys the tile from the scene, if the tile is associated with the pool.
This will fully destroy the tile and remove it from any player's possession. Beware - this is a destructive operation in edit mode!
tile | The tile to destroy. |
Implemented in TilePool.
void DistributeTiles | ( | IWordGamePlayer | player | ) |
Distributes the specified amount of tiles to the specified IWordGamePlayer, up to the player's maximum tile count.
This automatically removes the tile from the tile pool, and gives them to the player. The tile must still be spawned.
player | The player to distribute tiles to. |
Implemented in TilePool.
void DistributeTiles | ( | IWordGamePlayer | player, |
int | count | ||
) |
Distributes the specified amount of tiles to the specified IWordGamePlayer, up to count or the player's maximum tile count (whichever comes first).
This method automatically removes the tile from the tile pool, and gives them to the player. The tile must still be spawned.
Thinksquirrel.WordGameBuilder.ObjectModel.IWordGamePlayer
player | The player to distribute tiles to. |
count | The amount of tiles to attempt to distribute. |
Implemented in TilePool.
void DistributeTiles | ( | IWordGamePlayer | player, |
Letter | letter, | ||
int | count | ||
) |
Distributes the specified amount of tiles, with the specified letter, to the specified IWordGamePlayer, up to count or the player's maximum tile count (whichever comes first).
This method automatically removes the tile from the tile pool, and gives them to the player. The tile must still be spawned.
Thinksquirrel.WordGameBuilder.ObjectModel.IWordGamePlayer
player | The player to distribute tiles to. |
letter | The letter to distribute. |
count | The amount of tiles to attempt to distribute. |
Implemented in TilePool.
void DistributeTiles | ( | IWordGamePlayer | player, |
IList< Letter > | letters | ||
) |
Distributes the specified list of letters to the specified IWordGamePlayer, up to the length of the specified letter list or the player's maximum tile count (whichever comes first).
Letters not currently available will NOT be distributed. This method automatically removes the tile from the tile pool, and gives them to the player. The tile must still be spawned.
Thinksquirrel.WordGameBuilder.ObjectModel.IWordGamePlayer
player | The player to distribute tiles to. |
letters | The letters to attempt to distribute. |
Implemented in TilePool.
int GetOccurances | ( | Letter | letter | ) |
Gets the amount of occurances of the specified letter within the tile pool. This method does not look at spawned tiles.
letter | The letter to search for. |
Implemented in TilePool.
int IndexOf | ( | Letter | letter | ) |
Determines the index of a specific letter in the ITilePool.
letter | The letter to search for. |
Implemented in TilePool.
void Insert | ( | ILetterTile | item | ) |
Inserts a tile into the pool at a random position, if it does not already contain it.
item | The tile to insert. |
Implemented in TilePool.
int LastIndexOf | ( | Letter | letter | ) |
Determines the last index of a specific letter in the ITilePool.
letter | The letter to search for. |
Implemented in TilePool.
void ResetTilePool | ( | ) |
Resets the tile pool.
This will despawn all tiles, reshuffle all tiles, and put all tiles that belong to this object back into the pool.
Implemented in TilePool.
|
getset |
The language associated with the tile pool.
|
get |
Gets the last tile distribution count. This value is set before event callbacks.
|
getset |
This event should fire when a tile is distributed from the tile pool.
|
get |
Gets the tile distribution dictionary.
This dictionary is only used at runtime. To add or remove from the dictionary in the editor, call the Add and Remove methods on the TilePool class.