From 210ca93d6c1bb0e453daddda4fad87b0c620eef4 Mon Sep 17 00:00:00 2001 From: Delta-key Date: Fri, 3 Jul 2020 23:06:00 -0300 Subject: [PATCH] Commented a bunch of print() --- Scenes/bg.tscn | 7 +------ Scenes/bg_layer.tscn | 18 ++++++------------ Scenes/global.gd | 38 +++++++++++++++++++------------------- Scenes/stages/0.tscn | 8 ++++---- project.godot | 2 +- 5 files changed, 31 insertions(+), 42 deletions(-) diff --git a/Scenes/bg.tscn b/Scenes/bg.tscn index 56244ba..6e4826b 100644 --- a/Scenes/bg.tscn +++ b/Scenes/bg.tscn @@ -3,15 +3,10 @@ [ext_resource path="res://Resources/MoreTextures/bg.png" type="Texture" id=1] [sub_resource type="GDScript" id=1] - script/source = "extends Sprite -func _ready(): self.frame= randi()%self.hframes" +func _ready(): self.frame=randi()%self.hframes" [node name="bg" type="Sprite"] - texture = ExtResource( 1 ) hframes = 6 script = SubResource( 1 ) -_sections_unfolded = [ "Animation" ] - - diff --git a/Scenes/bg_layer.tscn b/Scenes/bg_layer.tscn index f6a91f4..803e02c 100644 --- a/Scenes/bg_layer.tscn +++ b/Scenes/bg_layer.tscn @@ -1,8 +1,7 @@ [gd_scene load_steps=2 format=2] [sub_resource type="GDScript" id=1] - -script/source = "extends CanvasLayer +script/source = "extends ParallaxBackground const bg=preload(\"res://Scenes/bg.tscn\") func _ready(): @@ -10,20 +9,15 @@ func _ready(): var i=bg.instance() i.global_position.x=rand_range(16,384-16) i.global_position.y=rand_range(16,216-16) - add_child(i) + $parallax_layer.add_child(i) " -[node name="bg" type="CanvasLayer" index="0"] - +[node name="bg" type="ParallaxBackground"] layer = -1 -offset = Vector2( 0, 0 ) -rotation = 0.0 -scale = Vector2( 1, 1 ) -transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +scroll_base_scale = Vector2( 0.2, 1 ) script = SubResource( 1 ) -[node name="canvas_modulate" type="CanvasModulate" parent="." index="0"] - +[node name="canvas_modulate" type="CanvasModulate" parent="."] color = Color( 0.75, 0.75, 0.8, 1 ) - +[node name="parallax_layer" type="ParallaxLayer" parent="."] diff --git a/Scenes/global.gd b/Scenes/global.gd index 8705e9e..e6e602b 100644 --- a/Scenes/global.gd +++ b/Scenes/global.gd @@ -36,36 +36,36 @@ func _ready(): randomize() OS.window_size*=2 - print_debug('Global: Creating a Tween node...') + #print_debug('Global: Creating a Tween node...') var i=Tween.new() i.name='twn' add_child(i) twn=get_node('twn') - print_debug('Global: Done creating a Tween node.') + #print_debug('Global: Done creating a Tween node.') - print_debug('Global: Adding the Pause Manager to childrens...') + #print_debug('Global: Adding the Pause Manager to childrens...') add_child(pause_manager.instance()) - print_debug('Global: Done adding the Pause Manager.') + #print_debug('Global: Done adding the Pause Manager.') - print_debug('Global: Creating a Canvas Modulate to add some blue tint to the screen...') + #print_debug('Global: Creating a Canvas Modulate to add some blue tint to the screen...') var j=CanvasModulate.new() j.name='tint' j.color=blue_tint add_child(j) - print_debug('Global: Done adding the Canvas Modulate.') + #print_debug('Global: Done adding the Canvas Modulate.') - print_debug('Global: Turning processing on, for displaying the FPS on the window name...') + #print_debug('Global: Turning processing on, for displaying the FPS on the window name...') set_process(true) - print_debug('Global: Done turning processing on.') + #print_debug('Global: Done turning processing on.') - print_debug('Global: Adding the first music...') + #print_debug('Global: Adding the first music...') var k=music1.instance() k.name='music' add_child(k) - print_debug('Global: Done! Have fun with the same chord played over and over!') + #print_debug('Global: Done! Have fun with the same chord played over and over!') - print_debug('Global: Creating a Timer for the people that will speedrun this game...') - print_debug('Global: (I guess no one will do such thing, but... meh, whatever I guess)') + #print_debug('Global: Creating a Timer for the people that will speedrun this game...') + #print_debug('Global: (I guess no one will do such thing, but... meh, whatever I guess)') var l=Timer.new() l.name='timer' l.wait_time=60 @@ -73,9 +73,9 @@ func _ready(): l.one_shot=false l.connect("timeout", global, 'add_to_minutes') add_child(l) - print_debug('Global: Done! Timer added.') + #print_debug('Global: Done! Timer added.') - print_debug('Global: Ready! Hope you have fun!') + #print_debug('Global: Ready! Hope you have fun!') func add_to_minutes(): minutes+=1 func startTimer(): $timer.start() @@ -118,7 +118,7 @@ func change_stage(stage): func reload_stage(): if get_tree().current_scene.modulate.a==1: changeFromLowPassMusic() - print_debug('Global: Reseting current stage.') + #print_debug('Global: Reseting current stage.') get_tree().paused=true $tint.color=red_tint yield(get_tree().create_timer(0.75), 'timeout') @@ -129,16 +129,16 @@ func reload_stage(): # get_tree().reload_current_scene() # add_child(stage_reseter.instance()) func changeToLowPassMusic(): - print_debug('Global: Changing to filtered music.') + #print_debug('Global: Changing to filtered music.') AudioServer.set_bus_mute(AudioServer.get_bus_index('bgm'), true) AudioServer.set_bus_mute(AudioServer.get_bus_index('bgm_lp'), false) - print_debug('Global: Done, the music was changed.') + #print_debug('Global: Done, the music was changed.') func changeFromLowPassMusic(): - print_debug('Global: Changing to unfiltered music.') + #print_debug('Global: Changing to unfiltered music.') AudioServer.set_bus_mute(AudioServer.get_bus_index('bgm'), false) AudioServer.set_bus_mute(AudioServer.get_bus_index('bgm_lp'), true) - print_debug('Global: Done, the music was changed.') + #print_debug('Global: Done, the music was changed.') func vector_lerp(begin=Vector2(), end=Vector2(), alpha=0.1): var x=lerp(begin.x, end.x, alpha) diff --git a/Scenes/stages/0.tscn b/Scenes/stages/0.tscn index 9dfa2d1..fab49a0 100644 --- a/Scenes/stages/0.tscn +++ b/Scenes/stages/0.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=16 format=2] [ext_resource path="res://Scenes/bg_layer.tscn" type="PackedScene" id=1] [ext_resource path="res://Scenes/twn_stagefadein.tscn" type="PackedScene" id=2] @@ -11,7 +11,6 @@ [ext_resource path="res://Scenes/str_stagename.tscn" type="PackedScene" id=9] [ext_resource path="res://Scenes/grass.tscn" type="PackedScene" id=10] [ext_resource path="res://Scenes/vine.tscn" type="PackedScene" id=11] -[ext_resource path="res://Scenes/bg.tscn" type="PackedScene" id=12] [ext_resource path="res://Resources/SFX/Laser_shoot 6.wav" type="AudioStream" id=13] [sub_resource type="GDScript" id=1] @@ -122,6 +121,9 @@ custom_constants/shadow_offset_x = 3 custom_constants/shadow_offset_y = 3 text = "Down" script = SubResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} extra_delay = 0.5 [node name="twn_fade" type="Tween" parent="stage/diver_down/down"] @@ -153,8 +155,6 @@ position = Vector2( 40, 88 ) [node name="vine" parent="stage" instance=ExtResource( 11 )] position = Vector2( 120, 40 ) -[node name="bg" parent="stage" instance=ExtResource( 12 )] - [node name="snd_debug" type="AudioStreamPlayer" parent="."] stream = ExtResource( 13 ) bus = "sfx" diff --git a/project.godot b/project.godot index 2e509fa..b1fe3ba 100644 --- a/project.godot +++ b/project.godot @@ -120,7 +120,7 @@ ui_mute={ [node] -name_casing=2 +name_casing=1 [rendering]