Skip to content

Commit

Permalink
nova menuo por komenci nivelon. senuza Komenco.tscn. vasta ekrano
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanHeydariNasab committed Jul 9, 2017
1 parent 5d97376 commit 63b65b5
Show file tree
Hide file tree
Showing 8 changed files with 372 additions and 39 deletions.
1 change: 0 additions & 1 deletion Defendiloj/Kugloj/Bombo/Bombo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func _ready():
func _process(delta):
if enreta:
Enreta.show()
print(Radiko.sekva_ondo_permesita)
if not Radiko.sekva_ondo_permesita:
Tempilo.set_active(true)
else:
Expand Down
22 changes: 14 additions & 8 deletions Kontroloj/Komenco.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ playback/speed = 1.0

[node name="Gvidilo" type="Label" parent="Gvidilo"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 0.6, 0.6 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 56.0
margin/top = 254.0
margin/right = 1280.0
margin/bottom = 987.0
margin/right = -1216.0
margin/bottom = -923.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Cxu vi sciias ke vi povas plibonigi la armilojn? kolektu samajn armilojn en la bazo.
Expand Down Expand Up @@ -115,15 +117,19 @@ playback/speed = 1.0

[node name="Saluton" type="Label" parent="Enkonduko"]

anchor/left = 3
anchor/top = 3
anchor/right = 3
anchor/bottom = 3
rect/scale = Vector2( 0.6, 0.6 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 64.0
margin/top = 306.0
margin/right = 1231.0
margin/bottom = 889.0
size_flags/horizontal = 3
size_flags/vertical = 3
margin/left = -32.0
margin/top = -274.0
margin/right = -1175.0
margin/bottom = -857.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Saluton homido,
Expand Down
19 changes: 19 additions & 0 deletions Kontroloj/Niveloj.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extends Node2D

onready var Fadi = get_node("Fadi")

func _ready():
Fadi.interpolate_property(self, "visibility/opacity",1,0,
0.4, Tween.TRANS_QUAD, Tween.EASE_OUT
)

func _on_Ludi_pressed():
Tutmonda.nivelo = 1
Fadi.start()

func _on_Fadi_tween_complete( object, key ):
get_tree().change_scene("res://Radiko.tscn")

func _on_Ludi_malnova_pressed():
Tutmonda.nivelo = 0
Fadi.start()
286 changes: 286 additions & 0 deletions Kontroloj/Niveloj.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
[gd_scene load_steps=6 format=1]

[ext_resource path="res://Kontroloj/Niveloj.gd" type="Script" id=1]
[ext_resource path="res://Tiparoj/roboto.fnt" type="BitmapFont" id=2]
[ext_resource path="res://Temoj/Butono_sxveda.tres" type="StyleBox" id=3]
[ext_resource path="res://Temoj/Butono_premita.tres" type="StyleBox" id=4]
[ext_resource path="res://Temoj/Butono.tres" type="StyleBox" id=5]

[node name="Niveloj" type="Node2D"]

script/script = ExtResource( 1 )

[node name="Fadi" type="Tween" parent="."]

playback/process_mode = 1
playback/active = false
playback/repeat = false
playback/speed = 1.0

[node name="Nivelo_nova" type="Control" parent="."]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 1
size_flags/vertical = 2
margin/left = 0.0
margin/top = -100.0
margin/right = 0.0
margin/bottom = -100.0

[node name="Rektangulo" type="Polygon2D" parent="Nivelo_nova"]

transform/pos = Vector2( -100, 0 )
polygon = Vector2Array( 500, 200, 100, 200, 100, 500, 500, 500 )
uv = Vector2Array( )
color = Color( 0.917647, 0.917647, 0.917647, 1 )
vertex_colors = ColorArray( )
offset = Vector2( 0, 0 )
texture/texture = null
texture/offset = Vector2( 0, 0 )
texture/scale = Vector2( 1, 1 )
texture/rotation = 0.0
invert/enable = false
invert/border = 100.0

[node name="Rekordo" type="Label" parent="Nivelo_nova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 1.5, 1.5 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 0.0
margin/top = 250.0
margin/right = -267.0
margin/bottom = -350.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "123"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Label 2" type="Label" parent="Nivelo_nova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 0.5, 0.5 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 50.0
margin/top = 400.0
margin/right = -650.0
margin/bottom = -500.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Via Rekordo"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Ludi" type="Button" parent="Nivelo_nova"]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 500.0
margin/right = 400.0
margin/bottom = 600.0
custom_styles/hover = ExtResource( 3 )
custom_styles/pressed = ExtResource( 4 )
custom_styles/normal = ExtResource( 5 )
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
text = "Ludi"
flat = false

[node name="Polygon2D" type="Polygon2D" parent="Nivelo_nova"]

transform/pos = Vector2( -93, 1 )
polygon = Vector2Array( 493, 199, 780, 232, 743, 499, 493, 599 )
uv = Vector2Array( )
color = Color( 0.403922, 0.227451, 0.717647, 1 )
vertex_colors = ColorArray( )
offset = Vector2( 0, 0 )
texture/texture = null
texture/offset = Vector2( 0, 0 )
texture/scale = Vector2( 1, 1 )
texture/rotation = 0.0
invert/enable = false
invert/border = 100.0

[node name="Label" type="Label" parent="Nivelo_nova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 0.6, 0.9 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 400.0
margin/top = 250.0
margin/right = -817.0
margin/bottom = -556.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0.917647, 0.917647, 0.917647, 1 )
text = "Nova epoko"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Nivelo_malnova" type="Control" parent="."]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 1
size_flags/vertical = 2
margin/left = 0.0
margin/top = 450.0
margin/right = 0.0
margin/bottom = 450.0

[node name="Rektangulo" type="Polygon2D" parent="Nivelo_malnova"]

transform/pos = Vector2( -100, 0 )
polygon = Vector2Array( 500, 200, 100, 200, 100, 500, 500, 500 )
uv = Vector2Array( )
color = Color( 0.917647, 0.917647, 0.917647, 1 )
vertex_colors = ColorArray( )
offset = Vector2( 0, 0 )
texture/texture = null
texture/offset = Vector2( 0, 0 )
texture/scale = Vector2( 1, 1 )
texture/rotation = 0.0
invert/enable = false
invert/border = 100.0

[node name="Rekordo" type="Label" parent="Nivelo_malnova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 1.5, 1.5 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 0.0
margin/top = 250.0
margin/right = -267.0
margin/bottom = -350.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "123"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Label 2" type="Label" parent="Nivelo_malnova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 0.5, 0.5 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 50.0
margin/top = 400.0
margin/right = -650.0
margin/bottom = -500.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Via Rekordo"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Ludi" type="Button" parent="Nivelo_malnova"]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 500.0
margin/right = 400.0
margin/bottom = 600.0
custom_styles/hover = ExtResource( 3 )
custom_styles/pressed = ExtResource( 4 )
custom_styles/normal = ExtResource( 5 )
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
text = "Ludi"
flat = false

[node name="Polygon2D" type="Polygon2D" parent="Nivelo_malnova"]

transform/pos = Vector2( -93, 1 )
polygon = Vector2Array( 493, 199, 793, 249, 807, 470, 493, 599 )
uv = Vector2Array( )
color = Color( 0.403922, 0.227451, 0.717647, 1 )
vertex_colors = ColorArray( )
offset = Vector2( 0, 0 )
texture/texture = null
texture/offset = Vector2( 0, 0 )
texture/scale = Vector2( 1, 1 )
texture/rotation = 0.0
invert/enable = false
invert/border = 100.0

[node name="Label" type="Label" parent="Nivelo_malnova"]

anchor/right = 1
anchor/bottom = 1
rect/scale = Vector2( 0.6, 0.9 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 400.0
margin/top = 250.0
margin/right = -912.0
margin/bottom = -556.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0.917647, 0.917647, 0.917647, 1 )
text = "Malnova epoko"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[connection signal="tween_complete" from="Fadi" to="." method="_on_Fadi_tween_complete"]

[connection signal="pressed" from="Nivelo_nova/Ludi" to="." method="_on_Ludi_pressed"]

[connection signal="pressed" from="Nivelo_malnova/Ludi" to="." method="_on_Ludi_malnova_pressed"]


3 changes: 2 additions & 1 deletion Radiko.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ onready var vastigu_la_reton = get_node("Kanvaso/vastigu_la_reton")
onready var Atendado_subondoj = get_node("Atendado_subondoj")
onready var Bazo = get_node("Bazo")
onready var Kanvaso = get_node("Kanvaso")
onready var FPS = get_node("Kanvaso/FPS")

var agordejo = "user://agordejo.cfg"
onready var Agordejo = ConfigFile.new()
Expand Down Expand Up @@ -113,7 +114,7 @@ func subondi(ondo_i, subondo_i):
subondo_kreita = true

func _process(delta):
get_node("Kanvaso/FPS").set_text(str(int(1.0/delta)))
FPS.set_text(str(int(1.0/delta)))
if vivo <= 0 or mono < 0:
Tutmonda.poentaro = ondo
get_tree().change_scene("res://Kontroloj/Malvenkigxi.tscn")
Expand Down
Loading

0 comments on commit 63b65b5

Please sign in to comment.