render impl for sliced sprites

This commit is contained in:
BlackMATov
2020-02-25 13:14:52 +07:00
parent 201041ed9d
commit ed8fc529d0
6 changed files with 210 additions and 76 deletions

View File

@@ -0,0 +1,12 @@
{
"prototype" : "sprite_prefab.json",
"components" : {
"named" : {
"name" : "panel"
},
"sprite_renderer" : {
"mode" : "sliced",
"sprite" : "../sprites/panel_sprite.json"
}
}
}

View File

@@ -5,60 +5,65 @@
},{
"prototype" : "../prefabs/camera_prefab.json"
},{
"prototype" : "../prefabs/layout_prefab.json",
"prototype" : "../prefabs/panel_prefab.json",
"components" : {
"actor" : {
"translation" : [-250,0]
},
"layout" : {
"size" : [500,200],
"halign" : "space_evenly"
"sprite_renderer" : {
"scale" : [4,2]
}
},
"children" : [{
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"layout" : {
"size" : [66,113]
"size" : [400,200],
"halign" : "space_evenly"
}
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
"layout" : {
"size" : [66,113]
}
}
}]
},{
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"layout" : {
"size" : [66,113]
}
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
}
}
}]
},{
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
"layout" : {
"size" : [66,113]
}
}
}]
},{
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"layout" : {
"size" : [66,113]
}
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
}
}
}]
},{
"prototype" : "../prefabs/layout_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
"layout" : {
"size" : [66,113]
}
}
},
"children" : [{
"prototype" : "../prefabs/ship_prefab.json",
"components" : {
"actor" : {
"translation" : [33,56.5]
}
}
}]
}]
}]
}]

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ebc16b176a3982ee84be2ad86a3d0ceb5790479c90394e183a9a2b8e9c7bc6a
size 625

View File

@@ -0,0 +1,6 @@
{
"texture" : "panel.png",
"pivot" : { "x" : 0, "y" : 0 },
"inner_texrect" : { "x" : 6, "y" : 6, "w" : 88, "h" : 88 },
"outer_texrect" : { "x" : 0, "y" : 0, "w" : 100, "h" : 100 }
}