Example of putting things on the player board?

Game development with Board Game Arena Studio
Post Reply
sparr
Posts: 65
Joined: 08 April 2014, 02:12

Example of putting things on the player board?

Post by sparr »

I want to put a count of the cards in each player's hand on their player board.

I've looked at http://en.doc.boardgamearena.com/Game_i ... .27s_panel but I'm still unclear on the best way to update the info.

Is there more reference or examples for updateCounters(counters) and how this.gamedatas.counters should be set/updated?
User avatar
tarini
Posts: 45
Joined: 11 July 2013, 22:36
Location: italy
Contact:

Re: Example of putting things on the player board?

Post by tarini »

Every player has a DOM node, retrievable with $('player_board_'+playerId), you can use for your purposes.

In my code, for example, I use this snippet to append a custom jstpl:

Code: Select all

var captainBoard = $('player_board_'+captainId);
dojo.place( this.format_block('jstpl_captain' ), captainBoard );
Post Reply

Return to “Developers”