Compare commits
	
		
			6 Commits 
		
	
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | d12ca7d2bd | 2 years ago | 
|  | 88968b3871 | 2 years ago | 
|  | d4e97136b3 | 2 years ago | 
|  | bde3cc5976 | 2 years ago | 
|  | 630670d5b1 | 2 years ago | 
|  | 88f1cec190 | 2 years ago | 
| @ -1 +0,0 @@ | |||||||
| audiost |  | ||||||
| @ -1,4 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
| echo -ne '\033c\033]0;pDash\a' |  | ||||||
| base_path="$(dirname "$(realpath "$0")")" |  | ||||||
| "$base_path/pDash.x86_64" "$@" |  | ||||||
											
												Binary file not shown.
											
										
									
								| @ -1,15 +0,0 @@ | |||||||
| [gd_resource type="AudioBusLayout" format=3 uid="uid://bnfly6iu8nvfp"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| bus/1/name = &"SFX" |  | ||||||
| bus/1/solo = false |  | ||||||
| bus/1/mute = false |  | ||||||
| bus/1/bypass_fx = false |  | ||||||
| bus/1/volume_db = 0.0 |  | ||||||
| bus/1/send = &"Master" |  | ||||||
| bus/2/name = &"Music" |  | ||||||
| bus/2/solo = false |  | ||||||
| bus/2/mute = false |  | ||||||
| bus/2/bypass_fx = false |  | ||||||
| bus/2/volume_db = 0.0 |  | ||||||
| bus/2/send = &"Master" |  | ||||||
| @ -1,39 +0,0 @@ | |||||||
| [preset.0] |  | ||||||
| 
 |  | ||||||
| name="Linux/X11" |  | ||||||
| platform="Linux/X11" |  | ||||||
| runnable=true |  | ||||||
| dedicated_server=false |  | ||||||
| custom_features="" |  | ||||||
| export_filter="all_resources" |  | ||||||
| include_filter="" |  | ||||||
| exclude_filter="" |  | ||||||
| export_path="../../../../../../../run/user/1016/gvfs/smb-share:server=canaima.casa.vm,share=turpial/00_casavm/12_pDasher/builds/pDash_v0.1.x86_64" |  | ||||||
| encryption_include_filters="" |  | ||||||
| encryption_exclude_filters="" |  | ||||||
| encrypt_pck=false |  | ||||||
| encrypt_directory=false |  | ||||||
| 
 |  | ||||||
| [preset.0.options] |  | ||||||
| 
 |  | ||||||
| custom_template/debug="" |  | ||||||
| custom_template/release="" |  | ||||||
| debug/export_console_wrapper=1 |  | ||||||
| binary_format/embed_pck=false |  | ||||||
| texture_format/bptc=true |  | ||||||
| texture_format/s3tc=true |  | ||||||
| texture_format/etc=false |  | ||||||
| texture_format/etc2=false |  | ||||||
| binary_format/architecture="x86_64" |  | ||||||
| ssh_remote_deploy/enabled=false |  | ||||||
| ssh_remote_deploy/host="user@host_ip" |  | ||||||
| ssh_remote_deploy/port="22" |  | ||||||
| ssh_remote_deploy/extra_args_ssh="" |  | ||||||
| ssh_remote_deploy/extra_args_scp="" |  | ||||||
| ssh_remote_deploy/run_script="#!/usr/bin/env bash |  | ||||||
| export DISPLAY=:0 |  | ||||||
| unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" |  | ||||||
| \"{temp_dir}/{exe_name}\" {cmd_args}" |  | ||||||
| ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash |  | ||||||
| kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") |  | ||||||
| rm -rf \"{temp_dir}\"" |  | ||||||
| Before Width: | Height: | Size: 202 B | 
| @ -1,34 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="texture" |  | ||||||
| type="CompressedTexture2D" |  | ||||||
| uid="uid://h6nywllbx7in" |  | ||||||
| path="res://.godot/imported/gravity_switch.png-4c9bdc1ecc3cdc6d786578b3cfafa968.ctex" |  | ||||||
| metadata={ |  | ||||||
| "vram_texture": false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://icons/gravity_switch.png" |  | ||||||
| dest_files=["res://.godot/imported/gravity_switch.png-4c9bdc1ecc3cdc6d786578b3cfafa968.ctex"] |  | ||||||
| 
 |  | ||||||
| [params] |  | ||||||
| 
 |  | ||||||
| compress/mode=0 |  | ||||||
| compress/high_quality=false |  | ||||||
| compress/lossy_quality=0.7 |  | ||||||
| compress/hdr_compression=1 |  | ||||||
| compress/normal_map=0 |  | ||||||
| compress/channel_pack=0 |  | ||||||
| mipmaps/generate=false |  | ||||||
| mipmaps/limit=-1 |  | ||||||
| roughness/mode=0 |  | ||||||
| roughness/src_normal="" |  | ||||||
| process/fix_alpha_border=true |  | ||||||
| process/premult_alpha=false |  | ||||||
| process/normal_map_invert_y=false |  | ||||||
| process/hdr_as_srgb=false |  | ||||||
| process/hdr_clamp_exposure=false |  | ||||||
| process/size_limit=0 |  | ||||||
| detect_3d/compress_to=1 |  | ||||||
| Before Width: | Height: | Size: 825 B | 
| @ -1,34 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="texture" |  | ||||||
| type="CompressedTexture2D" |  | ||||||
| uid="uid://bdshi27v4osg2" |  | ||||||
| path="res://.godot/imported/yorchnet_pixel_64.png-72f4e78a0b6ea5c7ddb078ba06cc8c02.ctex" |  | ||||||
| metadata={ |  | ||||||
| "vram_texture": false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://icons/yorchnet_pixel_64.png" |  | ||||||
| dest_files=["res://.godot/imported/yorchnet_pixel_64.png-72f4e78a0b6ea5c7ddb078ba06cc8c02.ctex"] |  | ||||||
| 
 |  | ||||||
| [params] |  | ||||||
| 
 |  | ||||||
| compress/mode=0 |  | ||||||
| compress/high_quality=false |  | ||||||
| compress/lossy_quality=0.7 |  | ||||||
| compress/hdr_compression=1 |  | ||||||
| compress/normal_map=0 |  | ||||||
| compress/channel_pack=0 |  | ||||||
| mipmaps/generate=false |  | ||||||
| mipmaps/limit=-1 |  | ||||||
| roughness/mode=0 |  | ||||||
| roughness/src_normal="" |  | ||||||
| process/fix_alpha_border=true |  | ||||||
| process/premult_alpha=false |  | ||||||
| process/normal_map_invert_y=false |  | ||||||
| process/hdr_as_srgb=false |  | ||||||
| process/hdr_clamp_exposure=false |  | ||||||
| process/size_limit=0 |  | ||||||
| detect_3d/compress_to=1 |  | ||||||
| @ -0,0 +1,18 @@ | |||||||
|  | [gd_scene load_steps=2 format=3 uid="uid://bc3i3udumnh3r"] | ||||||
|  | 
 | ||||||
|  | [ext_resource type="Script" path="res://scripts/Main.gd" id="1_wd8h7"] | ||||||
|  | 
 | ||||||
|  | [node name="Main" type="Node2D"] | ||||||
|  | script = ExtResource("1_wd8h7") | ||||||
|  | 
 | ||||||
|  | [node name="Game" type="Node2D" parent="."] | ||||||
|  | 
 | ||||||
|  | [node name="UI" type="CanvasLayer" parent="."] | ||||||
|  | 
 | ||||||
|  | [node name="Splash" type="CanvasLayer" parent="."] | ||||||
|  | 
 | ||||||
|  | [node name="Curtains" type="CanvasLayer" parent="."] | ||||||
|  | 
 | ||||||
|  | [node name="Post" type="CanvasLayer" parent="."] | ||||||
|  | 
 | ||||||
|  | [node name="Timer" type="Timer" parent="."] | ||||||
| @ -1,31 +0,0 @@ | |||||||
| [gd_scene load_steps=2 format=3 uid="uid://8rtse17u7bqg"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/End.gd" id="1_0587q"] |  | ||||||
| 
 |  | ||||||
| [node name="End" type="CanvasLayer"] |  | ||||||
| script = ExtResource("1_0587q") |  | ||||||
| metadata/_edit_use_anchors_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CenterContainer" type="CenterContainer" parent="."] |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| 
 |  | ||||||
| [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| 
 |  | ||||||
| [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| size_flags_vertical = 1 |  | ||||||
| theme_override_font_sizes/font_size = 72 |  | ||||||
| text = "Game Over!" |  | ||||||
| horizontal_alignment = 1 |  | ||||||
| 
 |  | ||||||
| [node name="Label2" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| text = "Try again |  | ||||||
| " |  | ||||||
| 
 |  | ||||||
| [connection signal="button_up" from="CenterContainer/VBoxContainer/Label2" to="." method="_on_play"] |  | ||||||
| @ -1,75 +0,0 @@ | |||||||
| [gd_scene load_steps=7 format=3 uid="uid://dvt585i7m0286"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/Splash.gd" id="1_3yqra"] |  | ||||||
| [ext_resource type="Shader" path="res://shaders/Splash.gdshader" id="2_5fbyd"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://bdshi27v4osg2" path="res://icons/yorchnet_pixel_64.png" id="2_fpfqa"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_ijjp2"] |  | ||||||
| shader = ExtResource("2_5fbyd") |  | ||||||
| shader_parameter/flap_speed = 4.0 |  | ||||||
| shader_parameter/scale = 4.0 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_2v5v3"] |  | ||||||
| resource_name = "animation" |  | ||||||
| length = 3.0 |  | ||||||
| tracks/0/type = "value" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath("ColorRect:self_modulate") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "times": PackedFloat32Array(0.1, 0.5, 2.5, 3), |  | ||||||
| "transitions": PackedFloat32Array(1, 1, 1, 1), |  | ||||||
| "update": 0, |  | ||||||
| "values": [Color(1, 1, 1, 1), Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(1, 1, 1, 1)] |  | ||||||
| } |  | ||||||
| tracks/1/type = "method" |  | ||||||
| tracks/1/imported = false |  | ||||||
| tracks/1/enabled = true |  | ||||||
| tracks/1/path = NodePath(".") |  | ||||||
| tracks/1/interp = 1 |  | ||||||
| tracks/1/loop_wrap = true |  | ||||||
| tracks/1/keys = { |  | ||||||
| "times": PackedFloat32Array(3), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "values": [{ |  | ||||||
| "args": [], |  | ||||||
| "method": &"load_start_menu" |  | ||||||
| }] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_sansa"] |  | ||||||
| _data = { |  | ||||||
| "animation": SubResource("Animation_2v5v3") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [node name="Splash" type="CanvasLayer"] |  | ||||||
| script = ExtResource("1_3yqra") |  | ||||||
| metadata/_edit_use_anchors_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CenterContainer" type="CenterContainer" parent="."] |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| 
 |  | ||||||
| [node name="TextureRect" type="TextureRect" parent="CenterContainer"] |  | ||||||
| material = SubResource("ShaderMaterial_ijjp2") |  | ||||||
| layout_mode = 2 |  | ||||||
| texture = ExtResource("2_fpfqa") |  | ||||||
| 
 |  | ||||||
| [node name="ColorRect" type="ColorRect" parent="."] |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| color = Color(0, 0, 0, 1) |  | ||||||
| 
 |  | ||||||
| [node name="AnimationPlayer" type="AnimationPlayer" parent="."] |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_sansa") |  | ||||||
| } |  | ||||||
| autoplay = "animation" |  | ||||||
| @ -1,81 +0,0 @@ | |||||||
| [gd_scene load_steps=2 format=3 uid="uid://o0c5ir7543g1"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/End.gd" id="1_jfc42"] |  | ||||||
| 
 |  | ||||||
| [node name="MainMenu" type="CanvasLayer"] |  | ||||||
| script = ExtResource("1_jfc42") |  | ||||||
| metadata/_edit_use_anchors_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CenterContainer" type="CenterContainer" parent="."] |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| 
 |  | ||||||
| [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| 
 |  | ||||||
| [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| size_flags_vertical = 1 |  | ||||||
| theme_override_font_sizes/font_size = 72 |  | ||||||
| text = "Welcome to pDash" |  | ||||||
| horizontal_alignment = 1 |  | ||||||
| 
 |  | ||||||
| [node name="Button01" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| focus_neighbor_left = NodePath("../Button05") |  | ||||||
| focus_neighbor_top = NodePath("../Button05") |  | ||||||
| focus_neighbor_right = NodePath("../Button02") |  | ||||||
| focus_neighbor_bottom = NodePath("../Button02") |  | ||||||
| focus_next = NodePath("../Button02") |  | ||||||
| focus_previous = NodePath("../Button05") |  | ||||||
| text = "Play Level 1" |  | ||||||
| 
 |  | ||||||
| [node name="Button02" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| focus_neighbor_left = NodePath("../Button01") |  | ||||||
| focus_neighbor_top = NodePath("../Button01") |  | ||||||
| focus_neighbor_right = NodePath("../Button03") |  | ||||||
| focus_neighbor_bottom = NodePath("../Button03") |  | ||||||
| focus_next = NodePath("../Button03") |  | ||||||
| focus_previous = NodePath("../Button01") |  | ||||||
| text = "Play Level 2" |  | ||||||
| 
 |  | ||||||
| [node name="Button03" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| focus_neighbor_left = NodePath("../Button02") |  | ||||||
| focus_neighbor_top = NodePath("../Button02") |  | ||||||
| focus_neighbor_right = NodePath("../Button04") |  | ||||||
| focus_neighbor_bottom = NodePath("../Button04") |  | ||||||
| focus_next = NodePath("../Button04") |  | ||||||
| focus_previous = NodePath("../Button02") |  | ||||||
| disabled = true |  | ||||||
| text = "Options" |  | ||||||
| 
 |  | ||||||
| [node name="Button04" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| focus_neighbor_left = NodePath("../Button03") |  | ||||||
| focus_neighbor_top = NodePath("../Button03") |  | ||||||
| focus_neighbor_right = NodePath("../Button05") |  | ||||||
| focus_neighbor_bottom = NodePath("../Button05") |  | ||||||
| focus_next = NodePath("../Button05") |  | ||||||
| focus_previous = NodePath(".") |  | ||||||
| disabled = true |  | ||||||
| text = "Credits" |  | ||||||
| 
 |  | ||||||
| [node name="Button05" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| focus_neighbor_left = NodePath("../Button04") |  | ||||||
| focus_neighbor_top = NodePath("../Button04") |  | ||||||
| focus_neighbor_right = NodePath("../Button01") |  | ||||||
| focus_neighbor_bottom = NodePath("../Button01") |  | ||||||
| focus_next = NodePath("../Button01") |  | ||||||
| focus_previous = NodePath("../Button04") |  | ||||||
| text = "Quit |  | ||||||
| " |  | ||||||
| 
 |  | ||||||
| [connection signal="button_up" from="CenterContainer/VBoxContainer/Button01" to="." method="_on_play_lv0"] |  | ||||||
| [connection signal="button_up" from="CenterContainer/VBoxContainer/Button02" to="." method="_on_play_lv1"] |  | ||||||
| [connection signal="button_up" from="CenterContainer/VBoxContainer/Button05" to="." method="_on_quit"] |  | ||||||
| @ -1,30 +0,0 @@ | |||||||
| [gd_scene load_steps=2 format=3 uid="uid://8euefl26umu1"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/Win.gd" id="1_wgn5v"] |  | ||||||
| 
 |  | ||||||
| [node name="End" type="CanvasLayer"] |  | ||||||
| script = ExtResource("1_wgn5v") |  | ||||||
| metadata/_edit_use_anchors_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CenterContainer" type="CenterContainer" parent="."] |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| 
 |  | ||||||
| [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| 
 |  | ||||||
| [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| size_flags_vertical = 1 |  | ||||||
| theme_override_font_sizes/font_size = 72 |  | ||||||
| text = "You Win!" |  | ||||||
| horizontal_alignment = 1 |  | ||||||
| 
 |  | ||||||
| [node name="Label2" type="Button" parent="CenterContainer/VBoxContainer"] |  | ||||||
| layout_mode = 2 |  | ||||||
| text = "Play Again?" |  | ||||||
| 
 |  | ||||||
| [connection signal="button_up" from="CenterContainer/VBoxContainer/Label2" to="." method="_on_label_2_button_up"] |  | ||||||
| @ -1,110 +0,0 @@ | |||||||
| [gd_scene load_steps=12 format=3 uid="uid://cjpwcih4ro8gu"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/switch.gd" id="1_523fa"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://h6nywllbx7in" path="res://icons/gravity_switch.png" id="2_wf4my"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_wyj6h"] |  | ||||||
| _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.133178, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 3 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_silse"] |  | ||||||
| curve = SubResource("Curve_wyj6h") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_vvvck"] |  | ||||||
| min_value = -200.0 |  | ||||||
| max_value = 200.0 |  | ||||||
| _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.05, 32), 0.0, 0.0, 0, 0, Vector2(0.2, -5), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 3 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_qurcg"] |  | ||||||
| curve = SubResource("Curve_vvvck") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_axyq0"] |  | ||||||
| particle_flag_disable_z = true |  | ||||||
| inherit_velocity_ratio = -0.51 |  | ||||||
| spread = 180.0 |  | ||||||
| initial_velocity_min = 80.0 |  | ||||||
| initial_velocity_max = 160.0 |  | ||||||
| gravity = Vector3(0, 0, 0) |  | ||||||
| linear_accel_max = 45.0 |  | ||||||
| linear_accel_curve = SubResource("CurveTexture_qurcg") |  | ||||||
| scale_min = 8.0 |  | ||||||
| scale_max = 8.0 |  | ||||||
| alpha_curve = SubResource("CurveTexture_silse") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CircleShape2D" id="CircleShape2D_yx6cf"] |  | ||||||
| radius = 15.0 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_fvmq8"] |  | ||||||
| length = 0.001 |  | ||||||
| tracks/0/type = "value" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath("CollisionShape2D/TextureRect:rotation") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 0, |  | ||||||
| "values": [0.0] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_a34jr"] |  | ||||||
| resource_name = "spin" |  | ||||||
| length = 5.0 |  | ||||||
| tracks/0/type = "value" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath("CollisionShape2D:rotation") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "times": PackedFloat32Array(0, 5), |  | ||||||
| "transitions": PackedFloat32Array(0.0853777, 0.0877996), |  | ||||||
| "update": 0, |  | ||||||
| "values": [0.0, 12.5664] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_0riwv"] |  | ||||||
| _data = { |  | ||||||
| "RESET": SubResource("Animation_fvmq8"), |  | ||||||
| "spin": SubResource("Animation_a34jr") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [node name="GravitySwitch01" type="Area2D"] |  | ||||||
| position = Vector2(361, 15) |  | ||||||
| collision_layer = 0 |  | ||||||
| linear_damp = 1.02 |  | ||||||
| angular_damp = 1.205 |  | ||||||
| script = ExtResource("1_523fa") |  | ||||||
| type = "gravity" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="GPUParticles2D" type="GPUParticles2D" parent="."] |  | ||||||
| process_material = SubResource("ParticleProcessMaterial_axyq0") |  | ||||||
| randomness = 1.0 |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="."] |  | ||||||
| scale = Vector2(4, 4) |  | ||||||
| shape = SubResource("CircleShape2D_yx6cf") |  | ||||||
| 
 |  | ||||||
| [node name="TextureRect" type="TextureRect" parent="CollisionShape2D"] |  | ||||||
| modulate = Color(1, 1, 1, 0.196078) |  | ||||||
| anchors_preset = 8 |  | ||||||
| anchor_left = 0.5 |  | ||||||
| anchor_top = 0.5 |  | ||||||
| anchor_right = 0.5 |  | ||||||
| anchor_bottom = 0.5 |  | ||||||
| offset_left = -8.0 |  | ||||||
| offset_top = -8.0 |  | ||||||
| offset_right = 8.0 |  | ||||||
| offset_bottom = 8.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| texture = ExtResource("2_wf4my") |  | ||||||
| 
 |  | ||||||
| [node name="AnimationPlayer" type="AnimationPlayer" parent="."] |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_0riwv") |  | ||||||
| } |  | ||||||
| @ -1,12 +1,15 @@ | |||||||
| extends Area2D | extends Node2D | ||||||
|  | 
 | ||||||
|  | @export var ini_dir: int | ||||||
|  | @export var ini_grav_vec: Vector2 | ||||||
|  | #var asp : AudioStreamPlayer | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # 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(): | ||||||
| 	#$pDasher.body_entered.connect(OnBodyEntered) | 	#asp = $AudioStreamPlayer | ||||||
| 	pass # Replace with function body. | 	pass	 | ||||||
| 
 | 
 | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
| func _process(delta): | func _process(delta): | ||||||
| 	pass | 	pass | ||||||
| 
 |  | ||||||
| @ -1,95 +1,99 @@ | |||||||
| [gd_scene load_steps=6 format=3 uid="uid://bhoqj8b4oxyks"] | [gd_scene load_steps=7 format=3 uid="uid://bhoqj8b4oxyks"] | ||||||
| 
 | 
 | ||||||
| [ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/platform_01.tscn" id="1_kka3y"] | [ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/modules/platform_02.tscn" id="1_cbvrq"] | ||||||
| [ext_resource type="Script" path="res://scripts/checkpoint.gd" id="2_0yetm"] | [ext_resource type="Script" path="res://scenes/levels/Level.gd" id="1_qbkcb"] | ||||||
| [ext_resource type="PackedScene" uid="uid://cuefds30ddne1" path="res://scenes/platform_00.tscn" id="4_wje6l"] | [ext_resource type="PackedScene" uid="uid://cuefds30ddne1" path="res://scenes/modules/platform_00.tscn" id="2_jkfr1"] | ||||||
| 
 | [ext_resource type="Script" path="res://scripts/switch.gd" id="4_0mgws"] | ||||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] |  | ||||||
| 
 | 
 | ||||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_0f50m"] | [sub_resource type="RectangleShape2D" id="RectangleShape2D_0f50m"] | ||||||
| size = Vector2(7318, 557) | size = Vector2(7318, 557) | ||||||
| 
 | 
 | ||||||
|  | [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] | ||||||
|  | 
 | ||||||
| [node name="Level" type="Node2D"] | [node name="Level" type="Node2D"] | ||||||
| position = Vector2(0, 96) | position = Vector2(0, 96) | ||||||
|  | script = ExtResource("1_qbkcb") | ||||||
|  | ini_dir = 1 | ||||||
|  | ini_grav_vec = Vector2(0, 1) | ||||||
|  | metadata/_edit_horizontal_guides_ = [-298.0, 601.0, -324.0] | ||||||
| 
 | 
 | ||||||
| [node name="SpawnPoint" type="Node2D" parent="."] | [node name="SpawnPoint" type="Node2D" parent="."] | ||||||
|  | position = Vector2(0, -100) | ||||||
| 
 | 
 | ||||||
| [node name="Platforms" type="CanvasGroup" parent="."] | [node name="Platforms" type="CanvasGroup" parent="."] | ||||||
| 
 | 
 | ||||||
| [node name="Platform_26" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_26" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(28, 60) | position = Vector2(28, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_27" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_27" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(328, 60) | position = Vector2(328, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_28" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_28" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(674, 60) | position = Vector2(674, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_29" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_29" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(1079, 139) | position = Vector2(1079, 139) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_31" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_31" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(1629, 139) | position = Vector2(1629, 139) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_30" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_30" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| position = Vector2(2870, 59) | position = Vector2(2870, 59) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_25" parent="Platforms" instance=ExtResource("1_kka3y")] | [node name="Platform_25" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| modulate = Color(0.00784314, 0.490196, 0, 1) | modulate = Color(0.00784314, 0.490196, 0, 1) | ||||||
| position = Vector2(3755, 149) | position = Vector2(3755, 149) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_00" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_00" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(1079, 60) | position = Vector2(1079, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_09" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_09" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(1629, 60) | position = Vector2(1629, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_10" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_10" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(1904, 60) | position = Vector2(1904, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_01" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_01" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(1354, 60) | position = Vector2(1354, 60) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_06" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_06" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(2217, 59) | position = Vector2(2217, 59) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_07" parent="Platforms" instance=ExtResource("4_wje6l")] | [node name="Platform_07" parent="Platforms" instance=ExtResource("2_jkfr1")] | ||||||
| position = Vector2(2492, 59) | position = Vector2(2492, 59) | ||||||
| 
 | 
 | ||||||
| [node name="Checkpoints" type="CanvasGroup" parent="."] | [node name="Platform_32" parent="Platforms" instance=ExtResource("1_cbvrq")] | ||||||
| 
 | position = Vector2(3287, 59) | ||||||
| [node name="End" type="Area2D" parent="Checkpoints"] |  | ||||||
| position = Vector2(3755, 128) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| script = ExtResource("2_0yetm") |  | ||||||
| type = "end" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Checkpoints/End"] |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 | 
 | ||||||
| [node name="Abysses" type="CanvasGroup" parent="."] | [node name="Switches" type="CanvasGroup" parent="."] | ||||||
| 
 | 
 | ||||||
| [node name="Abyss" type="Area2D" parent="Abysses"] | [node name="Abyss" type="Area2D" parent="Switches"] | ||||||
|  | position = Vector2(28, -394) | ||||||
|  | script = ExtResource("4_0mgws") | ||||||
|  | type = 1 | ||||||
| metadata/_edit_group_ = true | metadata/_edit_group_ = true | ||||||
| 
 | 
 | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss"] | [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Abyss"] | ||||||
| position = Vector2(951, 1182) | position = Vector2(951, 1182) | ||||||
| shape = SubResource("RectangleShape2D_0f50m") | shape = SubResource("RectangleShape2D_0f50m") | ||||||
| 
 | 
 | ||||||
| [node name="Abyss2" type="Area2D" parent="Abysses"] | [node name="Abyss2" type="Area2D" parent="Switches"] | ||||||
| position = Vector2(0, -2964) | position = Vector2(0, -1885) | ||||||
|  | script = ExtResource("4_0mgws") | ||||||
|  | type = 1 | ||||||
| metadata/_edit_group_ = true | metadata/_edit_group_ = true | ||||||
| 
 | 
 | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss2"] | [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Abyss2"] | ||||||
| position = Vector2(951, 1182) | position = Vector2(951, 1182) | ||||||
| shape = SubResource("RectangleShape2D_0f50m") | shape = SubResource("RectangleShape2D_0f50m") | ||||||
| 
 | 
 | ||||||
| [node name="Switches" type="CanvasGroup" parent="."] | [node name="End" type="Area2D" parent="Switches"] | ||||||
| 
 | position = Vector2(3755, 128) | ||||||
| [node name="Direction" type="Node2D" parent="Switches"] | scale = Vector2(16.672, 1) | ||||||
|  | script = ExtResource("4_0mgws") | ||||||
|  | metadata/_edit_group_ = true | ||||||
| 
 | 
 | ||||||
| [node name="Gravity" type="Node2D" parent="Switches"] | [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/End"] | ||||||
|  | shape = SubResource("RectangleShape2D_7hfyn") | ||||||
| 
 | 
 | ||||||
| [node name="Platform_30" parent="." instance=ExtResource("1_kka3y")] | [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] | ||||||
| position = Vector2(3287, 59) |  | ||||||
|  | |||||||
| @ -1,181 +0,0 @@ | |||||||
| [gd_scene load_steps=8 format=3 uid="uid://ctnhjgpqxjrw0"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/platform_01.tscn" id="1_30vdq"] |  | ||||||
| [ext_resource type="Script" path="res://scripts/checkpoint.gd" id="2_v00sg"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://cjpwcih4ro8gu" path="res://scenes/gravity_switch.tscn" id="3_fjevk"] |  | ||||||
| [ext_resource type="Script" path="res://scripts/switch.gd" id="4_64uew"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_0f50m"] |  | ||||||
| size = Vector2(7318, 557) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] |  | ||||||
| 
 |  | ||||||
| [node name="Level" type="Node2D"] |  | ||||||
| 
 |  | ||||||
| [node name="Platforms" type="CanvasGroup" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Platform_01" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| 
 |  | ||||||
| [node name="Platform_14" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(2986, 91) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_15" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(1483, -696) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_16" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(1595, 188) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_17" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(2068, 161) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_18" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(1019, -452) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_19" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(3629, 130) |  | ||||||
| rotation = 1.5708 |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_20" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(2338, 297) |  | ||||||
| rotation = 1.5708 |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_21" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(607, -296) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_22" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(1052, -220) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_23" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(2604, 159) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_24" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| position = Vector2(3363, 53) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Platform_25" parent="Platforms" instance=ExtResource("1_30vdq")] |  | ||||||
| modulate = Color(0.00784314, 0.490196, 0, 1) |  | ||||||
| position = Vector2(3880, 153) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| 
 |  | ||||||
| [node name="Checkpoints" type="CanvasGroup" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="End" type="Area2D" parent="Checkpoints"] |  | ||||||
| position = Vector2(3880, 133) |  | ||||||
| scale = Vector2(16.672, 1) |  | ||||||
| script = ExtResource("2_v00sg") |  | ||||||
| type = "end" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Checkpoints/End"] |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 |  | ||||||
| [node name="Abysses" type="CanvasGroup" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Abyss" type="Area2D" parent="Abysses"] |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss"] |  | ||||||
| position = Vector2(951, 1182) |  | ||||||
| shape = SubResource("RectangleShape2D_0f50m") |  | ||||||
| 
 |  | ||||||
| [node name="Abyss2" type="Area2D" parent="Abysses"] |  | ||||||
| position = Vector2(0, -2964) |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss2"] |  | ||||||
| position = Vector2(951, 1182) |  | ||||||
| shape = SubResource("RectangleShape2D_0f50m") |  | ||||||
| 
 |  | ||||||
| [node name="Switches" type="CanvasGroup" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Gravity" type="Node2D" parent="Switches"] |  | ||||||
| 
 |  | ||||||
| [node name="GravitySwitch01" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] |  | ||||||
| 
 |  | ||||||
| [node name="GravitySwitch02" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] |  | ||||||
| position = Vector2(1344, -102) |  | ||||||
| 
 |  | ||||||
| [node name="GravitySwitch03" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] |  | ||||||
| position = Vector2(1743, -586) |  | ||||||
| 
 |  | ||||||
| [node name="Direction" type="Node2D" parent="Switches"] |  | ||||||
| 
 |  | ||||||
| [node name="DirectionSwitch01" type="Area2D" parent="Switches/Direction"] |  | ||||||
| self_modulate = Color(0, 0.737255, 0.745098, 0.423529) |  | ||||||
| position = Vector2(1017, -416) |  | ||||||
| collision_layer = 0 |  | ||||||
| script = ExtResource("4_64uew") |  | ||||||
| type = "gravity" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch01"] |  | ||||||
| scale = Vector2(2, 2) |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 |  | ||||||
| [node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch01"] |  | ||||||
| self_modulate = Color(1, 1, 1, 0.0980392) |  | ||||||
| scale = Vector2(48, 48) |  | ||||||
| mesh = SubResource("QuadMesh_qcjog") |  | ||||||
| 
 |  | ||||||
| [node name="DirectionSwitch02" type="Area2D" parent="Switches/Direction"] |  | ||||||
| self_modulate = Color(0, 0.737255, 0.745098, 0.423529) |  | ||||||
| position = Vector2(703, -262) |  | ||||||
| collision_layer = 0 |  | ||||||
| script = ExtResource("4_64uew") |  | ||||||
| type = "gravity" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch02"] |  | ||||||
| scale = Vector2(2, 2) |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 |  | ||||||
| [node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch02"] |  | ||||||
| self_modulate = Color(1, 1, 1, 0.0980392) |  | ||||||
| scale = Vector2(48, 48) |  | ||||||
| mesh = SubResource("QuadMesh_qcjog") |  | ||||||
| 
 |  | ||||||
| [node name="DirectionSwitch03" type="Area2D" parent="Switches/Direction"] |  | ||||||
| self_modulate = Color(0, 0.737255, 0.745098, 0.423529) |  | ||||||
| position = Vector2(1642, 153) |  | ||||||
| collision_layer = 0 |  | ||||||
| script = ExtResource("4_64uew") |  | ||||||
| type = "gravity" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch03"] |  | ||||||
| scale = Vector2(2, 2) |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 |  | ||||||
| [node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch03"] |  | ||||||
| self_modulate = Color(1, 1, 1, 0.0980392) |  | ||||||
| scale = Vector2(48, 48) |  | ||||||
| mesh = SubResource("QuadMesh_qcjog") |  | ||||||
| 
 |  | ||||||
| [node name="DirectionSwitch04" type="Area2D" parent="Switches/Direction"] |  | ||||||
| self_modulate = Color(0, 0.737255, 0.745098, 0.423529) |  | ||||||
| position = Vector2(2339, 104) |  | ||||||
| collision_layer = 0 |  | ||||||
| script = ExtResource("4_64uew") |  | ||||||
| type = "gravity" |  | ||||||
| metadata/_edit_group_ = true |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch04"] |  | ||||||
| scale = Vector2(2, 2) |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") |  | ||||||
| 
 |  | ||||||
| [node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch04"] |  | ||||||
| self_modulate = Color(1, 1, 1, 0.0980392) |  | ||||||
| scale = Vector2(48, 48) |  | ||||||
| mesh = SubResource("QuadMesh_qcjog") |  | ||||||
| @ -1,3 +0,0 @@ | |||||||
| [gd_scene format=3 uid="uid://b8xj2c2pml2p6"] |  | ||||||
| 
 |  | ||||||
| [node name="Loader" type="Node"] |  | ||||||
| @ -1,19 +0,0 @@ | |||||||
| [gd_scene load_steps=4 format=3 uid="uid://dsqm17w8hg428"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/World.gd" id="1_131aq"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://cnp8h65468543" path="res://scenes/overlays/crt_overlay.tscn" id="2_xf15f"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://bhoqj8b4oxyks" path="res://scenes/levels/level_0.tscn" id="3_wx6ne"] |  | ||||||
| 
 |  | ||||||
| [node name="World" type="Node2D"] |  | ||||||
| script = ExtResource("1_131aq") |  | ||||||
| 
 |  | ||||||
| [node name="Timer" type="Timer" parent="."] |  | ||||||
| one_shot = true |  | ||||||
| 
 |  | ||||||
| [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Level" parent="." instance=ExtResource("3_wx6ne")] |  | ||||||
| 
 |  | ||||||
| [node name="CRT_Overlay" parent="." instance=ExtResource("2_xf15f")] |  | ||||||
| 
 |  | ||||||
| [connection signal="timeout" from="Timer" to="." method="_on_timeout"] |  | ||||||
| @ -1,19 +0,0 @@ | |||||||
| [gd_scene load_steps=4 format=3 uid="uid://cokjt1a3cdywh"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Script" path="res://scripts/World.gd" id="1_3g8ek"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://cnp8h65468543" path="res://scenes/overlays/crt_overlay.tscn" id="2_onw3m"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://duai0nkslx7o8" path="res://scenes/levels/level_1.tscn" id="2_xjpi1"] |  | ||||||
| 
 |  | ||||||
| [node name="World" type="Node2D"] |  | ||||||
| script = ExtResource("1_3g8ek") |  | ||||||
| 
 |  | ||||||
| [node name="Timer" type="Timer" parent="."] |  | ||||||
| one_shot = true |  | ||||||
| 
 |  | ||||||
| [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Level" parent="." instance=ExtResource("2_xjpi1")] |  | ||||||
| 
 |  | ||||||
| [node name="CRT_Overlay" parent="." instance=ExtResource("2_onw3m")] |  | ||||||
| 
 |  | ||||||
| [connection signal="timeout" from="Timer" to="." method="_on_timeout"] |  | ||||||
| @ -0,0 +1,17 @@ | |||||||
|  | [gd_scene load_steps=3 format=3 uid="uid://bfanvsl6qnd7g"] | ||||||
|  | 
 | ||||||
|  | [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] | ||||||
|  | size = Vector2(224, 32) | ||||||
|  | 
 | ||||||
|  | [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] | ||||||
|  | size = Vector2(192, 32) | ||||||
|  | 
 | ||||||
|  | [node name="Platform_01" type="StaticBody2D"] | ||||||
|  | collision_layer = 2 | ||||||
|  | metadata/_edit_group_ = true | ||||||
|  | 
 | ||||||
|  | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||||||
|  | shape = SubResource("RectangleShape2D_7hfyn") | ||||||
|  | 
 | ||||||
|  | [node name="MeshInstance2D" type="MeshInstance2D" parent="."] | ||||||
|  | mesh = SubResource("QuadMesh_qcjog") | ||||||
| @ -1,18 +1,17 @@ | |||||||
| [gd_scene load_steps=3 format=3 uid="uid://dn0lboldm331y"] | [gd_scene load_steps=3 format=3 uid="uid://dn0lboldm331y"] | ||||||
| 
 | 
 | ||||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] | [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] | ||||||
|  | size = Vector2(352, 32) | ||||||
| 
 | 
 | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] | [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] | ||||||
|  | size = Vector2(320, 32) | ||||||
| 
 | 
 | ||||||
| [node name="Platform_01" type="StaticBody2D"] | [node name="Platform_02" type="StaticBody2D"] | ||||||
| collision_layer = 2 | collision_layer = 2 | ||||||
| metadata/_edit_group_ = true | metadata/_edit_group_ = true | ||||||
| 
 | 
 | ||||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="."] | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||||||
| scale = Vector2(16, 1) |  | ||||||
| shape = SubResource("RectangleShape2D_7hfyn") | shape = SubResource("RectangleShape2D_7hfyn") | ||||||
| 
 | 
 | ||||||
| [node name="MeshInstance2D" type="MeshInstance2D" parent="."] | [node name="MeshInstance2D" type="MeshInstance2D" parent="."] | ||||||
| position = Vector2(0.0224935, -0.125005) |  | ||||||
| scale = Vector2(300, 20) |  | ||||||
| mesh = SubResource("QuadMesh_qcjog") | mesh = SubResource("QuadMesh_qcjog") | ||||||
| @ -1,40 +0,0 @@ | |||||||
| [gd_scene load_steps=3 format=3 uid="uid://cnp8h65468543"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Shader" path="res://shaders/pend00-crt-vhs.gdshader" id="1_hco18"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_vmiki"] |  | ||||||
| shader = ExtResource("1_hco18") |  | ||||||
| shader_parameter/overlay = true |  | ||||||
| shader_parameter/scanlines_opacity = 0.062 |  | ||||||
| shader_parameter/scanlines_width = 0.062 |  | ||||||
| shader_parameter/grille_opacity = 0.062 |  | ||||||
| shader_parameter/resolution = Vector2(640, 320) |  | ||||||
| shader_parameter/pixelate = false |  | ||||||
| shader_parameter/roll = true |  | ||||||
| shader_parameter/roll_speed = 1.0 |  | ||||||
| shader_parameter/roll_size = 0.8 |  | ||||||
| shader_parameter/roll_variation = 2.574 |  | ||||||
| shader_parameter/distort_intensity = 0.0 |  | ||||||
| shader_parameter/noise_opacity = 0.05 |  | ||||||
| shader_parameter/noise_speed = 5.0 |  | ||||||
| shader_parameter/static_noise_intensity = 0.06 |  | ||||||
| shader_parameter/aberration = 0.00500005 |  | ||||||
| shader_parameter/brightness = 1.4 |  | ||||||
| shader_parameter/discolor = true |  | ||||||
| shader_parameter/warp_amount = 0.0 |  | ||||||
| shader_parameter/clip_warp = false |  | ||||||
| shader_parameter/vignette_intensity = 0.1 |  | ||||||
| shader_parameter/vignette_opacity = 0.5 |  | ||||||
| 
 |  | ||||||
| [node name="CRT_Overlay" type="CanvasLayer"] |  | ||||||
| 
 |  | ||||||
| [node name="ColorRect" type="ColorRect" parent="."] |  | ||||||
| light_mask = 0 |  | ||||||
| z_as_relative = false |  | ||||||
| material = SubResource("ShaderMaterial_vmiki") |  | ||||||
| anchors_preset = 15 |  | ||||||
| anchor_right = 1.0 |  | ||||||
| anchor_bottom = 1.0 |  | ||||||
| grow_horizontal = 2 |  | ||||||
| grow_vertical = 2 |  | ||||||
| mouse_filter = 2 |  | ||||||
| @ -0,0 +1,116 @@ | |||||||
|  | [gd_scene load_steps=9 format=3 uid="uid://dvt585i7m0286"] | ||||||
|  | 
 | ||||||
|  | [ext_resource type="Script" path="res://scripts/tools/between2.gd" id="1_o5ti7"] | ||||||
|  | [ext_resource type="Script" path="res://scripts/Splash.gd" id="1_tnoah"] | ||||||
|  | [ext_resource type="PackedScene" uid="uid://bc3i3udumnh3r" path="res://scenes/Main.tscn" id="2_dq85p"] | ||||||
|  | [ext_resource type="Texture2D" uid="uid://cihjayxr028j3" path="res://icon.svg" id="2_fpfqa"] | ||||||
|  | [ext_resource type="PackedScene" uid="uid://dfqspackuotur" path="res://scenes/ui/fade.tscn" id="4_hn3xu"] | ||||||
|  | 
 | ||||||
|  | [sub_resource type="Animation" id="Animation_sdvqp"] | ||||||
|  | length = 0.001 | ||||||
|  | tracks/0/type = "bezier" | ||||||
|  | tracks/0/imported = false | ||||||
|  | tracks/0/enabled = true | ||||||
|  | tracks/0/path = NodePath("Logo:weight") | ||||||
|  | tracks/0/interp = 1 | ||||||
|  | tracks/0/loop_wrap = true | ||||||
|  | tracks/0/keys = { | ||||||
|  | "handle_modes": PackedInt32Array(0), | ||||||
|  | "points": PackedFloat32Array(0.5, -0.25, 0, 0.25, 0), | ||||||
|  | "times": PackedFloat32Array(0) | ||||||
|  | } | ||||||
|  | tracks/1/type = "value" | ||||||
|  | tracks/1/imported = false | ||||||
|  | tracks/1/enabled = true | ||||||
|  | tracks/1/path = NodePath("Black:color") | ||||||
|  | tracks/1/interp = 1 | ||||||
|  | tracks/1/loop_wrap = true | ||||||
|  | tracks/1/keys = { | ||||||
|  | "times": PackedFloat32Array(0), | ||||||
|  | "transitions": PackedFloat32Array(1), | ||||||
|  | "update": 0, | ||||||
|  | "values": [Color(0, 0, 0, 1)] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [sub_resource type="Animation" id="Animation_2v5v3"] | ||||||
|  | resource_name = "animation" | ||||||
|  | length = 3.0 | ||||||
|  | tracks/0/type = "bezier" | ||||||
|  | tracks/0/imported = false | ||||||
|  | tracks/0/enabled = true | ||||||
|  | tracks/0/path = NodePath("Logo:weight") | ||||||
|  | tracks/0/interp = 1 | ||||||
|  | tracks/0/loop_wrap = true | ||||||
|  | tracks/0/keys = { | ||||||
|  | "handle_modes": PackedInt32Array(0, 0, 0, 0), | ||||||
|  | "points": PackedFloat32Array(0, -0.25, 0, 0.0947368, 0.323529, 0.5, -0.366629, 0.00130719, 0.25, 0, 0.5, -0.25, 0, 0.25, 0, 1, -0.105263, -0.344444, 0.25, 0), | ||||||
|  | "times": PackedFloat32Array(0.5, 1, 2, 2.5) | ||||||
|  | } | ||||||
|  | tracks/1/type = "value" | ||||||
|  | tracks/1/imported = false | ||||||
|  | tracks/1/enabled = true | ||||||
|  | tracks/1/path = NodePath("Black:color") | ||||||
|  | tracks/1/interp = 1 | ||||||
|  | tracks/1/loop_wrap = true | ||||||
|  | tracks/1/keys = { | ||||||
|  | "times": PackedFloat32Array(0, 0.5, 2.5, 3), | ||||||
|  | "transitions": PackedFloat32Array(1, 1, 1, 1), | ||||||
|  | "update": 0, | ||||||
|  | "values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 1)] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [sub_resource type="AnimationLibrary" id="AnimationLibrary_sansa"] | ||||||
|  | _data = { | ||||||
|  | "RESET": SubResource("Animation_sdvqp"), | ||||||
|  | "animation": SubResource("Animation_2v5v3") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [node name="Main" type="CanvasLayer"] | ||||||
|  | follow_viewport_enabled = true | ||||||
|  | script = ExtResource("1_tnoah") | ||||||
|  | res = ExtResource("2_dq85p") | ||||||
|  | metadata/_edit_use_anchors_ = true | ||||||
|  | 
 | ||||||
|  | [node name="in" type="Control" parent="."] | ||||||
|  | layout_mode = 3 | ||||||
|  | anchors_preset = 4 | ||||||
|  | anchor_top = 0.5 | ||||||
|  | anchor_bottom = 0.5 | ||||||
|  | grow_vertical = 2 | ||||||
|  | 
 | ||||||
|  | [node name="out" type="Control" parent="."] | ||||||
|  | layout_mode = 3 | ||||||
|  | anchors_preset = 6 | ||||||
|  | anchor_left = 1.0 | ||||||
|  | anchor_top = 0.5 | ||||||
|  | anchor_right = 1.0 | ||||||
|  | anchor_bottom = 0.5 | ||||||
|  | grow_horizontal = 0 | ||||||
|  | grow_vertical = 2 | ||||||
|  | metadata/_edit_use_anchors_ = true | ||||||
|  | 
 | ||||||
|  | [node name="Logo" type="Control" parent="."] | ||||||
|  | layout_mode = 3 | ||||||
|  | anchors_preset = 0 | ||||||
|  | grow_horizontal = 2 | ||||||
|  | grow_vertical = 2 | ||||||
|  | rotation = -6.28318 | ||||||
|  | script = ExtResource("1_o5ti7") | ||||||
|  | weight = 0.5 | ||||||
|  | 
 | ||||||
|  | [node name="TextureRect" type="TextureRect" parent="Logo"] | ||||||
|  | layout_mode = 0 | ||||||
|  | offset_left = -96.0 | ||||||
|  | offset_top = -96.0 | ||||||
|  | offset_right = 96.0 | ||||||
|  | offset_bottom = 96.0 | ||||||
|  | texture = ExtResource("2_fpfqa") | ||||||
|  | 
 | ||||||
|  | [node name="Black" parent="." instance=ExtResource("4_hn3xu")] | ||||||
|  | script = null | ||||||
|  | 
 | ||||||
|  | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] | ||||||
|  | libraries = { | ||||||
|  | "": SubResource("AnimationLibrary_sansa") | ||||||
|  | } | ||||||
|  | autoplay = "animation" | ||||||
| @ -0,0 +1,81 @@ | |||||||
|  | [gd_scene load_steps=6 format=3 uid="uid://dfqspackuotur"] | ||||||
|  | 
 | ||||||
|  | [ext_resource type="Script" path="res://scripts/tools/fade.gd" id="1_i8eyl"] | ||||||
|  | 
 | ||||||
|  | [sub_resource type="Animation" id="Animation_7acmb"] | ||||||
|  | length = 0.001 | ||||||
|  | tracks/0/type = "value" | ||||||
|  | tracks/0/imported = false | ||||||
|  | tracks/0/enabled = true | ||||||
|  | tracks/0/path = NodePath(".:modulate") | ||||||
|  | tracks/0/interp = 1 | ||||||
|  | tracks/0/loop_wrap = true | ||||||
|  | tracks/0/keys = { | ||||||
|  | "times": PackedFloat32Array(0), | ||||||
|  | "transitions": PackedFloat32Array(1), | ||||||
|  | "update": 0, | ||||||
|  | "values": [Color(1, 1, 1, 1)] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [sub_resource type="Animation" id="Animation_iqj70"] | ||||||
|  | resource_name = "fade_in" | ||||||
|  | tracks/0/type = "value" | ||||||
|  | tracks/0/imported = false | ||||||
|  | tracks/0/enabled = true | ||||||
|  | tracks/0/path = NodePath(".:modulate") | ||||||
|  | tracks/0/interp = 1 | ||||||
|  | tracks/0/loop_wrap = true | ||||||
|  | tracks/0/keys = { | ||||||
|  | "times": PackedFloat32Array(0, 1), | ||||||
|  | "transitions": PackedFloat32Array(1, 1), | ||||||
|  | "update": 0, | ||||||
|  | "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] | ||||||
|  | } | ||||||
|  | tracks/1/type = "method" | ||||||
|  | tracks/1/imported = false | ||||||
|  | tracks/1/enabled = true | ||||||
|  | tracks/1/path = NodePath(".") | ||||||
|  | tracks/1/interp = 1 | ||||||
|  | tracks/1/loop_wrap = true | ||||||
|  | tracks/1/keys = { | ||||||
|  | "times": PackedFloat32Array(), | ||||||
|  | "transitions": PackedFloat32Array(), | ||||||
|  | "values": [] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [sub_resource type="Animation" id="Animation_x5jw3"] | ||||||
|  | resource_name = "fade_out" | ||||||
|  | tracks/0/type = "value" | ||||||
|  | tracks/0/imported = false | ||||||
|  | tracks/0/enabled = true | ||||||
|  | tracks/0/path = NodePath(".:modulate") | ||||||
|  | tracks/0/interp = 1 | ||||||
|  | tracks/0/loop_wrap = true | ||||||
|  | tracks/0/keys = { | ||||||
|  | "times": PackedFloat32Array(0, 1), | ||||||
|  | "transitions": PackedFloat32Array(1, 1), | ||||||
|  | "update": 0, | ||||||
|  | "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [sub_resource type="AnimationLibrary" id="AnimationLibrary_ejj8p"] | ||||||
|  | _data = { | ||||||
|  | "RESET": SubResource("Animation_7acmb"), | ||||||
|  | "fade_in": SubResource("Animation_iqj70"), | ||||||
|  | "fade_out": SubResource("Animation_x5jw3") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | [node name="Black" type="ColorRect"] | ||||||
|  | anchors_preset = 15 | ||||||
|  | anchor_right = 1.0 | ||||||
|  | anchor_bottom = 1.0 | ||||||
|  | grow_horizontal = 2 | ||||||
|  | grow_vertical = 2 | ||||||
|  | mouse_filter = 2 | ||||||
|  | color = Color(0, 0, 0, 1) | ||||||
|  | script = ExtResource("1_i8eyl") | ||||||
|  | 
 | ||||||
|  | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] | ||||||
|  | libraries = { | ||||||
|  | "": SubResource("AnimationLibrary_ejj8p") | ||||||
|  | } | ||||||
| @ -1,19 +0,0 @@ | |||||||
| extends CanvasLayer |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # Called when the node enters the scene tree for the first time. |  | ||||||
| func _ready(): |  | ||||||
| 	pass # Replace with function body. |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. |  | ||||||
| func _process(delta): |  | ||||||
| 	_draw() |  | ||||||
| 	pass |  | ||||||
| 
 |  | ||||||
| func _draw(): |  | ||||||
| 	var width = 5 |  | ||||||
| 	var color = Color(0, 1, 0) |  | ||||||
| 	var start = Vector2(0,0) |  | ||||||
| 	var end = Vector2(100,100) |  | ||||||
| 	$Line2D.draw_line(start, end, color, width) |  | ||||||
| @ -1,31 +0,0 @@ | |||||||
| extends CanvasLayer |  | ||||||
| var mainScene |  | ||||||
| 
 |  | ||||||
| # Called when the node enters the scene tree for the first time. |  | ||||||
| func _ready(): |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) |  | ||||||
| 	pass # Replace with function body. |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. |  | ||||||
| func _process(delta): |  | ||||||
| 	pass |  | ||||||
| 
 |  | ||||||
| func _on_quit(): |  | ||||||
| 	get_tree().quit() |  | ||||||
| 	 |  | ||||||
| func _on_play_lv0(): |  | ||||||
| 	get_tree().change_scene_to_file( "res://scenes/main.tscn" ) |  | ||||||
| func _on_play_lv1(): |  | ||||||
| 	get_tree().change_scene_to_file( "res://scenes/main1.tscn" ) |  | ||||||
| 	#$".".hide() |  | ||||||
| 	#var w = get_node("/root/World"); |  | ||||||
| 	# |  | ||||||
| 	#if !w: |  | ||||||
| 		#get_tree().change_scene_to_file( "res://scenes/main.tscn" ) |  | ||||||
| 	#else: |  | ||||||
| 		#w.load_level() |  | ||||||
| 		#w.player_spawn()   |  | ||||||
| 		#w.show() |  | ||||||
| 
 |  | ||||||
| @ -0,0 +1,57 @@ | |||||||
|  | extends Node2D | ||||||
|  | 
 | ||||||
|  | var G: Node2D | ||||||
|  | var L: Node2D | ||||||
|  | var P: CharacterBody2D | ||||||
|  | 
 | ||||||
|  | var curr_lives: int  = PDash.STARTING_LIVES | ||||||
|  | var curr_lvl: int = 1 | ||||||
|  | 
 | ||||||
|  | func load_lvl( lvl_index: int ): | ||||||
|  | 	var lvl_path = PDash.lvl_paths[ lvl_index-1 ] | ||||||
|  | 	var lvl: Node = load( lvl_path ).instantiate() | ||||||
|  | 	G.add_child( lvl ) | ||||||
|  | 	L = $Game/Level | ||||||
|  | 	init_lvl() | ||||||
|  | 	 | ||||||
|  | func load_plyr(): | ||||||
|  | 	var plyr = load("res://scenes/Player.tscn").instantiate() | ||||||
|  | 	G.add_child( plyr ) | ||||||
|  | 	P = $Game/Player | ||||||
|  | 	init_plyr() | ||||||
|  | 	 | ||||||
|  | func init_lvl(): | ||||||
|  | 	#connect signals | ||||||
|  | 	var switches = $Game/Level/Switches.get_children() | ||||||
|  | 	for s in switches: | ||||||
|  | 		s.body_entered.connect( _on_switch_body_entered.bind(s.type)) | ||||||
|  | #	$player.combat_trigger.connect(start_combat) | ||||||
|  | 	 | ||||||
|  | 	pass | ||||||
|  | 	 | ||||||
|  | func init_plyr(): | ||||||
|  | 	#P.init() | ||||||
|  | 	P.set_direction( L.ini_dir ) | ||||||
|  | 	P.set_gravity_vector( L.ini_grav_vec ) | ||||||
|  | 	P.position = L.get_node("SpawnPoint").position | ||||||
|  | 	 | ||||||
|  | # Called when the node enters the scene tree for the first time. | ||||||
|  | func _ready(): | ||||||
|  | 	G = $Game | ||||||
|  | 	 | ||||||
|  | 	PDash.fade( "in" , 1 ) | ||||||
|  | 	 | ||||||
|  | 	load_lvl(curr_lvl) | ||||||
|  | 	load_plyr() | ||||||
|  | 	 | ||||||
|  | func _on_switch_body_entered(body,type): | ||||||
|  | 	if type == 0: #end switch | ||||||
|  | 		pass | ||||||
|  | 	elif type == 1: #abyss switch | ||||||
|  | 		P.fall() | ||||||
|  | 	elif type == 2: #gravity switch | ||||||
|  | 		pass | ||||||
|  | 
 | ||||||
|  | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
|  | func _process(delta): | ||||||
|  | 	pass | ||||||
| @ -1,31 +0,0 @@ | |||||||
| extends CanvasLayer |  | ||||||
| var mainScene |  | ||||||
| 
 |  | ||||||
| # Called when the node enters the scene tree for the first time. |  | ||||||
| func _ready(): |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) |  | ||||||
| 	pass # Replace with function body. |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. |  | ||||||
| func _process(delta): |  | ||||||
| 	pass |  | ||||||
| 
 |  | ||||||
| func _on_quit(): |  | ||||||
| 	get_tree().quit() |  | ||||||
| 	 |  | ||||||
| func _on_play_lv0(): |  | ||||||
| 	get_tree().change_scene_to_file( "res://scenes/main.tscn" ) |  | ||||||
| func _on_play_lv1(): |  | ||||||
| 	get_tree().change_scene_to_file( "res://scenes/main1.tscn" ) |  | ||||||
| 	#$".".hide() |  | ||||||
| 	#var w = get_node("/root/World"); |  | ||||||
| 	# |  | ||||||
| 	#if !w: |  | ||||||
| 		#get_tree().change_scene_to_file( "res://scenes/main.tscn" ) |  | ||||||
| 	#else: |  | ||||||
| 		#w.load_level() |  | ||||||
| 		#w.player_spawn()   |  | ||||||
| 		#w.show() |  | ||||||
| 
 |  | ||||||
| @ -0,0 +1,30 @@ | |||||||
|  | extends Node | ||||||
|  | 
 | ||||||
|  | var game_name: String = "pDash" | ||||||
|  | var game_version: float = 0.1 | ||||||
|  | 
 | ||||||
|  | ## Resources | ||||||
|  | var lvl_paths: Array[String] = [ | ||||||
|  | 	"res://scenes/levels/level_0.tscn", | ||||||
|  | 	"res://scenes/levels/level_1.tscn" | ||||||
|  | ] | ||||||
|  | 
 | ||||||
|  | ## Variables | ||||||
|  | const STARTING_LIVES: int = 3 | ||||||
|  | 
 | ||||||
|  | ## Preferences | ||||||
|  | var show_splash: bool = false | ||||||
|  | 
 | ||||||
|  | func fade( type: String , t: float ): | ||||||
|  | 	var fade = load("res://scenes/ui/fade.tscn").instantiate(); | ||||||
|  | 	if type == "in": | ||||||
|  | 		fade.type = 0 | ||||||
|  | 	elif type == "out": | ||||||
|  | 		fade.type = 1 | ||||||
|  | 	fade.speed = 1/t | ||||||
|  | 	get_node("/root/Main/Curtains").add_child( fade ) | ||||||
|  | 
 | ||||||
|  | func splash(): | ||||||
|  | 	var splash = load("res://scenes/ui/Splash.tscn").instantiate(); | ||||||
|  | 	get_node("/root/Main/Splash").add_child( splash ) | ||||||
|  | 	await  splash.get_node("AnimationPlayer").animation_finished | ||||||
| @ -1,31 +0,0 @@ | |||||||
| extends CanvasLayer |  | ||||||
| var mainScene |  | ||||||
| 
 |  | ||||||
| # Called when the node enters the scene tree for the first time. |  | ||||||
| func _ready(): |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) |  | ||||||
| 	#$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) |  | ||||||
| 	pass # Replace with function body. |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. |  | ||||||
| func _process(delta): |  | ||||||
| 	pass |  | ||||||
| 
 |  | ||||||
| func _on_quit(): |  | ||||||
| 	get_tree().quit() |  | ||||||
| 	 |  | ||||||
| func _on_play(): |  | ||||||
| 	#$".".hide() |  | ||||||
| 	#var w = get_node("/root/World"); |  | ||||||
| 	# |  | ||||||
| 	#if !w: |  | ||||||
| 	get_tree().change_scene_to_file( "res://scenes/Start.tscn" ) |  | ||||||
| 	#else: |  | ||||||
| 		#w.player_spawn()   |  | ||||||
| 		#w.show() |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _on_label_2_button_up(): |  | ||||||
| 	get_tree().change_scene_to_file("res://scenes/UI/Start.tscn") |  | ||||||
| @ -1,103 +0,0 @@ | |||||||
| extends Node2D |  | ||||||
| 
 |  | ||||||
| var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") |  | ||||||
| var gravity_vector = ProjectSettings.get_setting("physics/2d/default_gravity_vector") |  | ||||||
| var player = load("res://scenes/pDasher.tscn") |  | ||||||
| #var level |  | ||||||
| var direction: int = 1 |  | ||||||
| var paused: bool = false |  | ||||||
| var asp: AudioStreamPlayer |  | ||||||
| var switch_gravity_sound = preload("res://audio/switch_gravity.wav") |  | ||||||
| var win = preload("res://scenes/UI/Win.tscn").instantiate() |  | ||||||
| var end = preload("res://scenes/UI/End.tscn").instantiate() |  | ||||||
| #var level_n: int = 1 |  | ||||||
| var pDasher |  | ||||||
|   |  | ||||||
| 
 |  | ||||||
| ## WORLD METHODS |  | ||||||
| func switch_gravity(): |  | ||||||
| 	gravity_vector =  gravity_vector.rotated(deg_to_rad(180)) |  | ||||||
| 	 |  | ||||||
| func switch_direction(): |  | ||||||
| 	print("changing") |  | ||||||
| 	direction *= -1 |  | ||||||
| 
 |  | ||||||
| ## NAVIGATION |  | ||||||
| func player_fail(): |  | ||||||
| 	get_tree().change_scene_to_file("res://scenes/UI/Start.tscn") |  | ||||||
| 	 |  | ||||||
| func player_win(): |  | ||||||
| 	#level_n += 1 |  | ||||||
| 	#load_level() |  | ||||||
| 	#$"." .hide() |  | ||||||
| 	#get_tree().get_root().add_child( win ) |  | ||||||
| 	get_tree().change_scene_to_file("res://scenes/UI/Win.tscn") |  | ||||||
| 
 |  | ||||||
| func player_spawn(): |  | ||||||
| 	pDasher.position = Vector2(0,0  ) |  | ||||||
| 
 |  | ||||||
| #func load_level(): |  | ||||||
| 	##if level_n == null: |  | ||||||
| 		##level_n = 0 |  | ||||||
| 	#level = Levels[level_n] |  | ||||||
| 	 |  | ||||||
| func _ready(): |  | ||||||
| 	 |  | ||||||
| 	#load_level() |  | ||||||
| 		 |  | ||||||
| 	asp = $AudioStreamPlayer |  | ||||||
| 	 |  | ||||||
| 	#load player and level |  | ||||||
| 	get_node("/root/World").add_child( player.instantiate() ) |  | ||||||
| 	#get_node("/root/World").add_child( level.instantiate() ) #relative way meaning <ME> or whatever node this script is attached to. |  | ||||||
| 	 |  | ||||||
| 	# manage signals connections |  | ||||||
| 	var abysses = $Level/Abysses.get_children() |  | ||||||
| 	for abyss in abysses: |  | ||||||
| 		abyss.body_entered.connect( _on_abyss_body_entered ) |  | ||||||
| 		 |  | ||||||
| 	var gravity_switches = $Level/Switches/Gravity.get_children() |  | ||||||
| 	for gswitch in gravity_switches: |  | ||||||
| 		gswitch.body_entered.connect( _on_gswitch_body_entered ) |  | ||||||
| 	 |  | ||||||
| 	var direction_switches = $Level/Switches/Direction.get_children() |  | ||||||
| 	for dswitch in direction_switches: |  | ||||||
| 		dswitch.body_entered.connect( _on_dswitch_body_entered ) |  | ||||||
| 		 |  | ||||||
| 		 |  | ||||||
| 	var checkpoints = $Level/Checkpoints.get_children() |  | ||||||
| 	for checkpoint in checkpoints: |  | ||||||
| 		#print( checkpoint ) |  | ||||||
| 		checkpoint.body_entered.connect( _on_checkpoint_body_entered ) |  | ||||||
| 		 |  | ||||||
| 	pDasher = get_node("/root/World/pDasher") |  | ||||||
| 	player_spawn() |  | ||||||
| ## MAIN |  | ||||||
| #func _process(delta): |  | ||||||
| 	#pass |  | ||||||
| 
 |  | ||||||
| ##SIGNAL HANDLING |  | ||||||
| func _on_abyss_body_entered(body): |  | ||||||
| 	#check that body is player |  | ||||||
| 	player_fail() |  | ||||||
| 	#print( str(body) + " se fue pal hoyo" ) |  | ||||||
| 
 |  | ||||||
| func _on_gswitch_body_entered(body): |  | ||||||
| 	#check type of switch |  | ||||||
| 	#body.get_node("AnimationPlayer").spin() |  | ||||||
| 	asp.stream = switch_gravity_sound |  | ||||||
| 	asp.play() |  | ||||||
| 	switch_gravity() |  | ||||||
| 
 |  | ||||||
| func _on_dswitch_body_entered(body):	 |  | ||||||
| 	pDasher |  | ||||||
| 	pDasher.switch_direction() |  | ||||||
| 	 |  | ||||||
| 	 |  | ||||||
| 
 |  | ||||||
| func _on_checkpoint_body_entered(body): |  | ||||||
| 	body.direction = 0; |  | ||||||
| 	$Timer.start() |  | ||||||
| 
 |  | ||||||
| func _on_timeout():	 |  | ||||||
| 	player_win() |  | ||||||
| @ -1,9 +1,8 @@ | |||||||
| extends Area2D | extends Node | ||||||
| @export var type: String |  | ||||||
| 
 | 
 | ||||||
| # 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(): | ||||||
| 	pass | 	pass # Replace with function body. | ||||||
| 
 | 
 | ||||||
| # Called every frame. 'delta' is the elapsed time since the previous frame. | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
| func _process(delta): | func _process(delta): | ||||||
| @ -0,0 +1,17 @@ | |||||||
|  | extends Control | ||||||
|  | var in_p : Vector2 | ||||||
|  | var out_p : Vector2 | ||||||
|  | var width : float | ||||||
|  | @export var weight : float | ||||||
|  | 
 | ||||||
|  | # Called when the node enters the scene tree for the first time. | ||||||
|  | func _ready(): | ||||||
|  | 	in_p = $"../in".position | ||||||
|  | 	out_p = $"../out".position | ||||||
|  | 	width = $TextureRect.texture.get_size().x | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
|  | func _process(delta): | ||||||
|  | 	position = lerp(in_p -Vector2( width ,0 ), out_p +Vector2( width ,0 ),weight) | ||||||
|  | 	pass | ||||||
| @ -0,0 +1,19 @@ | |||||||
|  | extends ColorRect | ||||||
|  | @export var type: int = 0 | ||||||
|  | @export var speed: float = 1 | ||||||
|  | 
 | ||||||
|  | # Called when the node enters the scene tree for the first time. | ||||||
|  | 	 | ||||||
|  | func _ready(): | ||||||
|  | 	if type == 0: | ||||||
|  | 		$AnimationPlayer.play("fade_in") | ||||||
|  | 	elif type == 1: | ||||||
|  | 		$AnimationPlayer.play("fade_out") | ||||||
|  | 	 | ||||||
|  | 	$AnimationPlayer.speed_scale = speed | ||||||
|  | 	await $AnimationPlayer.animation_finished | ||||||
|  | 	queue_free() | ||||||
|  | 	 | ||||||
|  | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
|  | func _process(delta): | ||||||
|  | 	pass | ||||||
| @ -1,9 +0,0 @@ | |||||||
| shader_type canvas_item; |  | ||||||
| uniform float flap_speed = 4.0; |  | ||||||
| uniform float scale = 4; |  | ||||||
| 
 |  | ||||||
| void vertex() { |  | ||||||
|     VERTEX.y = VERTEX.y * scale - (64.0*scale/2.0); |  | ||||||
| 	VERTEX.x = VERTEX.x * scale - (64.0*scale/2.0); |  | ||||||
| 	 |  | ||||||
| } |  | ||||||
| @ -1,231 +0,0 @@ | |||||||
| /* |  | ||||||
| Shader from Godot Shaders - the free shader library. |  | ||||||
| godotshaders.com/shader/VHS-and-CRT-monitor-effect |  | ||||||
| 
 |  | ||||||
| This shader is under CC0 license. Feel free to use, improve and  |  | ||||||
| change this shader according to your needs and consider sharing  |  | ||||||
| the modified result to godotshaders.com. |  | ||||||
| */ |  | ||||||
| 
 |  | ||||||
| shader_type canvas_item; |  | ||||||
| uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; |  | ||||||
| 
 |  | ||||||
| //*** IMPORTANT! ***/  |  | ||||||
| // - If you are using this shader to affect the node it is applied to set 'overlay' to false (unchecked in the instepctor). |  | ||||||
| // - If you are using this shader as an overlay, and want the shader to affect the nodes below in the Scene hierarchy, |  | ||||||
| //   set 'overlay' to true (checked in the inspector). |  | ||||||
| // On Mac there is potentially a bug causing this to not work properly. If that is the case and you want to use the shader as an overlay |  | ||||||
| // change all "overlay ? SCREEN_TEXTURE : TEXTURE" to only "SCREEN_TEXTURE" on lines 129-140, and "vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV);" |  | ||||||
| // to "vec2 uv = warp(SCREEN_UV);" on line 98. |  | ||||||
| uniform bool overlay = false; |  | ||||||
| 
 |  | ||||||
| uniform float scanlines_opacity : hint_range(0.0, 1.0) = 0.4; |  | ||||||
| uniform float scanlines_width : hint_range(0.0, 0.5) = 0.25; |  | ||||||
| uniform float grille_opacity : hint_range(0.0, 1.0) = 0.3; |  | ||||||
| uniform vec2 resolution = vec2(640.0, 480.0); // Set the number of rows and columns the texture will be divided in. Scanlines and grille will make a square based on these values |  | ||||||
| 
 |  | ||||||
| uniform bool pixelate = true; // Fill each square ("pixel") with a sampled color, creating a pixel look and a more accurate representation of how a CRT monitor would work. |  | ||||||
| 
 |  | ||||||
| uniform bool roll = true; |  | ||||||
| uniform float roll_speed = 8.0; // Positive values are down, negative are up |  | ||||||
| uniform float roll_size : hint_range(0.0, 100.0) = 15.0; |  | ||||||
| uniform float roll_variation : hint_range(0.1, 5.0) = 1.8; // This valie is not an exact science. You have to play around with the value to find a look you like. How this works is explained in the code below. |  | ||||||
| uniform float distort_intensity : hint_range(0.0, 0.2) = 0.05; // The distortion created by the rolling effect. |  | ||||||
| 
 |  | ||||||
| uniform float noise_opacity : hint_range(0.0, 1.0) = 0.4; |  | ||||||
| uniform float noise_speed = 5.0; // There is a movement in the noise pattern that can be hard to see first. This sets the speed of that movement. |  | ||||||
| 
 |  | ||||||
| uniform float static_noise_intensity : hint_range(0.0, 1.0) = 0.06; |  | ||||||
| 
 |  | ||||||
| uniform float aberration : hint_range(-1.0, 1.0) = 0.03; // Chromatic aberration, a distortion on each color channel. |  | ||||||
| uniform float brightness = 1.4; // When adding scanline gaps and grille the image can get very dark. Brightness tries to compensate for that. |  | ||||||
| uniform bool discolor = true; // Add a discolor effect simulating a VHS |  | ||||||
| 
 |  | ||||||
| uniform float warp_amount :hint_range(0.0, 5.0) = 1.0; // Warp the texture edges simulating the curved glass of a CRT monitor or old TV. |  | ||||||
| uniform bool clip_warp = false; |  | ||||||
| 
 |  | ||||||
| uniform float vignette_intensity = 0.4; // Size of the vignette, how far towards the middle it should go. |  | ||||||
| uniform float vignette_opacity : hint_range(0.0, 1.0) = 0.5; |  | ||||||
| 
 |  | ||||||
| // Used by the noise functin to generate a pseudo random value between 0.0 and 1.0 |  | ||||||
| vec2 random(vec2 uv){ |  | ||||||
|     uv = vec2( dot(uv, vec2(127.1,311.7) ), |  | ||||||
|                dot(uv, vec2(269.5,183.3) ) ); |  | ||||||
|     return -1.0 + 2.0 * fract(sin(uv) * 43758.5453123); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Generate a Perlin noise used by the distortion effects |  | ||||||
| float noise(vec2 uv) { |  | ||||||
|     vec2 uv_index = floor(uv); |  | ||||||
|     vec2 uv_fract = fract(uv); |  | ||||||
| 
 |  | ||||||
|     vec2 blur = smoothstep(0.0, 1.0, uv_fract); |  | ||||||
| 
 |  | ||||||
|     return mix( mix( dot( random(uv_index + vec2(0.0,0.0) ), uv_fract - vec2(0.0,0.0) ), |  | ||||||
|                      dot( random(uv_index + vec2(1.0,0.0) ), uv_fract - vec2(1.0,0.0) ), blur.x), |  | ||||||
|                 mix( dot( random(uv_index + vec2(0.0,1.0) ), uv_fract - vec2(0.0,1.0) ), |  | ||||||
|                      dot( random(uv_index + vec2(1.0,1.0) ), uv_fract - vec2(1.0,1.0) ), blur.x), blur.y) * 0.5 + 0.5; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Takes in the UV and warps the edges, creating the spherized effect |  | ||||||
| vec2 warp(vec2 uv){ |  | ||||||
| 	vec2 delta = uv - 0.5; |  | ||||||
| 	float delta2 = dot(delta.xy, delta.xy); |  | ||||||
| 	float delta4 = delta2 * delta2; |  | ||||||
| 	float delta_offset = delta4 * warp_amount; |  | ||||||
| 	 |  | ||||||
| 	return uv + delta * delta_offset; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Adds a black border to hide stretched pixel created by the warp effect |  | ||||||
| float border (vec2 uv){ |  | ||||||
| 	float radius = min(warp_amount, 0.08); |  | ||||||
| 	radius = max(min(min(abs(radius * 2.0), abs(1.0)), abs(1.0)), 1e-5); |  | ||||||
| 	vec2 abs_uv = abs(uv * 2.0 - 1.0) - vec2(1.0, 1.0) + radius; |  | ||||||
| 	float dist = length(max(vec2(0.0), abs_uv)) / radius; |  | ||||||
| 	float square = smoothstep(0.96, 1.0, dist); |  | ||||||
| 	return clamp(1.0 - square, 0.0, 1.0); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // Adds a vignette shadow to the edges of the image |  | ||||||
| float vignette(vec2 uv){ |  | ||||||
| 	uv *= 1.0 - uv.xy; |  | ||||||
| 	float vignette = uv.x * uv.y * 15.0; |  | ||||||
| 	return pow(vignette, vignette_intensity * vignette_opacity); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void fragment() |  | ||||||
| { |  | ||||||
| 	vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV); // Warp the uv. uv will be used in most cases instead of UV to keep the warping |  | ||||||
| 	vec2 text_uv = uv; |  | ||||||
| 	vec2 roll_uv = vec2(0.0); |  | ||||||
| 	float time = roll ? TIME : 0.0; |  | ||||||
| 	 |  | ||||||
| 
 |  | ||||||
| 	// Pixelate the texture based on the given resolution. |  | ||||||
| 	if (pixelate) |  | ||||||
| 	{ |  | ||||||
| 		text_uv = ceil(uv * resolution) / resolution; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Create the rolling effect. We need roll_line a bit later to make the noise effect. |  | ||||||
| 	// That is why this runs if roll is true OR noise_opacity is over 0. |  | ||||||
| 	float roll_line = 0.0; |  | ||||||
| 	if (roll || noise_opacity > 0.0) |  | ||||||
| 	{ |  | ||||||
| 		// Create the areas/lines where the texture will be distorted. |  | ||||||
| 		roll_line = smoothstep(0.3, 0.9, sin(uv.y * roll_size - (time * roll_speed) ) ); |  | ||||||
| 		// Create more lines of a different size and apply to the first set of lines. This creates a bit of variation. |  | ||||||
| 		roll_line *= roll_line * smoothstep(0.3, 0.9, sin(uv.y * roll_size * roll_variation - (time * roll_speed * roll_variation) ) ); |  | ||||||
| 		// Distort the UV where where the lines are |  | ||||||
| 		roll_uv = vec2(( roll_line * distort_intensity * (1.-UV.x)), 0.0); |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	vec4 text; |  | ||||||
| 	if (roll) |  | ||||||
| 	{ |  | ||||||
| 		// If roll is true distort the texture with roll_uv. The texture is split up into RGB to  |  | ||||||
| 		// make some chromatic aberration. We apply the aberration to the red and green channels accorging to the aberration parameter |  | ||||||
| 		// and intensify it a bit in the roll distortion. |  | ||||||
| 		text.r = texture(SCREEN_TEXTURE, text_uv + roll_uv * 0.8 + vec2(aberration, 0.0) * .1).r; |  | ||||||
| 		text.g = texture(SCREEN_TEXTURE, text_uv + roll_uv * 1.2 - vec2(aberration, 0.0) * .1 ).g; |  | ||||||
| 		text.b = texture(SCREEN_TEXTURE, text_uv + roll_uv).b; |  | ||||||
| 		text.a = 1.0; |  | ||||||
| 	} |  | ||||||
| 	else |  | ||||||
| 	{ |  | ||||||
| 		// If roll is false only apply the aberration without any distorion. The aberration values are very small so the .1 is only  |  | ||||||
| 		// to make the slider in the Inspector less sensitive. |  | ||||||
| 		text.r = texture(SCREEN_TEXTURE, text_uv + vec2(aberration, 0.0) * .1).r; |  | ||||||
| 		text.g = texture(SCREEN_TEXTURE, text_uv - vec2(aberration, 0.0) * .1).g; |  | ||||||
| 		text.b = texture(SCREEN_TEXTURE, text_uv).b; |  | ||||||
| 		text.a = 1.0; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	float r = text.r; |  | ||||||
| 	float g = text.g; |  | ||||||
| 	float b = text.b; |  | ||||||
| 	 |  | ||||||
| 	uv = warp(UV); |  | ||||||
| 	 |  | ||||||
| 	// CRT monitors don't have pixels but groups of red, green and blue dots or lines, called grille. We isolate the texture's color channels  |  | ||||||
| 	// and divide it up in 3 offsetted lines to show the red, green and blue colors next to each other, with a small black gap between. |  | ||||||
| 	if (grille_opacity > 0.0){ |  | ||||||
| 		 |  | ||||||
| 		float g_r = smoothstep(0.85, 0.95, abs(sin(uv.x * (resolution.x * 3.14159265)))); |  | ||||||
| 		r = mix(r, r * g_r, grille_opacity); |  | ||||||
| 		 |  | ||||||
| 		float g_g = smoothstep(0.85, 0.95, abs(sin(1.05 + uv.x * (resolution.x * 3.14159265)))); |  | ||||||
| 		g = mix(g, g * g_g, grille_opacity); |  | ||||||
| 		 |  | ||||||
| 		float b_b = smoothstep(0.85, 0.95, abs(sin(2.1 + uv.x * (resolution.x * 3.14159265)))); |  | ||||||
| 		b = mix(b, b * b_b, grille_opacity); |  | ||||||
| 		 |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Apply the grille to the texture's color channels and apply Brightness. Since the grille and the scanlines (below) make the image very dark you |  | ||||||
| 	// can compensate by increasing the brightness. |  | ||||||
| 	text.r = clamp(r * brightness, 0.0, 1.0); |  | ||||||
| 	text.g = clamp(g * brightness, 0.0, 1.0); |  | ||||||
| 	text.b = clamp(b * brightness, 0.0, 1.0); |  | ||||||
| 	 |  | ||||||
| 	// Scanlines are the horizontal lines that make up the image on a CRT monitor.  |  | ||||||
| 	// Here we are actual setting the black gap between each line, which I guess is not the right definition of the word, but you get the idea   |  | ||||||
| 	float scanlines = 0.5; |  | ||||||
| 	if (scanlines_opacity > 0.0) |  | ||||||
| 	{ |  | ||||||
| 		// Same technique as above, create lines with sine and applying it to the texture. Smoothstep to allow setting the line size. |  | ||||||
| 		scanlines = smoothstep(scanlines_width, scanlines_width + 0.5, abs(sin(uv.y * (resolution.y * 3.14159265)))); |  | ||||||
| 		text.rgb = mix(text.rgb, text.rgb * vec3(scanlines), scanlines_opacity); |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Apply the banded noise. |  | ||||||
| 	if (noise_opacity > 0.0) |  | ||||||
| 	{ |  | ||||||
| 		// Generate a noise pattern that is very stretched horizontally, and animate it with noise_speed |  | ||||||
| 		float noise = smoothstep(0.4, 0.5, noise(uv * vec2(2.0, 200.0) + vec2(10.0, (TIME * (noise_speed))) ) ); |  | ||||||
| 		 |  | ||||||
| 		// We use roll_line (set above) to define how big the noise should be vertically (multiplying cuts off all black parts). |  | ||||||
| 		// We also add in some basic noise with random() to break up the noise pattern above. The noise is sized according to  |  | ||||||
| 		// the resolution value set in the inspector. If you don't like this look you can  |  | ||||||
| 		// change "ceil(uv * resolution) / resolution" to only "uv" to make it less pixelated. Or multiply resolution with som value |  | ||||||
| 		// greater than 1.0 to make them smaller. |  | ||||||
| 		roll_line *= noise * scanlines * clamp(random((ceil(uv * resolution) / resolution) + vec2(TIME * 0.8, 0.0)).x + 0.8, 0.0, 1.0); |  | ||||||
| 		// Add it to the texture based on noise_opacity |  | ||||||
| 		text.rgb = clamp(mix(text.rgb, text.rgb + roll_line, noise_opacity), vec3(0.0), vec3(1.0)); |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Apply static noise by generating it over the whole screen in the same way as above |  | ||||||
| 	if (static_noise_intensity > 0.0) |  | ||||||
| 	{ |  | ||||||
| 		text.rgb += clamp(random((ceil(uv * resolution) / resolution) + fract(TIME)).x, 0.0, 1.0) * static_noise_intensity; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Apply a black border to hide imperfections caused by the warping. |  | ||||||
| 	// Also apply the vignette |  | ||||||
| 	text.rgb *= border(uv); |  | ||||||
| 	text.rgb *= vignette(uv); |  | ||||||
| 	// Hides the black border and make that area transparent. Good if you want to add the the texture on top an image of a TV or monitor. |  | ||||||
| 	if (clip_warp) |  | ||||||
| 	{ |  | ||||||
| 		text.a = border(uv); |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	// Apply discoloration to get a VHS look (lower saturation and higher contrast) |  | ||||||
| 	// You can play with the values below or expose them in the Inspector. |  | ||||||
| 	float saturation = 0.5; |  | ||||||
| 	float contrast = 1.2; |  | ||||||
| 	if (discolor) |  | ||||||
| 	{ |  | ||||||
| 		// Saturation |  | ||||||
| 		vec3 greyscale = vec3(text.r + text.g + text.b) / 3.; |  | ||||||
| 		text.rgb = mix(text.rgb, greyscale, saturation); |  | ||||||
| 		 |  | ||||||
| 		// Contrast |  | ||||||
| 		float midpoint = pow(0.5, 2.2); |  | ||||||
| 		text.rgb = (text.rgb - vec3(midpoint)) * contrast + midpoint; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	COLOR = text; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
					Loading…
					
					
				
		Reference in new issue