Updated credits
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class_name Background
|
||||
extends Node2D
|
||||
|
||||
|
||||
@onready var paralax_1 : Parallax2D = $Parallax1
|
||||
@onready var paralax_2 : Parallax2D = $Parallax2
|
||||
@onready var paralax_3 : Parallax2D = $Parallax3
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
paralax_1.scroll_offset.x = randf_range(1, paralax_1.repeat_size.x)
|
||||
paralax_2.scroll_offset.x = randf_range(1, paralax_2.repeat_size.x)
|
||||
paralax_3.scroll_offset.x = randf_range(1, paralax_3.repeat_size.x)
|
||||
@@ -0,0 +1 @@
|
||||
uid://ddp4unooscflj
|
||||
@@ -0,0 +1,50 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://chdrjc7c6bdpb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ddp4unooscflj" path="res://game/background.gd" id="1_fypbl"]
|
||||
[ext_resource type="Texture2D" uid="uid://mvcnpsfsyiq6" path="res://images/passage/background.png" id="1_hvye4"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yetnv"]
|
||||
atlas = ExtResource("1_hvye4")
|
||||
region = Rect2(0, 0, 3200, 360)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cuj01"]
|
||||
atlas = ExtResource("1_hvye4")
|
||||
region = Rect2(0, 360, 3200, 360)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u0ams"]
|
||||
atlas = ExtResource("1_hvye4")
|
||||
region = Rect2(0, 720, 3200, 360)
|
||||
|
||||
[node name="Background" type="Node2D"]
|
||||
z_index = -100
|
||||
script = ExtResource("1_fypbl")
|
||||
|
||||
[node name="Parallax1" type="Parallax2D" parent="."]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-1, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax1"]
|
||||
texture = SubResource("AtlasTexture_yetnv")
|
||||
|
||||
[node name="Parallax2" type="Parallax2D" parent="."]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-5, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax2"]
|
||||
texture = SubResource("AtlasTexture_cuj01")
|
||||
|
||||
[node name="Parallax3" type="Parallax2D" parent="."]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-10, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax3"]
|
||||
texture = SubResource("AtlasTexture_u0ams")
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
[node name="AbstractEnemyShip" groups=["enemies"] instance=ExtResource("1_28j6l")]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
collision_mask = 6
|
||||
script = ExtResource("2_fwvrd")
|
||||
weapon_rotation = 180
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ extends AbstractShip
|
||||
@export_range(0, 200) var blink_range := 0
|
||||
|
||||
|
||||
const ENEMY_LAYER = 4
|
||||
|
||||
|
||||
@onready var blink_timer : Timer = $BlinkTimer
|
||||
@onready var blink_shadow : GPUParticles2D = $BlinkShadow
|
||||
|
||||
@@ -36,4 +39,6 @@ func _blink(direction: Vector2) -> void:
|
||||
get_tree().current_scene.add_child(shadow)
|
||||
shadow.finished.connect(shadow.queue_free)
|
||||
|
||||
collision_mask &= ~ENEMY_LAYER
|
||||
move_and_collide(direction * blink_range)
|
||||
collision_mask |= ENEMY_LAYER
|
||||
|
||||
@@ -7,15 +7,6 @@ signal player_died
|
||||
|
||||
@onready var enemy_swamp_controller : EnemySwampController = $EnemySwampController
|
||||
@onready var enemy_timer : Timer = $EnemyTimer
|
||||
@onready var paralax_1 : Parallax2D = $Background/Parallax1
|
||||
@onready var paralax_2 : Parallax2D = $Background/Parallax2
|
||||
@onready var paralax_3 : Parallax2D = $Background/Parallax3
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
paralax_1.scroll_offset.x = randf_range(1, paralax_1.repeat_size.x)
|
||||
paralax_2.scroll_offset.x = randf_range(1, paralax_2.repeat_size.x)
|
||||
paralax_3.scroll_offset.x = randf_range(1, paralax_3.repeat_size.x)
|
||||
|
||||
|
||||
func _on_enemy_timer_timeout() -> void:
|
||||
|
||||
+3
-46
@@ -1,24 +1,12 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dgc0087kvarx6"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dgc0087kvarx6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c6gpm3edyr4nu" path="res://game/passage.gd" id="1_ltkyg"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpn5x0ijgl7ei" path="res://game/controllers/enemy_swamp_controller.tscn" id="2_72vqi"]
|
||||
[ext_resource type="PackedScene" uid="uid://br074cqcnul3d" path="res://game/entities/ships/player/player_ship.tscn" id="3_r3x05"]
|
||||
[ext_resource type="Texture2D" uid="uid://mvcnpsfsyiq6" path="res://images/passage/background.png" id="4_cuj01"]
|
||||
[ext_resource type="PackedScene" uid="uid://chdrjc7c6bdpb" path="res://game/background.tscn" id="4_cuj01"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ltkyg"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yetnv"]
|
||||
atlas = ExtResource("4_cuj01")
|
||||
region = Rect2(0, 0, 3200, 360)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cuj01"]
|
||||
atlas = ExtResource("4_cuj01")
|
||||
region = Rect2(0, 360, 3200, 360)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u0ams"]
|
||||
atlas = ExtResource("4_cuj01")
|
||||
region = Rect2(0, 720, 3200, 360)
|
||||
|
||||
[node name="Passage" type="Node2D"]
|
||||
script = ExtResource("1_ltkyg")
|
||||
|
||||
@@ -59,38 +47,7 @@ wait_time = 3.0
|
||||
one_shot = true
|
||||
autostart = true
|
||||
|
||||
[node name="Background" type="Node2D" parent="."]
|
||||
z_index = -100
|
||||
|
||||
[node name="Parallax1" type="Parallax2D" parent="Background"]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-1, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Background/Parallax1"]
|
||||
texture = SubResource("AtlasTexture_yetnv")
|
||||
|
||||
[node name="Parallax2" type="Parallax2D" parent="Background"]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-5, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Background/Parallax2"]
|
||||
texture = SubResource("AtlasTexture_cuj01")
|
||||
|
||||
[node name="Parallax3" type="Parallax2D" parent="Background"]
|
||||
scroll_offset = Vector2(0, 180)
|
||||
repeat_size = Vector2(3200, 0)
|
||||
autoscroll = Vector2(-10, 0)
|
||||
follow_viewport = false
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Background/Parallax3"]
|
||||
texture = SubResource("AtlasTexture_u0ams")
|
||||
[node name="Background" parent="." instance=ExtResource("4_cuj01")]
|
||||
|
||||
[connection signal="destroyed" from="PlayerShip" to="." method="_on_player_ship_destroyed"]
|
||||
[connection signal="timeout" from="EnemyTimer" to="." method="_on_enemy_timer_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user