Search found 4 matches

by Fabian Viking
20 August 2021, 11:38
Forum: Developers
Topic: Slide icon from ActionButton to Player Board
Replies: 1
Views: 400

Slide icon from ActionButton to Player Board

Wanted to animate a token grabbed when pressing an action button. Couldn't find any example, so here is my solution: let tokenId = `slidingToken_${this.uniqueId++}`; dojo.place( this.format_block( 'jstpl_token', { id: tokenId, } ) , "left-side"); this.placeOnObject( tokenId, 'pick_branchto...
by Fabian Viking
13 August 2021, 08:53
Forum: "Alpha" games
Topic: Railways of the World
Replies: 26
Views: 5302

Re: Railways of the World

You can use "for of" to increase readability in javascript

Code: Select all

for (var board_hex in gamedatas.board) 
{
    var AHex = gamedatas.board[board_hex];
    ...
}

//Can be replaced with
for (var AHex of gamedatas.board) 
{
    ...
}
by Fabian Viking
11 August 2021, 12:30
Forum: "Alpha" games
Topic: Railways of the World
Replies: 26
Views: 5302

Re: Railways of the World

The Choice of tracks is unessesary. When building tracks; it would be better if the player just marks the polygons and then use an algorithm to place the right type of tile (straight/bent/crossed). It would save a lot clicking and make the game much faster. Only the final track, if left unconnected,...
by Fabian Viking
05 August 2021, 12:07
Forum: Developers
Topic: Error Undefined index
Replies: 6
Views: 10613

Re: Error Undefined index

Cowseye wrote: 08 January 2017, 09:40 The comment lines in the TPL files for begin and end was use to define the blocks
This solved my issue too

Go to advanced search