More island variety
parent
659c0fcfcc
commit
80edbb7dc2
|
@ -15,7 +15,8 @@ var DebugLabel = null
|
||||||
|
|
||||||
var hex_size = 128
|
var hex_size = 128
|
||||||
var debug_nav = false
|
var debug_nav = false
|
||||||
var draw_grid = true
|
var draw_grid = false
|
||||||
|
var draw_island_bbox = false
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -317,7 +317,6 @@ rect_min_size = Vector2( 100, 100 )
|
||||||
text = "Dig"
|
text = "Dig"
|
||||||
|
|
||||||
[node name="SuccessMessage" type="Control" parent="World/UI"]
|
[node name="SuccessMessage" type="Control" parent="World/UI"]
|
||||||
visible = false
|
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
|
@ -327,7 +326,7 @@ margin_top = -20.0
|
||||||
margin_right = 20.0
|
margin_right = 20.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
rect_scale = Vector2( 0.5, 0.5 )
|
rect_scale = Vector2( 0.5, 0.5 )
|
||||||
mouse_filter = 1
|
mouse_filter = 2
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
@ -341,6 +340,7 @@ margin_left = -706.0
|
||||||
margin_top = -264.0
|
margin_top = -264.0
|
||||||
margin_right = 706.0
|
margin_right = 706.0
|
||||||
margin_bottom = 264.0
|
margin_bottom = 264.0
|
||||||
|
mouse_filter = 2
|
||||||
texture = ExtResource( 11 )
|
texture = ExtResource( 11 )
|
||||||
stretch_mode = 4
|
stretch_mode = 4
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
|
@ -400,6 +400,7 @@ script = ExtResource( 13 )
|
||||||
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
|
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
|
||||||
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
|
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
|
||||||
[connection signal="bird_flight_start" from="World" to="SoundEffectsPlayer" method="_on_World_bird_flight_start"]
|
[connection signal="bird_flight_start" from="World" to="SoundEffectsPlayer" method="_on_World_bird_flight_start"]
|
||||||
|
[connection signal="digging_started" from="World" to="SoundEffectsPlayer" method="_on_World_digging_started"]
|
||||||
[connection signal="map_opened" from="World" to="SoundEffectsPlayer" method="_on_World_map_opened"]
|
[connection signal="map_opened" from="World" to="SoundEffectsPlayer" method="_on_World_map_opened"]
|
||||||
[connection signal="treasure_found" from="World" to="SoundEffectsPlayer" method="_on_World_treasure_found"]
|
[connection signal="treasure_found" from="World" to="SoundEffectsPlayer" method="_on_World_treasure_found"]
|
||||||
[connection signal="world_generation_triggered" from="World" to="SoundEffectsPlayer" method="_on_World_world_generation_triggered"]
|
[connection signal="world_generation_triggered" from="World" to="SoundEffectsPlayer" method="_on_World_world_generation_triggered"]
|
||||||
|
|
|
@ -174,6 +174,6 @@ func _draw():
|
||||||
draw_set_transform (treasure_local_coords + offset_world, 0, Vector2.ONE)
|
draw_set_transform (treasure_local_coords + offset_world, 0, Vector2.ONE)
|
||||||
draw_polygon(HexTileDrawer.HexPoints, HexTileDrawer.create_color_array("#922"))
|
draw_polygon(HexTileDrawer.HexPoints, HexTileDrawer.create_color_array("#922"))
|
||||||
|
|
||||||
|
if Globals.draw_island_bbox:
|
||||||
draw_set_transform(transform.origin, transform.get_rotation(), transform.get_scale())
|
draw_set_transform(transform.origin, transform.get_rotation(), transform.get_scale())
|
||||||
|
|
||||||
draw_rect(rect_world, Color.red, false)
|
draw_rect(rect_world, Color.red, false)
|
||||||
|
|
|
@ -50,3 +50,8 @@ func _on_World_wrong_digsite():
|
||||||
func _on_World_world_generation_triggered():
|
func _on_World_world_generation_triggered():
|
||||||
stream = noch_einen_schatz_finden
|
stream = noch_einen_schatz_finden
|
||||||
play()
|
play()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_World_digging_started():
|
||||||
|
stream = hauruck
|
||||||
|
play()
|
||||||
|
|
|
@ -58,6 +58,7 @@ var birdy_spring_v = Vector2.ZERO
|
||||||
var birdy_spring_xt = Vector2.ONE
|
var birdy_spring_xt = Vector2.ONE
|
||||||
var birdy_duration = 4.0
|
var birdy_duration = 4.0
|
||||||
|
|
||||||
|
signal digging_started
|
||||||
signal world_generation_triggered
|
signal world_generation_triggered
|
||||||
signal wrong_digsite
|
signal wrong_digsite
|
||||||
signal treasure_found
|
signal treasure_found
|
||||||
|
@ -278,12 +279,11 @@ func generate():
|
||||||
rng.randomize()
|
rng.randomize()
|
||||||
randomize()
|
randomize()
|
||||||
|
|
||||||
|
|
||||||
var radius = 800
|
var radius = 800
|
||||||
var num_islands = 4
|
var num_islands = 4
|
||||||
|
|
||||||
var island_files = []
|
var island_files = []
|
||||||
for i in range (num_islands):
|
for i in range (10):
|
||||||
island_files.append("res://islands/pirate_game_island_" + str(i) + ".island")
|
island_files.append("res://islands/pirate_game_island_" + str(i) + ".island")
|
||||||
island_files.shuffle()
|
island_files.shuffle()
|
||||||
|
|
||||||
|
@ -631,6 +631,7 @@ func _on_BirdyButton_pressed():
|
||||||
func _on_DigButton_pressed():
|
func _on_DigButton_pressed():
|
||||||
print ("dig pressed")
|
print ("dig pressed")
|
||||||
if PlayerChar.state == PlayerChar.State.Walking:
|
if PlayerChar.state == PlayerChar.State.Walking:
|
||||||
|
emit_signal("digging_started")
|
||||||
PlayerChar.on_dig_start()
|
PlayerChar.on_dig_start()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ func on_leave_island():
|
||||||
func on_dig_start():
|
func on_dig_start():
|
||||||
print ("Start digging")
|
print ("Start digging")
|
||||||
state = State.Digging
|
state = State.Digging
|
||||||
DigTimer.start(1.0)
|
DigTimer.start(2.0)
|
||||||
|
|
||||||
|
|
||||||
func on_dig_stop():
|
func on_dig_stop():
|
||||||
|
|
Loading…
Reference in New Issue