... | ... | @@ -188,3 +188,116 @@ Array of possible choices. |
|
|
|
|
|
Number of elements to return.
|
|
|
|
|
|
|
|
|
# Client side API
|
|
|
|
|
|
## Platform
|
|
|
|
|
|
#### ty.dulst.game.attributes
|
|
|
|
|
|
Game attributes.
|
|
|
|
|
|
#### ty.dulst.endSelectingAnimation()
|
|
|
|
|
|
End the select animation.
|
|
|
|
|
|
## In play
|
|
|
|
|
|
#### mod
|
|
|
|
|
|
This module.
|
|
|
|
|
|
#### mod.matchID
|
|
|
#### mod.cardBack
|
|
|
#### mod.locations
|
|
|
#### mod.locationsVisible
|
|
|
List of all locations that are visible on screen. This way you instantly know whether or not a card is visible.
|
|
|
|
|
|
#### mod.locationsHiddenStack
|
|
|
List of all locations hidden stack that needs a cardback shown.
|
|
|
|
|
|
#### mod.clientPlayerFromNumber(*playerNumber*)
|
|
|
|
|
|
Return "me" or "opponent".
|
|
|
|
|
|
#### mod.mousemoveCallbacks
|
|
|
#### mod.opponentMousemoveCallbacks
|
|
|
|
|
|
Array of functions with the event as the first parameter.
|
|
|
|
|
|
#### matchData
|
|
|
|
|
|
#### selectCount
|
|
|
|
|
|
#### turnPlayer
|
|
|
|
|
|
#### cardRatio
|
|
|
|
|
|
## Play Functions
|
|
|
|
|
|
#### ty.dulst.playAnimations.position(*options*)
|
|
|
|
|
|
*options* parameter
|
|
|
|
|
|
| key | description | type |
|
|
|
| ------ | ------ | ------ |
|
|
|
| positionOffsetX | X offset. | int |
|
|
|
| positionOffsetY | Y offset. | int |
|
|
|
| positionDirection | One of top, bottom, left, right, center. | string |
|
|
|
| cards | Array of ciids for the cards you're positioning. | Array |
|
|
|
| relativeTo | The ciid of the card it is positioned relative to. | int |
|
|
|
|
|
|
#### flashMessage(*text*, *callback*)
|
|
|
|
|
|
Show a popup message where the mouse is.
|
|
|
|
|
|
#### getCard(*ciid*, *cardData*)
|
|
|
|
|
|
*ciid* paramter
|
|
|
|
|
|
String.
|
|
|
|
|
|
*cardData* paramter
|
|
|
|
|
|
Optional. Object with the card data.
|
|
|
|
|
|
Return the card element as a jQuery element. Create the card based on cardData if it doesn't already exist, replace the card with the supplied cardData if it already does.
|
|
|
|
|
|
#### cancelChoice()
|
|
|
|
|
|
#### playVideo(*cid*)
|
|
|
|
|
|
#### setStatus(*text*)
|
|
|
|
|
|
#### moveCard(*cardEl*, *toLocationName*, *fromLocationName*)
|
|
|
|
|
|
Move a card.
|
|
|
|
|
|
#### flipCard(*cardData*)
|
|
|
|
|
|
*cardData* paramter
|
|
|
|
|
|
Object.
|
|
|
|
|
|
Flip a card.
|
|
|
|
|
|
#### cardPosition(*locationName*)
|
|
|
|
|
|
*locationName* paramter
|
|
|
|
|
|
String.
|
|
|
|
|
|
Reposition all the cards in the location.
|
|
|
|
|
|
#### safeReplaceCardEl (*oldCard*, *newCard*)
|
|
|
|
|
|
*oldCard* paramter
|
|
|
|
|
|
jQuery element.
|
|
|
|
|
|
*newCard* paramter
|
|
|
|
|
|
jQuery element.
|
|
|
|
|
|
Change a card by overwriting the attributes of a card element with the attributes of another card element. Unlike `getCard()` it is non-destructive, allowing animations to flow smoothly from one state to another.
|
|
|
|