new bundle

This commit is contained in:
Eugenio Marzo
2021-01-25 20:39:58 +01:00
parent 5a0aded573
commit d8ac596fe2
17 changed files with 40 additions and 39 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -18,9 +18,9 @@ high_dpi = 1
shared_state = 1
[html5]
scale_mode = downscale_fit
scale_mode = fit
htmlfile = /builtins/manifests/web/engine_template.html
splash_image = /assets/kubeinvaderslogo.png
splash_image = /logo.png
show_made_with_defold = 0
[library]

View File

@@ -58,6 +58,10 @@ key_trigger {
input: KEY_W
action: "worker"
}
key_trigger {
input: KEY_E
action: "hide_worker"
}
mouse_trigger {
input: MOUSE_BUTTON_1
action: "click"

View File

@@ -1 +1 @@
{"content":[{"name":"game.projectc","size":3198,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":7408,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":379707,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":13430,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
{"content":[{"name":"game.projectc","size":3169,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":7408,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":266199,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":13430,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}

View File

@@ -146,8 +146,8 @@ cssfile = /builtins/manifests/web/light_theme.css
archive_location_prefix = archive
show_fullscreen_button = 1
show_made_with_defold = 0
scale_mode = downscale_fit
splash_image = /assets/kubeinvaderslogo.png
scale_mode = fit
splash_image = /logo.png
[particle_fx]
max_count = 64

View File

@@ -128,7 +128,7 @@
.canvas-app-canvas {
background-repeat:no-repeat;
background-position: center center;
background-image: url("kubeinvaderslogo.png");
background-image: url("logo.png");
}
</style>
</head>
@@ -189,29 +189,23 @@
var targetRatio = width / height;
var actualRatio = innerWidth / innerHeight;
//Downscale fit
if (innerWidth < width || innerHeight < height) {
if (actualRatio > targetRatio) {
width = innerHeight * targetRatio;
height = innerHeight;
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
app_container.style.marginTop = "0px";
}
else {
width = innerWidth;
height = innerWidth / targetRatio;
app_container.style.marginLeft = "0px";
app_container.style.marginTop = ((innerHeight - height) / 2) + "px";
}
//Fit
if (actualRatio > targetRatio) {
width = innerHeight * targetRatio;
height = innerHeight;
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
app_container.style.marginTop = "0px";
}
else {
app_container.style.marginLeft = ((innerWidth - width) / 2) + "px";
width = innerWidth;
height = innerWidth / targetRatio;
app_container.style.marginLeft = "0px";
app_container.style.marginTop = ((innerHeight - height) / 2) + "px";
}
app_container.style.width = width + "px";
app_container.style.height = height + buttonHeight + "px";
game_canvas.width = width;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -94,12 +94,12 @@ nodes {
nodes {
position {
x: 950.0
y: 258.0
y: 301.0
z: 0.0
w: 1.0
}
rotation {
x: -18.602
x: 0.0
y: 0.0
z: 0.0
w: 1.0
@@ -111,8 +111,8 @@ nodes {
w: 1.0
}
size {
x: 500.0
y: 50.0
x: 700.0
y: 300.0
z: 0.0
w: 1.0
}
@@ -125,7 +125,7 @@ nodes {
type: TYPE_TEXT
blend_mode: BLEND_MODE_ALPHA
text: ""
font: "arcade"
font: "error"
id: "howto"
xanchor: XANCHOR_NONE
yanchor: YANCHOR_NONE
@@ -142,7 +142,7 @@ nodes {
z: 1.0
w: 1.0
}
adjust_mode: ADJUST_MODE_FIT
adjust_mode: ADJUST_MODE_STRETCH
line_break: false
layer: ""
inherit_alpha: true

View File

@@ -113,8 +113,8 @@ embedded_instances {
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 644.0\n"
" y: 352.0\n"
" x: 1449.0\n"
" y: 381.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
@@ -552,7 +552,7 @@ embedded_instances {
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 1000.0\n"
" x: 903.0\n"
" y: 725.0\n"
" z: 0.0\n"
" }\n"

View File

@@ -50,7 +50,7 @@ function M.http_get_nodes_result(self, _, response)
local nodes = json.decode(response.response)
local node_items = nodes["items"]
local node_items_size = table.getn(node_items)
local pos_x = 300
local pos_x = 500
local pos_y = 500
local nodes_cnt = 1
local master = false
@@ -96,7 +96,7 @@ function M.http_get_nodes_result(self, _, response)
kubernetes_nodes[k1] = { name = v2["name"], id = new_node }
if ((nodes_cnt % 15 ) == 0) then
pos_y = pos_y + 200
pos_x = 300
pos_x = 500
else
pos_x = pos_x + 80
end

View File

@@ -104,7 +104,7 @@ function M.http_pod_result(self, _, response)
local pos = go.get_position()
if a <= alien_proximity_factor then
pos.x = 400 + ( a * (1000 / space_between_factor) )
pos.x = 500 + ( a * (1000 / space_between_factor) )
end
if (a % alien_proximity_factor == 0) then

View File

@@ -99,13 +99,13 @@ latest_kubernetes_nodes_request_show = 0
max_nodes = 15
-- put the spaceship in automatic_pilot_x when automatic pilot is activated
automatic_pilot_x = 400
automatic_pilot_x = 500
-- max x when automatic pilot is activated
automatic_pilot_x_limit = 1400
automatic_pilot_x_limit = 1500
-- min x when automatic pilot is activated
automatic_pilot_x_start= 400
automatic_pilot_x_start= 500
-- used for change direction of the spaceship
automatic_pilot_x_reverse = false
@@ -308,7 +308,10 @@ function on_input(self, action_id, action)
elseif action_id == hash("worker") then
k8s_node.get_nodes()
elseif action_id == hash("hide_worker") then
k8s_node.hide_nodes()
elseif action_id == hash("namespace") then
print("[change_namespace] change namespaces requested by user")
msg.post("ui#gui", "error",{ errormessage = "changing namespace!" })