Change Tiles

This commit is contained in:
GRL 2021-06-24 11:31:29 +02:00
parent 24cc340cb9
commit a666bf310b
6 changed files with 146 additions and 39 deletions

View file

@ -5,22 +5,18 @@
</head>
<body>
<script>
WA.changeTile([
{x: 0, y: 0, tile: 'Red', layer: 'changeTile'},
{x: 0, y: 1, tile: 'Red', layer: 'changeTile'},
{x: 0, y: 2, tile: 34, layer: 'changeTile'},
{x: 0, y: 3, tile: 34, layer: 'changeTile'},
{x: 0, y: 4, tile: 34, layer: 'changeTile'},
{x: 0, y: 5, tile: 34, layer: 'changeTile'},
{x: 0, y: 6, tile: 34, layer: 'changeTile'},
{x: 0, y: 7, tile: 34, layer: 'changeTile'},
{x: 0, y: 8, tile: 34, layer: 'changeTile'},
{x: 0, y: 9, tile: 34, layer: 'changeTile'}
WA.room.changeTile([
{x: 0, y: 0, tile: 92, layer: 'changeTile'},
{x: 0, y: 2, tile: 'Red', layer: 'changeTile'},
{x: 0, y: 3, tile: 99, layer: 'changeTile'},
{x: 0, y: 5, tile: 117, layer: 'changeTile'},
{x: 0, y: 6, tile: 117, layer: 'changeTile'},
{x: 0, y: 9, tile: 74, layer: 'changeTile'}
]);
WA.changeTile([
WA.room.changeTile([
{x: 6, y: 4, tile: 'blue', layer: 'changeTile'},
{x: 7, y: 4, tile: 'blue', layer: 'changeTile'},
{x: 8, y: 4, tile: 'blue', layer: 'changeTile'},
{x: 7, y: 4, tile: 109, layer: 'changeTile'},
{x: 8, y: 4, tile: 109, layer: 'changeTile'},
{x: 9, y: 4, tile: 'blue', layer: 'changeTile'}
]);
</script>

View file

@ -1,4 +1,11 @@
{ "compressionlevel":-1,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":10,
"infinite":false,
"layers":[
@ -50,7 +57,7 @@
"y":0
},
{
"data":[65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 65, 65, 65, 65, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"data":[65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 65, 65, 65, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"id":8,
"name":"changeTile",
@ -67,7 +74,7 @@
"name":"floorLayer",
"objects":[
{
"height":159.866671635267,
"height":191.866671635267,
"id":1,
"name":"",
"rotation":0,
@ -75,14 +82,14 @@
{
"fontfamily":"Sans Serif",
"pixelsize":9,
"text":"Test : \nWalk on the grass\n\nResult : \nTiles of the first left colum become red tile (tile find by Number)\nTiles of the below the grass become blue (tile find by String)\n",
"text":"Test : \nWalk on the grass\n\nResult : \nThe Yellow Tile open a jitsi with Trigger.\n\nThe Red Tile open cowebsite Wikip\u00e9dia. The highest Red Tile is find by 'string' index, the lowest by 'number' index.\n\nThe White Tile are silent tile. You can not open a bubble in it. (Even if the other player didn't activate the script.)\n\nThe Pale Tile (Lowest) is an exitUrl tile to customMenu.json.\n\nThe Blue Tile are 'collides' tile. The two tile in the center are 'number' index. The others are 'string' index.\n",
"wrap":true
},
"type":"",
"visible":true,
"width":287.674838251912,
"x":32.5473600365393,
"y":160.305680721763
"y":128.305680721763
}],
"opacity":1,
"type":"objectgroup",
@ -258,13 +265,62 @@
"tilecount":72,
"tileheight":32,
"tiles":[
{
"id":9,
"properties":[
{
"name":"exitUrl",
"type":"string",
"value":"customMenu.json"
}]
},
{
"id":27,
"properties":[
{
"name":"jitsiRoom",
"type":"string",
"value":"TEST"
},
{
"name":"jitsiTrigger",
"type":"string",
"value":"onaction"
},
{
"name":"jitsiUrl",
"type":"string",
"value":"meet.jit.si"
}]
},
{
"id":34,
"properties":[
{
"name":"openWebsite",
"type":"string",
"value":"https:\/\/fr.wikipedia.org\/wiki\/Wikip%C3%A9dia:Accueil_principal"
}],
"type":"Red"
},
{
"id":44,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}],
"type":"blue"
},
{
"id":52,
"properties":[
{
"name":"silent",
"type":"bool",
"value":true
}]
}],
"tilewidth":32
}],