Skip to content

Commit

Permalink
plibonigxis desegnado de la ondoj. partiklosistemo por malamikoj.
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanHeydariNasab committed Jul 2, 2017
1 parent df507fc commit ff4ff1b
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Defendiloj/Kugloj/Kuglo/Kuglo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func _fixed_process(delta):
func _on_Area2D_body_enter( korpo ):
var patro_nomo = korpo.get_parent().nomo
if patro_nomo == "Malamiko_0_" or patro_nomo == "Malamiko_1_":
korpo.get_parent().vivo -= log(nivelo+3)*10-10
korpo.get_parent().vivo -= log(nivelo+3)*10-6
queue_free()


Expand Down
2 changes: 1 addition & 1 deletion Defendiloj/Pistoloj/Ondilo/Ondilo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ func _on_Ondo_body_enter( korpo ):
if korpo.get_parent().nomo == "Malamiko_2_":
korpo.get_parent().vivo -= log(nivelo+3)*70-10
else:
korpo.get_parent().vivo -= log(nivelo+3)*10-10
korpo.get_parent().vivo -= log(nivelo+3)*15-10
2 changes: 1 addition & 1 deletion Kontroloj/Komenco.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ margin/right = 754.0
margin/bottom = 1273.0
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "v2.0"
text = "v2.1"
autowrap = true
percent_visible = 1.0
lines_skipped = 0
Expand Down
4 changes: 3 additions & 1 deletion Malamikoj/Malamiko.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ func _ready():
func _process(delta):
Vivo.set_text(str(vivo))
Vivo_P.set_scale(Vector2(vivo/komenca_vivo, 1))
if "Malamiko_2_" in get_name():
if "Malamiko_2_" == nomo:
M.get_node("Sprite").rotate(0.05)
elif vivo > 0:
M.get_node("Partiklo").set_explosiveness(vivo/komenca_vivo)
if vivo <= 0:
M.clear_shapes()
Vivo_P.hide()
Expand Down
33 changes: 30 additions & 3 deletions Malamikoj/Malamiko_0_.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[gd_scene load_steps=6 format=1]
[gd_scene load_steps=7 format=1]

[ext_resource path="res://Malamikoj/Malamiko.gd" type="Script" id=1]
[ext_resource path="res://Malamikoj/malamiko_0.png" type="Texture" id=2]
[ext_resource path="res://Tiparoj/roboto.fnt" type="BitmapFont" id=3]
[ext_resource path="res://Malamikoj/partiklo.png" type="Texture" id=4]

[sub_resource type="ConvexPolygonShape2D" id=3]
[sub_resource type="ConvexPolygonShape2D" id=1]

custom_solver_bias = 0.0
points = Vector2Array( 100, 97.9167, -100, 97.9167, -9.49857e-13, -72.9167 )
Expand All @@ -23,7 +24,7 @@ script/script = ExtResource( 1 )

transform/rot = -4.07111e-13
input/pickable = false
shapes/0/shape = SubResource( 3 )
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1.2, 7.10542e-15, -7.10542e-15, 1.2, 0, 0 )
shapes/0/trigger = false
collision/layers = 4
Expand Down Expand Up @@ -107,6 +108,32 @@ playback/active = false
playback/repeat = false
playback/speed = 1.0

[node name="Partiklo" type="Particles2D" parent="Malamiko"]

transform/pos = Vector2( -1.05101e-12, 177.5 )
transform/rot = -3.39259e-13
config/amount = 16
config/lifetime = 0.25
config/process_mode = 1
config/half_extents = Vector2( 2, 1 )
config/texture = ExtResource( 4 )
params/direction = 0.0
params/spread = 16.36
params/linear_velocity = 900.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.5
params/final_size = 0.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0

[connection signal="tween_complete" from="Malamiko/Efekto" to="." method="_on_Efekto_tween_complete"]


55 changes: 54 additions & 1 deletion Malamikoj/Malamiko_1_.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=1]
[gd_scene load_steps=7 format=1]

[ext_resource path="res://Malamikoj/Malamiko.gd" type="Script" id=1]
[ext_resource path="res://Malamikoj/malamiko_1.png" type="Texture" id=2]
[ext_resource path="res://Tiparoj/roboto.fnt" type="BitmapFont" id=3]
[ext_resource path="res://Malamikoj/partiklo.png" type="Texture" id=4]

[sub_resource type="ConvexPolygonShape2D" id=1]

Expand Down Expand Up @@ -107,6 +108,58 @@ playback/active = false
playback/repeat = false
playback/speed = 1.0

[node name="Partiklo" type="Particles2D" parent="Malamiko"]

transform/pos = Vector2( -50, 177.5 )
transform/rot = -3.39259e-13
config/amount = 16
config/lifetime = 0.25
config/process_mode = 1
config/half_extents = Vector2( 2, 1 )
config/texture = ExtResource( 4 )
params/direction = 0.0
params/spread = 16.36
params/linear_velocity = 900.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.5
params/final_size = 0.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0

[node name="Partiklo2" type="Particles2D" parent="Malamiko"]

transform/pos = Vector2( 50, 177.5 )
transform/rot = -3.39259e-13
config/amount = 16
config/lifetime = 0.25
config/process_mode = 1
config/half_extents = Vector2( 2, 1 )
config/texture = ExtResource( 4 )
params/direction = 0.0
params/spread = 16.36
params/linear_velocity = 900.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.5
params/final_size = 0.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0

[connection signal="tween_complete" from="Malamiko/Efekto" to="." method="_on_Efekto_tween_complete"]


23 changes: 12 additions & 11 deletions Radiko.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,29 @@ func _ready():
get_tree().set_auto_accept_quit(false)
tipoj = [
{'sceno': M0, 'grando': 0.3, 'vivo': 40, 'rapido': 3.2, 'unuarenkonto': 0},
{'sceno': M0, 'grando': 0.3, 'vivo': 40, 'rapido': 3.2, 'unuarenkonto': 0},
{'sceno': M0, 'grando': 0.45, 'vivo': 300, 'rapido': 2.8, 'unuarenkonto': 1},
{'sceno': M0, 'grando': 0.7, 'vivo': 800, 'rapido': 2.2, 'unuarenkonto': 3},
{'sceno': M1, 'grando': 0.8, 'vivo': 2000, 'rapido': 1, 'unuarenkonto': 5},
{'sceno': M1, 'grando': 1.1, 'vivo': 5000, 'rapido': 0.7, 'unuarenkonto': 10},
{'sceno': M1, 'grando': 1.3, 'vivo': 5000, 'rapido': 0.7, 'unuarenkonto': 10},
{'sceno': M2, 'grando': 0.45, 'vivo': 200, 'rapido': 1.5, 'unuarenkonto': 7},
{'sceno': M2, 'grando': 0.7, 'vivo': 900, 'rapido': 1, 'unuarenkonto': 12},
]
ondoj = []
randomize()
# ondoj = [[{'nombro': 1, 'tipo': 6, 'atendo': 20}]]
for o in range(50):
ondoj.append([])
while ondoj[-1].size() < 5:
randomize()
var t = int(rand_range(0, tipoj.size()))
if o >= tipoj[t]['unuarenkonto'] and int(rand_range(0,2)) == 1:
var nombro = o - tipoj[t]['unuarenkonto'] + int(rand_range(0,2)) + 1
#nombro = int(log(nombro*100))-3
var nombro = int(rand_range(1, o - tipoj[t]['unuarenkonto'] + rand_range(1,3)))
var atendo = tipoj[t]['rapido']+tipoj[t]['vivo']/50 + nombro/2 + rand_range(0,5)
ondoj[-1].append({'nombro': nombro, 'tipo': t, 'atendo': atendo})
for ondo in ondoj:
print("***")
for so in ondo:
print(so)
# for ondo in ondoj:
# print("***")
# for so in ondo:
# print(so)
set_process(true)

func _notification(what):
Expand Down Expand Up @@ -155,11 +156,11 @@ func _on_Aldoni_Lasero_pressed():


func _je_malamiko_mortigxis(komenca_vivo):
mono += int(log(komenca_vivo)*25-85)
mono += int(log(komenca_vivo)*50-170)

func _je_malamiko_batis_bazon(komenca_vivo):
Batita.play()
vivo -= int(log(komenca_vivo)*25-85)
vivo -= int(log(komenca_vivo)*50-170)

func _on_Atendado_subondoj_timeout():
if subondo < ondoj[ondo].size()-1:
Expand Down Expand Up @@ -195,7 +196,7 @@ func _on_Zomilo_value_changed( valoro ):
))

func _on_vastigu_la_reton_pressed():
var prezoj = [500, 750, 900, 1200]
var prezoj = [1000, 3200, 6500, 15000]
if reto == 0 and mono > prezoj[0]:
mono -= prezoj[0]
get_node("Reto/N1").show()
Expand Down
6 changes: 3 additions & 3 deletions Radiko.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,13 @@ focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 351.0
margin/left = 347.0
margin/top = 137.0
margin/right = 459.0
margin/right = 531.0
margin/bottom = 214.0
custom_fonts/font = ExtResource( 4 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "500"
text = "1000"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
Expand Down
2 changes: 1 addition & 1 deletion engine.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[application]

name="defendo"
main_scene="res://Radiko.tscn"
main_scene="res://Kontroloj/Komenco.tscn"
icon="res://ikono.png"

[autoload]
Expand Down

0 comments on commit ff4ff1b

Please sign in to comment.