diff --git a/GameManager.gd b/GameManager.gd index 09e02b6..e86d889 100644 --- a/GameManager.gd +++ b/GameManager.gd @@ -5,9 +5,9 @@ func _ready(): process_mode = Node.PROCESS_MODE_ALWAYS func _input(event): - if event.is_action_pressed("restart") and $Clock/Label/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED: + if event.is_action_pressed("restart") and $GameOver/Leaderboard/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED: get_tree().paused = false get_tree().reload_current_scene() - if event.is_action_pressed("quit") and $Clock/Label/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED: + if event.is_action_pressed("quit") and $GameOver/Leaderboard/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED: get_tree().paused = false get_tree().change_scene_to_file("res://main_menu.tscn") diff --git a/Player.gd b/Player.gd index d2163e4..60161da 100644 --- a/Player.gd +++ b/Player.gd @@ -11,15 +11,35 @@ var exagons = 1 var absolute_movement = false var config = ConfigFile.new() +const idle_anim = preload("res://player_idle.gif") +const moving_anim = preload("res://player_moving.gif") +var moving = false + func _ready(): update_display() + update_animation() if config.load("user://settings.cfg") == OK: absolute_movement = not config.get_value("config", "relative_controls") +func update_animation(): + if moving: + $AnimatedSprite2D.sprite_frames = moving_anim + else: + $AnimatedSprite2D.sprite_frames = idle_anim + + $AnimatedSprite2D.play("gif") + func _physics_process(delta): look_at(get_global_mouse_position()) var move_input = Input.get_axis("down", "up") var side_input = Input.get_axis("right", "left") + if move_input > 0 and not moving: + moving = true + update_animation() + elif move_input <= 0 and moving: + moving = false + update_animation() + if absolute_movement: apply_central_force(Vector2(side_input * speed, move_input * speed) * -1) else: @@ -44,6 +64,8 @@ func _input(event): new_quare.name = "Quare" update_display() if event.is_action_pressed("exagon"): + if exagons > 1: + exagons = 1 if exagons <= 0: notifier.notify("No Exagons!") return diff --git a/black.png b/black.png new file mode 100644 index 0000000..82ddab9 Binary files /dev/null and b/black.png differ diff --git a/black.png.import b/black.png.import new file mode 100644 index 0000000..36e526c --- /dev/null +++ b/black.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cx7ded6cxsxfr" +path="res://.godot/imported/black.png-19a8df0b1a4edb74ea2eecb66d46d03d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://black.png" +dest_files=["res://.godot/imported/black.png-19a8df0b1a4edb74ea2eecb66d46d03d.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 diff --git a/bullet.gd b/bullet.gd index 7f6a6ff..e8c900d 100644 --- a/bullet.gd +++ b/bullet.gd @@ -2,6 +2,9 @@ extends RigidBody2D var bounces = 0 +func _process(delta): + $Sprite2D.global_rotation = linear_velocity.angle() + deg_to_rad(90) + func hit(body): if body.is_in_group("destructible"): if body.has_method("destroy"): diff --git a/bullet.tscn b/bullet.tscn index 9cb58d2..5f6eade 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=9 format=3 uid="uid://c6ybtahxwpukd"] +[gd_scene load_steps=7 format=3 uid="uid://c6ybtahxwpukd"] [ext_resource type="Script" path="res://bullet.gd" id="1_3q13i"] -[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="1_if042"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="2_cbxu4"] +[ext_resource type="SpriteFrames" uid="uid://ixubgtxowne7" path="res://bullets.gif" id="2_iifjj"] [ext_resource type="Texture2D" uid="uid://djfjdlri5xdkn" path="res://dotted line.png" id="4_h1jno"] [ext_resource type="Script" path="res://TrajectoryDisplay.gd" id="5_0jcwc"] @@ -13,10 +12,6 @@ bounce = 1.0 [sub_resource type="CircleShape2D" id="CircleShape2D_b5cca"] radius = 13.0 -[sub_resource type="GradientTexture1D" id="GradientTexture1D_tltp1"] -gradient = ExtResource("2_cbxu4") -width = 1024 - [node name="Bullet" type="RigidBody2D"] collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") @@ -30,18 +25,15 @@ script = ExtResource("1_3q13i") rotation = -1.5708 shape = SubResource("CircleShape2D_b5cca") -[node name="Sprite2D" type="Sprite2D" parent="."] -clip_children = 1 -scale = Vector2(0.05, 0.05) -texture = ExtResource("1_if042") - -[node name="TextureRect" type="TextureRect" parent="Sprite2D"] -offset_left = -280.0 -offset_top = -280.0 -offset_right = 744.0 -offset_bottom = -240.0 -scale = Vector2(1, 13.8) -texture = SubResource("GradientTexture1D_tltp1") +[node name="Sprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-0.0234375, -0.00781251) +rotation = 1.5708 +scale = Vector2(4, 4) +sprite_frames = ExtResource("2_iifjj") +animation = &"gif" +autoplay = "gif" +offset = Vector2(7.05637, 10.7826) [node name="TrajectoryDisplay" type="Line2D" parent="."] z_index = -1 diff --git a/bullets.gif b/bullets.gif new file mode 100644 index 0000000..51e196f Binary files /dev/null and b/bullets.gif differ diff --git a/bullets.gif.import b/bullets.gif.import new file mode 100644 index 0000000..1412fdf --- /dev/null +++ b/bullets.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://ixubgtxowne7" +path="res://.godot/imported/bullets.gif-cf28b24fb52f27f7a7bcad8d703a68d8.tres" + +[deps] + +source_file="res://bullets.gif" +dest_files=["res://.godot/imported/bullets.gif-cf28b24fb52f27f7a7bcad8d703a68d8.tres"] + +[params] + +frames_per_second=30 diff --git a/countdown.gif b/countdown.gif new file mode 100644 index 0000000..8605b95 Binary files /dev/null and b/countdown.gif differ diff --git a/countdown.gif.import b/countdown.gif.import new file mode 100644 index 0000000..25e86a4 --- /dev/null +++ b/countdown.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://8b07jl81sgcb" +path="res://.godot/imported/countdown.gif-98c459a3bd57109c3a7a1994512b90f9.tres" + +[deps] + +source_file="res://countdown.gif" +dest_files=["res://.godot/imported/countdown.gif-98c459a3bd57109c3a7a1994512b90f9.tres"] + +[params] + +frames_per_second=30 diff --git a/entagon.gif b/entagon.gif new file mode 100644 index 0000000..4eed684 Binary files /dev/null and b/entagon.gif differ diff --git a/entagon.gif.import b/entagon.gif.import new file mode 100644 index 0000000..be61aaf --- /dev/null +++ b/entagon.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://cffqo7q1ofatc" +path="res://.godot/imported/entagon.gif-4b3662f98a98e595bbebac7629871e53.tres" + +[deps] + +source_file="res://entagon.gif" +dest_files=["res://.godot/imported/entagon.gif-4b3662f98a98e595bbebac7629871e53.tres"] + +[params] + +frames_per_second=30 diff --git a/entagon.tscn b/entagon.tscn index baaaff1..06d5ccd 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -1,13 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://c54oi61t8bvtu"] +[gd_scene load_steps=4 format=3 uid="uid://c54oi61t8bvtu"] [ext_resource type="Script" path="res://Entagon.gd" id="1_726g8"] [ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="1_pvpk5"] -[ext_resource type="Texture2D" uid="uid://3y48ijiv4vlf" path="res://Pentagon.png" id="2_rhkcn"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="3_13sdt"] - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_ebpuq"] -gradient = ExtResource("3_13sdt") -width = 2048 +[ext_resource type="SpriteFrames" uid="uid://cffqo7q1ofatc" path="res://entagon.gif" id="3_116st"] [node name="Entagon" type="RigidBody2D"] physics_material_override = ExtResource("1_pvpk5") @@ -18,20 +13,16 @@ linear_damp = 0.1 angular_velocity = 0.174533 script = ExtResource("1_726g8") -[node name="Sprite2D" type="Sprite2D" parent="."] -clip_children = 1 -scale = Vector2(0.1, 0.1) -texture = ExtResource("2_rhkcn") - -[node name="TextureRect" type="TextureRect" parent="Sprite2D"] -offset_left = -1324.0 -offset_top = -301.0 -offset_right = 724.0 -offset_bottom = 242.0 -texture = SubResource("GradientTexture1D_ebpuq") +[node name="Sprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-0.999999, 0.999999) +scale = Vector2(0.90625, 0.90625) +sprite_frames = ExtResource("3_116st") +animation = &"gif" +autoplay = "gif" [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] scale = Vector2(0.1, 0.1) -polygon = PackedVector2Array(0, -227, 236, -55, 143, 221, -144, 219, -230, -51) +polygon = PackedVector2Array(-10, -230, 210, -60, 140, 170, -130, 170, -230, -50) [connection signal="body_entered" from="." to="." method="hit"] diff --git a/exagon.gif b/exagon.gif new file mode 100644 index 0000000..712d698 Binary files /dev/null and b/exagon.gif differ diff --git a/exagon.gif.import b/exagon.gif.import new file mode 100644 index 0000000..e1a81ce --- /dev/null +++ b/exagon.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://6oj6l7lnsjhi" +path="res://.godot/imported/exagon.gif-656773424f085c6c02f4df86494098c6.tres" + +[deps] + +source_file="res://exagon.gif" +dest_files=["res://.godot/imported/exagon.gif-656773424f085c6c02f4df86494098c6.tres"] + +[params] + +frames_per_second=30 diff --git a/exagon.tscn b/exagon.tscn index 90cc8b3..4afe674 100644 --- a/exagon.tscn +++ b/exagon.tscn @@ -1,14 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://c87easb8570vd"] +[gd_scene load_steps=6 format=3 uid="uid://c87easb8570vd"] [ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="1_1oplx"] [ext_resource type="Script" path="res://Shield.gd" id="2_q7qjq"] [ext_resource type="Texture2D" uid="uid://xq1dd6w22i6f" path="res://Hexagon outline.png" id="2_x53yb"] -[ext_resource type="Texture2D" uid="uid://baaak3ooc6rvq" path="res://Hexagon.png" id="3_tj1rx"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="4_14wdv"] - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_d2ef1"] -gradient = ExtResource("4_14wdv") -width = 4096 +[ext_resource type="SpriteFrames" uid="uid://6oj6l7lnsjhi" path="res://exagon.gif" id="4_cfpay"] [sub_resource type="CircleShape2D" id="CircleShape2D_evq3y"] radius = 25.0 @@ -31,17 +26,14 @@ polygon = PackedVector2Array(-13, -443, 204, -317, 206, -69, -12, 57, -231, -71, [node name="Generator" type="StaticBody2D" parent="."] -[node name="Sprite" type="Sprite2D" parent="Generator"] -clip_children = 1 -scale = Vector2(0.1, 0.1) -texture = ExtResource("3_tj1rx") - -[node name="TextureRect" type="TextureRect" parent="Generator/Sprite"] -offset_left = -2110.0 -offset_top = -490.0 -offset_right = 1986.0 -offset_bottom = 534.0 -texture = SubResource("GradientTexture1D_d2ef1") +[node name="Sprite" type="AnimatedSprite2D" parent="Generator"] +texture_filter = 1 +position = Vector2(-0.500002, 0.500002) +scale = Vector2(1.59375, 1.59375) +sprite_frames = ExtResource("4_cfpay") +animation = &"gif" +autoplay = "gif" +frame_progress = 0.425841 [node name="CollisionShape2D" type="CollisionShape2D" parent="Generator"] shape = SubResource("CircleShape2D_evq3y") diff --git a/ircle.gif b/ircle.gif new file mode 100644 index 0000000..51fd1a0 Binary files /dev/null and b/ircle.gif differ diff --git a/ircle.gif.import b/ircle.gif.import new file mode 100644 index 0000000..06b750b --- /dev/null +++ b/ircle.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://d320lntdiw2kj" +path="res://.godot/imported/ircle.gif-26b2402ba63dd6acab9d6ebfcba3ae9d.tres" + +[deps] + +source_file="res://ircle.gif" +dest_files=["res://.godot/imported/ircle.gif-26b2402ba63dd6acab9d6ebfcba3ae9d.tres"] + +[params] + +frames_per_second=5 diff --git a/ircle.tscn b/ircle.tscn index cb358d3..9f71214 100644 --- a/ircle.tscn +++ b/ircle.tscn @@ -1,12 +1,9 @@ -[gd_scene load_steps=7 format=3 uid="uid://4lc6bvf7b8a0"] +[gd_scene load_steps=6 format=3 uid="uid://4lc6bvf7b8a0"] +[ext_resource type="Texture2D" uid="uid://djfjdlri5xdkn" path="res://dotted line.png" id="2_3i0n3"] [ext_resource type="Script" path="res://laser_enemy.gd" id="2_lyi2i"] [ext_resource type="Script" path="res://Laser.gd" id="3_hosl5"] -[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="4_kq1iu"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="5_4gq2q"] - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_cis1o"] -gradient = ExtResource("5_4gq2q") +[ext_resource type="SpriteFrames" uid="uid://d320lntdiw2kj" path="res://ircle.gif" id="3_ys12y"] [sub_resource type="CircleShape2D" id="CircleShape2D_yns8h"] radius = 128.0 @@ -17,10 +14,13 @@ script = ExtResource("2_lyi2i") [node name="Line2D" type="Line2D" parent="."] z_index = -2 -points = PackedVector2Array(0, 0, 5000, 2.08165e-12) -width = 100.0 -default_color = Color(0.886275, 0.254902, 0.254902, 1) -end_cap_mode = 2 +texture_filter = 1 +texture_repeat = 2 +position = Vector2(-65, 0) +points = PackedVector2Array(0, 0, 1075, 0) +width = 144.33 +texture = ExtResource("2_3i0n3") +texture_mode = 1 script = ExtResource("3_hosl5") [node name="VisibleTimer" type="Timer" parent="Line2D"] @@ -30,23 +30,15 @@ wait_time = 0.2 target_position = Vector2(50000, 2.08165e-12) collision_mask = 3 -[node name="Sprite2D" type="Sprite2D" parent="."] -clip_children = 1 -scale = Vector2(0.5, 0.5) -texture = ExtResource("4_kq1iu") - -[node name="TextureRect" type="TextureRect" parent="Sprite2D"] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = -1700.0 -offset_top = -370.0 -offset_right = -1700.0 -offset_bottom = -370.0 -grow_horizontal = 2 -grow_vertical = 2 -scale = Vector2(5, 2) -texture = SubResource("GradientTexture1D_cis1o") +[node name="Sprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-7.62939e-06, 7.62939e-06) +scale = Vector2(10.8333, 10.8333) +sprite_frames = ExtResource("3_ys12y") +animation = &"gif" +frame = 1 +frame_progress = 0.670607 +speed_scale = 2.6 [node name="Timer" type="Timer" parent="."] wait_time = 3.0 diff --git a/ircle_laser.gif b/ircle_laser.gif new file mode 100644 index 0000000..846cd78 Binary files /dev/null and b/ircle_laser.gif differ diff --git a/ircle_laser.gif.import b/ircle_laser.gif.import new file mode 100644 index 0000000..f138587 --- /dev/null +++ b/ircle_laser.gif.import @@ -0,0 +1,14 @@ +[remap] + +importer="import_gif_to_animated_texture" +type="AnimatedTexture" +uid="uid://byhtrcl2layo3" +path="res://.godot/imported/ircle_laser.gif-0ef572a7c5fd1d9c8ca3ed9ae2a7f065.tres" + +[deps] + +source_file="res://ircle_laser.gif" +dest_files=["res://.godot/imported/ircle_laser.gif-0ef572a7c5fd1d9c8ca3ed9ae2a7f065.tres"] + +[params] + diff --git a/laser_enemy.gd b/laser_enemy.gd index 0a3f186..f9c21c9 100644 --- a/laser_enemy.gd +++ b/laser_enemy.gd @@ -1,7 +1,11 @@ extends StaticBody2D @onready var player = $"../Player" +var idle_texture = preload("res://dotted line.png") +var aiming_texture = preload("res://laser_idle.png") +var active_texture = preload("res://ircle_laser.gif") var aiming = true +var can_damage = false # Called when the node enters the scene tree for the first time. func _ready(): @@ -12,35 +16,45 @@ func _ready(): func _process(delta): if aiming: look_at(player.global_position) + if can_damage: + var body = $Line2D/RayCast2D.get_collider() + if body != null and body.is_in_group("destructible"): + if body.has_method("destroy"): + body.destroy() + else: + body.queue_free() + can_damage = false func fire_laser(): var tween = get_tree().create_tween() - + $Sprite2D.play("gif") aiming = false tween.set_parallel(true) - tween.tween_property($Sprite2D/TextureRect, "position", Vector2(-2000, -370), 1).set_ease(Tween.EASE_IN_OUT) + tween.tween_callback(set_laser_texture.bind(aiming_texture)) tween.tween_property($Line2D, "modulate", Color.WHITE, 1).set_ease(Tween.EASE_IN) tween.set_parallel(false) + tween.tween_callback(can_shoot.bind(true)) + tween.tween_callback(set_laser_texture.bind(active_texture)) + tween.tween_callback($Sprite2D.pause) tween.tween_callback($Line2D.fire) tween.tween_interval(0.2) - tween.tween_callback(check_player) + tween.tween_callback(can_shoot.bind(false)) + tween.tween_callback(set_laser_texture.bind(aiming_texture)) tween.set_parallel(true) tween.tween_property($Line2D, "modulate", Color(Color.WHITE, 0.2), 0.2).set_ease(Tween.EASE_OUT) - tween.tween_property($Sprite2D/TextureRect, "position", Vector2(-1700, -370), 0.5).set_ease(Tween.EASE_IN_OUT) + tween.tween_callback($Sprite2D.stop) tween.set_parallel(false) tween.tween_callback(start_aim) + tween.tween_callback(set_laser_texture.bind(idle_texture)) +func set_laser_texture(texture): + $Line2D.texture = texture + func start_aim(): aiming = true -func check_player(): - var body = $Line2D/RayCast2D.get_collider() - if body != null and body.is_in_group("destructible"): - if body.has_method("destroy"): - body.destroy() - else: - body.queue_free() - +func can_shoot(yn): + can_damage = yn func hit(body: Node2D): if body.name == "Clock": diff --git a/laser_idle.png b/laser_idle.png new file mode 100644 index 0000000..f4f65f7 Binary files /dev/null and b/laser_idle.png differ diff --git a/laser_idle.png.import b/laser_idle.png.import new file mode 100644 index 0000000..4238a26 --- /dev/null +++ b/laser_idle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://es6rxuv8pp1d" +path="res://.godot/imported/laser_idle.png-c877e043e278d0e41d368ed382b6f441.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://laser_idle.png" +dest_files=["res://.godot/imported/laser_idle.png-c877e043e278d0e41d368ed382b6f441.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 diff --git a/main.tscn b/main.tscn index d2570fe..a4d6c1b 100644 --- a/main.tscn +++ b/main.tscn @@ -1,17 +1,16 @@ -[gd_scene load_steps=31 format=3 uid="uid://bmd4m7lqj4v0x"] +[gd_scene load_steps=27 format=3 uid="uid://bmd4m7lqj4v0x"] -[ext_resource type="Script" path="res://InfiniteGradient.gd" id="1_0hjpt"] -[ext_resource type="Script" path="res://TextCollision.gd" id="1_hy18x"] [ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"] [ext_resource type="Script" path="res://GameManager.gd" id="1_k8sg3"] [ext_resource type="FontFile" uid="uid://ve8css0g3ldb" path="res://Preahvihear/Preahvihear-Regular.ttf" id="2_0a4qt"] -[ext_resource type="Script" path="res://Countdown.gd" id="2_qroir"] [ext_resource type="PackedScene" uid="uid://4lc6bvf7b8a0" path="res://ircle.tscn" id="3_7jxvc"] [ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="4_bx3xr"] [ext_resource type="PackedScene" uid="uid://yu50iyftoyaj" path="res://riangle.tscn" id="4_icpv2"] [ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="4_yk0bb"] [ext_resource type="Script" path="res://Clock.gd" id="5_7po8n"] +[ext_resource type="Texture2D" uid="uid://cx7ded6cxsxfr" path="res://black.png" id="6_sn16e"] [ext_resource type="PackedScene" uid="uid://cgcjicue76wsr" path="res://player.tscn" id="7_ujibo"] +[ext_resource type="SpriteFrames" uid="uid://8b07jl81sgcb" path="res://countdown.gif" id="9_4eosh"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] @@ -19,20 +18,8 @@ [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] [ext_resource type="PackedScene" uid="uid://c54oi61t8bvtu" path="res://entagon.tscn" id="18_jl3xw"] -[sub_resource type="Gradient" id="Gradient_bi1rk"] -interpolation_mode = 1 -offsets = PackedFloat32Array(0) -colors = PackedColorArray(0.0509804, 0.0509804, 0.0509804, 1) - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_f0jwl"] -gradient = SubResource("Gradient_bi1rk") - [sub_resource type="RectangleShape2D" id="RectangleShape2D_7w8g6"] -size = Vector2(638.5, 225.5) - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_vrv6v"] -gradient = ExtResource("4_yk0bb") -width = 4096 +size = Vector2(328, 185.333) [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_o86fr"] @@ -95,7 +82,8 @@ offset_left = 2.0 offset_top = -5.0 offset_right = 50002.0 offset_bottom = 49995.0 -texture = SubResource("GradientTexture1D_f0jwl") +texture = ExtResource("6_sn16e") +stretch_mode = 1 [node name="Clock" type="CharacterBody2D" parent="."] position = Vector2(201, 200) @@ -105,47 +93,16 @@ motion_mode = 1 script = ExtResource("5_7po8n") [node name="CollisionShape2D" type="CollisionShape2D" parent="Clock"] -position = Vector2(194.438, 192) +position = Vector2(0, 0.5) scale = Vector2(0.75, 0.75) shape = SubResource("RectangleShape2D_7w8g6") -script = ExtResource("1_hy18x") -[node name="Label" type="Label" parent="Clock"] -clip_children = 2 -clip_contents = true -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = 57.0 -offset_top = 55.0 -offset_right = 476.0 -offset_bottom = 418.0 -grow_horizontal = 2 -grow_vertical = 2 -scale = Vector2(0.75, 0.75) -size_flags_horizontal = 4 -theme_override_fonts/font = ExtResource("2_0a4qt") -theme_override_font_sizes/font_size = 200 -text = "9:24" -horizontal_alignment = 1 -vertical_alignment = 1 -script = ExtResource("2_qroir") - -[node name="TextureRect" type="TextureRect" parent="Clock/Label"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -rotation = -6.28319 -texture = SubResource("GradientTexture1D_vrv6v") -stretch_mode = 1 -script = ExtResource("1_0hjpt") - -[node name="HTTPRequest" type="HTTPRequest" parent="Clock/Label"] +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Clock"] +texture_filter = 1 +position = Vector2(0, 51) +sprite_frames = ExtResource("9_4eosh") +animation = &"gif" +autoplay = "gif" [node name="Border" type="StaticBody2D" parent="."] physics_material_override = ExtResource("4_bx3xr") diff --git a/main_menu.tscn b/main_menu.tscn index c52ebdc..8e79a6d 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -221,8 +221,8 @@ flat = true [connection signal="pressed" from="Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Tutorial" to="Tutorial Text" method="show"] [connection signal="pressed" from="Play" to="." method="play"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="pressed" from="Tutorial Text/Close" to="Tutorial Text" method="hide"] diff --git a/player.tscn b/player.tscn index 69f619f..fdd7272 100644 --- a/player.tscn +++ b/player.tscn @@ -1,22 +1,7 @@ -[gd_scene load_steps=10 format=3 uid="uid://cgcjicue76wsr"] +[gd_scene load_steps=3 format=3 uid="uid://cgcjicue76wsr"] [ext_resource type="Script" path="res://Player.gd" id="1_bu0dg"] -[ext_resource type="Texture2D" uid="uid://cyk2dqt7ipjg1" path="res://Arrow (1).png" id="2_cy2gs"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="3_w0118"] -[ext_resource type="Script" path="res://InfiniteGradient.gd" id="4_hwb8d"] -[ext_resource type="Script" path="res://PinnedLine.gd" id="5_as86f"] -[ext_resource type="Script" path="res://PinnedNode.gd" id="7_6wch2"] - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_xdd3j"] -gradient = ExtResource("3_w0118") - -[sub_resource type="Curve" id="Curve_7ru3n"] -_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0] -point_count = 2 - -[sub_resource type="Gradient" id="Gradient_l1fxo"] -offsets = PackedFloat32Array(0.756667, 1) -colors = PackedColorArray(0.48, 0.48, 1, 1, 0.51, 0.51, 1, 0) +[ext_resource type="SpriteFrames" uid="uid://cmkptgd3k37bl" path="res://player_idle.gif" id="2_c8tq3"] [node name="Player" type="RigidBody2D" groups=["destructible"]] position = Vector2(-42, 74) @@ -24,60 +9,15 @@ gravity_scale = 1.66533e-16 linear_damp = 1.0 script = ExtResource("1_bu0dg") -[node name="TextureRect" type="TextureRect" parent="."] -clip_children = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -256.0 -offset_top = -256.0 -offset_right = 256.0 -offset_bottom = 256.0 -grow_horizontal = 2 -grow_vertical = 2 -rotation = 1.5708 -scale = Vector2(0.1, 0.1) -pivot_offset = Vector2(256, 256) -texture = ExtResource("2_cy2gs") - -[node name="TextureRect" type="TextureRect" parent="TextureRect"] -layout_mode = 1 -anchors_preset = 13 -anchor_left = 0.5 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -1024.0 -offset_right = 1024.0 -grow_horizontal = 2 -grow_vertical = 2 -texture = SubResource("GradientTexture1D_xdd3j") -script = ExtResource("4_hwb8d") +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-33, 0) +sprite_frames = ExtResource("2_c8tq3") +animation = &"gif" +speed_scale = 0.75 [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] visible = false rotation = 1.5708 scale = Vector2(0.1, 0.1) polygon = PackedVector2Array(0, -155, 23, -147, 249, 89, 259, 113, 246, 142, 216, 155, 178, 148, 0, 52, -187, 150, -232, 148, -257, 116, -250, 89, -38, -136, -21, -147) - -[node name="RayCast2D" type="RayCast2D" parent="."] -visible = false -target_position = Vector2(5000, 2.08165e-12) - -[node name="Line2D" type="Line2D" parent="RayCast2D" node_paths=PackedStringArray("point_a", "point_b")] -z_index = -2 -points = PackedVector2Array(0, 0, 100, 2.08165e-12) -width = 100.0 -width_curve = SubResource("Curve_7ru3n") -gradient = SubResource("Gradient_l1fxo") -script = ExtResource("5_as86f") -point_a = NodePath("../..") -point_b = NodePath("../Marker2D") - -[node name="Marker2D" type="Marker2D" parent="RayCast2D"] -script = ExtResource("7_6wch2") - -[node name="Gun" type="Marker2D" parent="."] -visible = false -position = Vector2(53, 0) diff --git a/player_idle.gif b/player_idle.gif new file mode 100644 index 0000000..ed28cb9 Binary files /dev/null and b/player_idle.gif differ diff --git a/player_idle.gif.import b/player_idle.gif.import new file mode 100644 index 0000000..28ee267 --- /dev/null +++ b/player_idle.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://cmkptgd3k37bl" +path="res://.godot/imported/player_idle.gif-9b64932f60482d72b51297130434c2a2.tres" + +[deps] + +source_file="res://player_idle.gif" +dest_files=["res://.godot/imported/player_idle.gif-9b64932f60482d72b51297130434c2a2.tres"] + +[params] + +frames_per_second=30 diff --git a/player_moving.gif b/player_moving.gif new file mode 100644 index 0000000..0a08ff2 Binary files /dev/null and b/player_moving.gif differ diff --git a/player_moving.gif.import b/player_moving.gif.import new file mode 100644 index 0000000..9427e74 --- /dev/null +++ b/player_moving.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://da51ca6ckjnkw" +path="res://.godot/imported/player_moving.gif-d8300f9f12180ed80481eb9f96715752.tres" + +[deps] + +source_file="res://player_moving.gif" +dest_files=["res://.godot/imported/player_moving.gif-d8300f9f12180ed80481eb9f96715752.tres"] + +[params] + +frames_per_second=30 diff --git a/portal-mask.gif b/portal-mask.gif new file mode 100644 index 0000000..4f0293d Binary files /dev/null and b/portal-mask.gif differ diff --git a/portal-mask.gif.import b/portal-mask.gif.import new file mode 100644 index 0000000..69341f1 --- /dev/null +++ b/portal-mask.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://bhut2leth5pcl" +path="res://.godot/imported/portal-mask.gif-2b400c284dba35e66ceaf3d4df8621a3.tres" + +[deps] + +source_file="res://portal-mask.gif" +dest_files=["res://.godot/imported/portal-mask.gif-2b400c284dba35e66ceaf3d4df8621a3.tres"] + +[params] + +frames_per_second=30 diff --git a/portal-sprite.gif b/portal-sprite.gif new file mode 100644 index 0000000..24c02c5 Binary files /dev/null and b/portal-sprite.gif differ diff --git a/portal-sprite.gif.import b/portal-sprite.gif.import new file mode 100644 index 0000000..122b3ce --- /dev/null +++ b/portal-sprite.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://cejgerinde63x" +path="res://.godot/imported/portal-sprite.gif-97fd47c3b8c83e35c7f6fff190180c12.tres" + +[deps] + +source_file="res://portal-sprite.gif" +dest_files=["res://.godot/imported/portal-sprite.gif-97fd47c3b8c83e35c7f6fff190180c12.tres"] + +[params] + +frames_per_second=30 diff --git a/portal.tscn b/portal.tscn new file mode 100644 index 0000000..a3e2c4e --- /dev/null +++ b/portal.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=4 format=3 uid="uid://chn8kuplnjxik"] + +[ext_resource type="SpriteFrames" uid="uid://cejgerinde63x" path="res://portal-sprite.gif" id="1_17yb8"] +[ext_resource type="SpriteFrames" uid="uid://bhut2leth5pcl" path="res://portal-mask.gif" id="2_pxlsc"] +[ext_resource type="PackedScene" uid="uid://yu50iyftoyaj" path="res://riangle.tscn" id="3_r3mwi"] + +[node name="Portal" type="Node2D"] + +[node name="Sprite" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-3, 0) +scale = Vector2(3, 3) +sprite_frames = ExtResource("1_17yb8") +animation = &"gif" +autoplay = "gif" + +[node name="Mask" type="AnimatedSprite2D" parent="."] +clip_children = 1 +texture_filter = 1 +scale = Vector2(3, 3) +sprite_frames = ExtResource("2_pxlsc") +animation = &"gif" +autoplay = "gif" + +[node name="Riangle" parent="Mask" instance=ExtResource("3_r3mwi")] +scale = Vector2(0.083, 0.083) diff --git a/riangle.gif b/riangle.gif new file mode 100644 index 0000000..a1eb8f5 Binary files /dev/null and b/riangle.gif differ diff --git a/riangle.gif.import b/riangle.gif.import new file mode 100644 index 0000000..fd3a22d --- /dev/null +++ b/riangle.gif.import @@ -0,0 +1,15 @@ +[remap] + +importer="import_gif_to_sprite_frames" +type="SpriteFrames" +uid="uid://dt3chppm3qub7" +path="res://.godot/imported/riangle.gif-caa79ebfc0c2c280f2898463cf930386.tres" + +[deps] + +source_file="res://riangle.gif" +dest_files=["res://.godot/imported/riangle.gif-caa79ebfc0c2c280f2898463cf930386.tres"] + +[params] + +frames_per_second=30 diff --git a/riangle.tscn b/riangle.tscn index c7ba96e..8ad1f04 100644 --- a/riangle.tscn +++ b/riangle.tscn @@ -1,30 +1,22 @@ -[gd_scene load_steps=6 format=3 uid="uid://yu50iyftoyaj"] +[gd_scene load_steps=4 format=3 uid="uid://yu50iyftoyaj"] -[ext_resource type="Texture2D" uid="uid://cartrcqnympin" path="res://Triangle.png" id="1_pjdof"] -[ext_resource type="Gradient" uid="uid://c41berdx2rqpw" path="res://gradient.tres" id="2_ic6q0"] +[ext_resource type="SpriteFrames" uid="uid://dt3chppm3qub7" path="res://riangle.gif" id="1_5ndal"] [ext_resource type="Script" path="res://Gun.gd" id="3_kffl0"] [ext_resource type="PackedScene" uid="uid://c6ybtahxwpukd" path="res://bullet.tscn" id="4_tfncc"] -[sub_resource type="GradientTexture1D" id="GradientTexture1D_u5oju"] -gradient = ExtResource("2_ic6q0") -width = 2048 - [node name="Riangle" type="StaticBody2D" groups=["destructible"]] scale = Vector2(0.25, 0.25) -[node name="Sprite2D" type="Sprite2D" parent="."] -clip_children = 1 +[node name="Sprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-21.5874, 1.58741) rotation = 1.5708 -scale = Vector2(0.5, 0.5) -texture = ExtResource("1_pjdof") - -[node name="TextureRect" type="TextureRect" parent="Sprite2D"] -offset_left = -220.0 -offset_top = 265.0 -offset_right = 1828.0 -offset_bottom = 777.0 -rotation = -1.5708 -texture = SubResource("GradientTexture1D_u5oju") +scale = Vector2(5.50033, 5.50033) +sprite_frames = ExtResource("1_5ndal") +animation = &"gif" +autoplay = "gif" +frame_progress = 0.383366 +speed_scale = 2.0 [node name="Gun2" type="Marker2D" parent="."] position = Vector2(-224, 284) @@ -44,7 +36,6 @@ script = ExtResource("3_kffl0") bullet = ExtResource("4_tfncc") [node name="Timer" type="Timer" parent="."] -wait_time = 2.0 autostart = true [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]