Skip to content

Commit

Permalink
No funcaban los Sprites. Ahora si.
Browse files Browse the repository at this point in the history
  • Loading branch information
Viterbo committed Jun 23, 2016
1 parent af83967 commit 1c3d906
Show file tree
Hide file tree
Showing 7 changed files with 371 additions and 264 deletions.
137 changes: 68 additions & 69 deletions games/card-suarez.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,80 @@
"preload": {
"background":"images/Luis-Suarez-uruguay-best-striker.jpg"
},
"scenes": {
"card": {
"autostart": true,
"children": {
"frTop": {
"type": "BitmapData",
"fillStyle": "#000",
"width": "100%",
"height": "12%",
"position": {
"scene": {

"autostart": true,
"children": {
"frTop": {
"type": "BitmapData",
"fillStyle": "#000",
"width": "100%",
"height": "12%",
"position": {
"my": "top left",
"at": "top left",
"of": "parent"
}
},
"frBody": {
"type": "BitmapData",
"fillStyle": "#00A",
"anchors": [
{
"my": "top left",
"at": "top left",
"of": "parent"
"at": "bottom left",
"of": "parent.frTop"
},
{
"my": "bottom right",
"at": "top right",
"of": "parent.frBottom"
}
},
"frBody": {
"type": "BitmapData",
"fillStyle": "#00A",
"anchors": [
{
],
"children": {
"background": {
"type": "Sprite",
"texture": "background",
"width": "100%",
"height": "100%",
"texture-size": "cover",
"position": {
"my": "top left",
"at": "bottom left",
"of": "parent.frTop"
},
{
"my": "bottom right",
"at": "top right",
"of": "parent.frBottom"
"at": "top left",
"of": "parent"
}
],
"children": {
"background": {
"type": "Sprite",
"texture": "background",
"width": "100%",
"height": "100%",
"texture-size": "cover",
"position": {
"my": "top left",
"at": "top left",
"of": "parent"
}
},
"video": {
"type": "YoutubeVideo",
"videoid": "3zKoUda-WVA",
"autoplay": true,
"allowfullscreen": true,
"maxWidth": "90%",
"minWidth": "50%",
"maxHeight": "90%",
"minHeight": "50%",
"width": "800",
"height": "600",
"aspectRatio": "1.778",
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
},
"video": {
"type": "YoutubeVideo",
"videoid": "3zKoUda-WVA",
"autoplay": false,
"allowfullscreen": "1",
"maxWidth": "90%",
"minWidth": "50%",
"maxHeight": "90%",
"minHeight": "50%",
"width": "800",
"height": "600",
"aspectRatio": "1.778",
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
}
},
"frBottom": {
"type": "BitmapData",
"fillStyle": "#000",
"width": "100%",
"height": "5%",
"position": {
"my": "bottom left",
"at": "bottom left",
"of": "parent"
}
}
}
}
},
"frBottom": {
"type": "BitmapData",
"fillStyle": "#000",
"width": "100%",
"height": "5%",
"position": {
"my": "bottom left",
"at": "bottom left",
"of": "parent"
}
}
}
}
}
193 changes: 193 additions & 0 deletions games/menubar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"class": {
"big-block": {
"type": "BitmapData",
"width": "50%",
"height": "50%",
"alpha": 0,
"tween": {
"time": 250,
"ease": "Quad.easeOut"
}
},
"block": {
"type": "BitmapData",
"width": "50",
"height": "20"
}
},
"scene": {
"autostart": true,
"sections": {
"/": {
"btn_1": {
"position": {
"my": "top left",
"at": "top left",
"of": "parent"
}
},
"btn_2": {
"position": {
"my": "top left",
"at": "top right",
"of": "parent.btn_1"
}
},
"btn_3": {
"position": {
"my": "top left",
"at": "top right",
"of": "parent.btn_2"
}
},
"btn_4": {
"position": {
"my": "top left",
"at": "top right",
"of": "parent.btn_3"
}
},
"body_1": {
"position": {
"my": "middle left",
"at": "middle right",
"of": "parent"
}
},
"body_2": {
"position": {
"my": "middle left",
"at": "middle right",
"of": "parent"
}
},
"body_3": {
"position": {
"my": "middle left",
"at": "middle right",
"of": "parent"
}
},
"body_4": {
"position": {
"my": "middle left",
"at": "middle right",
"of": "parent"
}
}
},
"/btn1": {
"body_1": {
"autoplay": true,
"alpha": 1,
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
}
},
"/btn2": {
"body_2": {
"alpha": 1,
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
}
},
"/btn3": {
"body_3": {
"alpha": 1,
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
}
},
"/btn4": {
"body_4": {
"alpha": 1,
"position": {
"my": "middle center",
"at": "middle center",
"of": "parent"
}
}
}
},
"children_": {
"body_1": {
"class": "big-block",
"fillStyle": "#700"
}
},
"children": {
"btn_1": {
"class": "block",
"fillStyle": "#F00",
"onInputDown": {
"handler": "scene-enter-section",
"params": "/btn1"
}
},
"btn_2": {
"class": "block",
"fillStyle": "#FF0",
"onInputDown": {
"handler": "scene-enter-section",
"params": "/btn2"
}
},
"btn_3": {
"class": "block",
"fillStyle": "#F0F",
"onInputDown": {
"handler": "scene-enter-section",
"params": "/btn3"
}
},
"btn_4": {
"class": "block",
"fillStyle": "#0F0",
"onInputDown": {
"handler": "scene-enter-section",
"params": "/btn4"
}
},
"body_1": {
"type": "YoutubeVideo",
"videoid": "3zKoUda-WVA",
"autoplay": false,
"allowfullscreen": true,
"maxWidth": "90%",
"minWidth": "50%",
"maxHeight": "90%",
"minHeight": "50%",
"width": "800",
"height": "600",
"aspectRatio": "1.778",
"alpha": 0,
"tween": {
"time": 250,
"ease": "Quad.easeOut"
}
},
"body_2": {
"class": "big-block",
"fillStyle": "#770"
},
"body_3": {
"class": "big-block",
"fillStyle": "#707"
},
"body_4": {
"class": "big-block",
"fillStyle": "#070"
}
}
}
}
Loading

0 comments on commit 1c3d906

Please sign in to comment.