final commit :)
This commit is contained in:
@@ -5,15 +5,34 @@ var levels: Dictionary = {
|
||||
"test2": "uid://b1jbl6gvlvpvy",
|
||||
"1": "uid://cnq5ir1kfkqan",
|
||||
"2": "uid://dd88vrckuqggu",
|
||||
"3": "uid://dk46prqr68bh0"
|
||||
"3": "uid://dk46prqr68bh0",
|
||||
"4": "uid://uo8cy276f3cp",
|
||||
"5": "uid://b2j2gwes24th2",
|
||||
"6": "uid://iw6327x7cecu",
|
||||
"END": "uid://dcrnnrnvbqmq0"
|
||||
}
|
||||
|
||||
|
||||
|
||||
func reset_level() -> void:
|
||||
await get_tree().create_timer(1).timeout
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Input.is_action_just_pressed("RESTART"):
|
||||
reset_level()
|
||||
if OS.has_feature("debug"):
|
||||
if Input.is_action_just_pressed("1"):
|
||||
change_level("1")
|
||||
if Input.is_action_just_pressed("2"):
|
||||
change_level("2")
|
||||
if Input.is_action_just_pressed("3"):
|
||||
change_level("3")
|
||||
if Input.is_action_just_pressed("4"):
|
||||
change_level("4")
|
||||
if Input.is_action_just_pressed("5"):
|
||||
change_level("5")
|
||||
if Input.is_action_just_pressed("6"):
|
||||
change_level("6")
|
||||
|
||||
func change_level(levelName: String) -> void:
|
||||
print(levels[levelName])
|
||||
get_tree().change_scene_to_file(levels[levelName])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=127 format=3 uid="uid://ca7jd0ttc0v67"]
|
||||
[gd_scene format=3 uid="uid://ca7jd0ttc0v67"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0oxneml3esdx" path="res://Entities/Player/player.gd" id="1_8soms"]
|
||||
[ext_resource type="Shader" uid="uid://cqjsw6d71kkd2" path="res://Entities/Player/player_hit_flash_shader.tres" id="2_3ep63"]
|
||||
@@ -776,14 +776,14 @@ tracks/2/keys = {
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/3/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [4.0]
|
||||
"values": [Vector2(0, -10)]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
@@ -795,19 +795,19 @@ tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [18.0]
|
||||
"values": [10.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/5/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -10)]
|
||||
"values": [4.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_epc1c"]
|
||||
@@ -816,62 +816,62 @@ length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [4.0]
|
||||
"values": [26.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
|
||||
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [26.0]
|
||||
"values": [4.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("WalkHitBox:shape:radius")
|
||||
tracks/2/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [6.0]
|
||||
"values": [Vector2(0, -15)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("WalkHitBox:shape:height")
|
||||
tracks/3/path = NodePath("WalkHitBox:shape:radius")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [30.0]
|
||||
"values": [6.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/4/path = NodePath("WalkHitBox:shape:height")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -15)]
|
||||
"values": [30.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
@@ -891,62 +891,62 @@ length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [4.0]
|
||||
"values": [26.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
|
||||
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [26.0]
|
||||
"values": [4.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("WalkHitBox:shape:radius")
|
||||
tracks/2/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [6.0]
|
||||
"values": [Vector2(0, -15)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("WalkHitBox:shape:height")
|
||||
tracks/3/path = NodePath("WalkHitBox:shape:radius")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [30.0]
|
||||
"values": [6.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
|
||||
tracks/4/path = NodePath("WalkHitBox:shape:height")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -15)]
|
||||
"values": [30.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
@@ -1005,11 +1005,11 @@ _data = {
|
||||
&"hit": SubResource("Animation_2mv0n")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody2D" groups=["Player"]]
|
||||
[node name="Player" type="CharacterBody2D" unique_id=1798592382 groups=["Player"]]
|
||||
collision_layer = 2
|
||||
script = ExtResource("1_8soms")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=816774718]
|
||||
material = SubResource("ShaderMaterial_rqcxa")
|
||||
position = Vector2(0, -16)
|
||||
sprite_frames = SubResource("SpriteFrames_usp30")
|
||||
@@ -1018,73 +1018,71 @@ autoplay = "Idle"
|
||||
frame = 3
|
||||
frame_progress = 0.8699081
|
||||
|
||||
[node name="WalkHitBox" type="CollisionShape2D" parent="."]
|
||||
[node name="WalkHitBox" type="CollisionShape2D" parent="." unique_id=263731821]
|
||||
position = Vector2(0, -15)
|
||||
shape = SubResource("CapsuleShape2D_0e4oy")
|
||||
|
||||
[node name="LedgeGrab" type="CollisionShape2D" parent="."]
|
||||
[node name="LedgeGrab" type="CollisionShape2D" parent="." unique_id=1217724181]
|
||||
visible = false
|
||||
position = Vector2(0, -27)
|
||||
shape = SubResource("RectangleShape2D_kjljb")
|
||||
|
||||
[node name="HitBoxes" type="Node2D" parent="."]
|
||||
[node name="HitBoxes" type="Node2D" parent="." unique_id=745233801]
|
||||
visible = false
|
||||
|
||||
[node name="FloorCheck" type="RayCast2D" parent="HitBoxes"]
|
||||
[node name="FloorCheck" type="RayCast2D" parent="HitBoxes" unique_id=1291008332]
|
||||
visible = false
|
||||
position = Vector2(0, -19)
|
||||
target_position = Vector2(0, 29)
|
||||
|
||||
[node name="TopCheck" type="ShapeCast2D" parent="HitBoxes"]
|
||||
[node name="TopCheck" type="ShapeCast2D" parent="HitBoxes" unique_id=1788346164]
|
||||
visible = false
|
||||
position = Vector2(0, -30)
|
||||
shape = SubResource("RectangleShape2D_ib3u0")
|
||||
target_position = Vector2(0, 0)
|
||||
|
||||
[node name="WallCheck" type="ShapeCast2D" parent="HitBoxes"]
|
||||
[node name="WallCheck" type="ShapeCast2D" parent="HitBoxes" unique_id=1346807795]
|
||||
visible = false
|
||||
position = Vector2(0, -18)
|
||||
shape = SubResource("RectangleShape2D_brh81")
|
||||
target_position = Vector2(0, 3)
|
||||
|
||||
[node name="HurtBox" type="Area2D" parent="HitBoxes"]
|
||||
[node name="HurtBox" type="Area2D" parent="HitBoxes" unique_id=552489258]
|
||||
collision_layer = 2
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxes/HurtBox"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxes/HurtBox" unique_id=1057503068]
|
||||
position = Vector2(0, -15)
|
||||
shape = SubResource("CapsuleShape2D_n270p")
|
||||
debug_color = Color(0.997466, 0, 0.165329, 0.42)
|
||||
|
||||
[node name="CollisionShapeMove" type="AnimationPlayer" parent="HitBoxes"]
|
||||
[node name="CollisionShapeMove" type="AnimationPlayer" parent="HitBoxes" unique_id=903815220]
|
||||
root_node = NodePath("../..")
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_ib3u0")
|
||||
}
|
||||
libraries/ = SubResource("AnimationLibrary_ib3u0")
|
||||
|
||||
[node name="Markers" type="Node2D" parent="."]
|
||||
[node name="Markers" type="Node2D" parent="." unique_id=43094193]
|
||||
|
||||
[node name="Center" type="Marker2D" parent="Markers"]
|
||||
[node name="Center" type="Marker2D" parent="Markers" unique_id=1014479282]
|
||||
position = Vector2(0, -40)
|
||||
|
||||
[node name="CameraCenter" type="Marker2D" parent="Markers"]
|
||||
[node name="CameraCenter" type="Marker2D" parent="Markers" unique_id=214014744]
|
||||
position = Vector2(0, -44)
|
||||
|
||||
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("initialNodeState")]
|
||||
[node name="StateMachine" type="Node" parent="." unique_id=1522439522 node_paths=PackedStringArray("initialNodeState")]
|
||||
script = ExtResource("12_n270p")
|
||||
initialNodeState = NodePath("Idle")
|
||||
|
||||
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
[node name="Idle" type="Node" parent="StateMachine" unique_id=1554110740 node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
script = ExtResource("13_3ep63")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
|
||||
[node name="Run" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
[node name="Run" type="Node" parent="StateMachine" unique_id=650516812 node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
script = ExtResource("15_rqcxa")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
|
||||
[node name="Jump" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "fallState")]
|
||||
[node name="Jump" type="Node" parent="StateMachine" unique_id=602373429 node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "fallState")]
|
||||
script = ExtResource("14_kjljb")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
@@ -1093,7 +1091,7 @@ floorCheck = NodePath("../../HitBoxes/FloorCheck")
|
||||
ledgeGrabBox = NodePath("../../LedgeGrab")
|
||||
fallState = NodePath("../Fall")
|
||||
|
||||
[node name="Fall" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "jumpState")]
|
||||
[node name="Fall" type="Node" parent="StateMachine" unique_id=1177919389 node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "jumpState")]
|
||||
script = ExtResource("14_3ep63")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
@@ -1103,12 +1101,12 @@ ledgeGrabBox = NodePath("../../LedgeGrab")
|
||||
jumpState = NodePath("../Jump")
|
||||
coyoteTime = 0.3
|
||||
|
||||
[node name="Land" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
[node name="Land" type="Node" parent="StateMachine" unique_id=774044394 node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
script = ExtResource("24_bp242")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
|
||||
[node name="Grab" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "ledgeGrabBox", "wallCheck", "floorCheck")]
|
||||
[node name="Grab" type="Node" parent="StateMachine" unique_id=794082049 node_paths=PackedStringArray("player", "animatedSprite2D", "ledgeGrabBox", "wallCheck", "floorCheck")]
|
||||
script = ExtResource("23_kjljb")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
@@ -1116,33 +1114,31 @@ ledgeGrabBox = NodePath("../../LedgeGrab")
|
||||
wallCheck = NodePath("../../HitBoxes/WallCheck")
|
||||
floorCheck = NodePath("../../HitBoxes/FloorCheck")
|
||||
|
||||
[node name="CrouchIdle" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
[node name="CrouchIdle" type="Node" parent="StateMachine" unique_id=1979241886 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
script = ExtResource("24_brh81")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
|
||||
|
||||
[node name="CrouchWalk" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
[node name="CrouchWalk" type="Node" parent="StateMachine" unique_id=323925100 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
script = ExtResource("28_y6drd")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
|
||||
|
||||
[node name="Slide" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
[node name="Slide" type="Node" parent="StateMachine" unique_id=1722895560 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
|
||||
script = ExtResource("26_bp242")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
|
||||
|
||||
[node name="Dash" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
[node name="Dash" type="Node" parent="StateMachine" unique_id=492363148 node_paths=PackedStringArray("player", "animatedSprite2D")]
|
||||
script = ExtResource("25_01ng6")
|
||||
player = NodePath("../..")
|
||||
animatedSprite2D = NodePath("../../AnimatedSprite2D")
|
||||
|
||||
[node name="HitAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_usp30")
|
||||
}
|
||||
[node name="HitAnimationPlayer" type="AnimationPlayer" parent="." unique_id=909073120]
|
||||
libraries/ = SubResource("AnimationLibrary_usp30")
|
||||
|
||||
[connection signal="area_entered" from="HitBoxes/HurtBox" to="." method="_on_hurt_box_area_entered"]
|
||||
[connection signal="body_entered" from="HitBoxes/HurtBox" to="." method="_on_hurt_box_body_entered"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_resource type="VisualShader" load_steps=5 format=3 uid="uid://cqjsw6d71kkd2"]
|
||||
[gd_resource type="VisualShader" format=3 uid="uid://cqjsw6d71kkd2"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_wwqby"]
|
||||
parameter_name = "hit_color"
|
||||
@@ -16,51 +16,6 @@ default_input_values = [0, 0.0, 1, 1.0, 2, 1e-05, 3, Vector3(0, 0, 0), 4, Vector
|
||||
input_name = "color"
|
||||
|
||||
[resource]
|
||||
code = "shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform bool enabled = false;
|
||||
uniform vec4 hit_color : source_color = vec4(0.886654, 0.000000, 0.166007, 1.000000);
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// BooleanParameter:3
|
||||
bool n_out3p0 = enabled;
|
||||
|
||||
|
||||
// ColorParameter:2
|
||||
vec4 n_out2p0 = hit_color;
|
||||
|
||||
|
||||
// Input:5
|
||||
vec4 n_out5p0 = COLOR;
|
||||
|
||||
|
||||
vec3 n_out4p0;
|
||||
// If:4
|
||||
float n_in4p1 = 1.00000;
|
||||
float n_in4p2 = 0.00001;
|
||||
if(abs((n_out3p0 ? 1.0 : 0.0) - n_in4p1) < n_in4p2)
|
||||
{
|
||||
n_out4p0 = vec3(n_out2p0.xyz);
|
||||
}
|
||||
else if((n_out3p0 ? 1.0 : 0.0) < n_in4p1)
|
||||
{
|
||||
n_out4p0 = vec3(n_out5p0.xyz);
|
||||
}
|
||||
else
|
||||
{
|
||||
n_out4p0 = vec3(n_out5p0.xyz);
|
||||
}
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out4p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
nodes/fragment/0/position = Vector2(320, 120)
|
||||
|
||||
15
Envoroment/Hazards/Spike/floor_spike.tscn
Normal file
15
Envoroment/Hazards/Spike/floor_spike.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene format=3 uid="uid://c1jvxh8xwxd77"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bwxeu131pl2s3" path="res://Envoroment/Hazards/Spike/art/Spike.png" id="1_iia06"]
|
||||
|
||||
[node name="FloorSpike" type="Node2D" unique_id=575719825]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=595044841]
|
||||
texture = ExtResource("1_iia06")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="." unique_id=86211856]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HitBox" unique_id=660412732]
|
||||
polygon = PackedVector2Array(-8, 8, 0, -8, 8, 8)
|
||||
16
Envoroment/Hazards/Spike/left_wall_spike.tscn
Normal file
16
Envoroment/Hazards/Spike/left_wall_spike.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene format=3 uid="uid://cv5yf8sc01kb3"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bwxeu131pl2s3" path="res://Envoroment/Hazards/Spike/art/Spike.png" id="1_uegp7"]
|
||||
|
||||
[node name="Spike" type="Node2D" unique_id=1557771258]
|
||||
rotation = 1.5707964
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=73200339]
|
||||
texture = ExtResource("1_uegp7")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="." unique_id=1902283999]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HitBox" unique_id=536016237]
|
||||
polygon = PackedVector2Array(-8, 8, 0, -8, 8, 8)
|
||||
16
Envoroment/Hazards/Spike/right_wall_spike.tscn
Normal file
16
Envoroment/Hazards/Spike/right_wall_spike.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene format=3 uid="uid://3qs5nfxts77e"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bwxeu131pl2s3" path="res://Envoroment/Hazards/Spike/art/Spike.png" id="1_rdxu8"]
|
||||
|
||||
[node name="Spike" type="Node2D" unique_id=1557771258]
|
||||
rotation = -1.5707964
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=73200339]
|
||||
texture = ExtResource("1_rdxu8")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="." unique_id=1902283999]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HitBox" unique_id=536016237]
|
||||
polygon = PackedVector2Array(-8, 8, 0, -8, 8, 8)
|
||||
16
Envoroment/Hazards/Spike/roof_spike.tscn
Normal file
16
Envoroment/Hazards/Spike/roof_spike.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene format=3 uid="uid://cqecxndiwbk6w"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bwxeu131pl2s3" path="res://Envoroment/Hazards/Spike/art/Spike.png" id="1_b6q5q"]
|
||||
|
||||
[node name="Spike" type="Node2D" unique_id=1557771258]
|
||||
rotation = 3.1415927
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=73200339]
|
||||
texture = ExtResource("1_b6q5q")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="." unique_id=1902283999]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HitBox" unique_id=536016237]
|
||||
polygon = PackedVector2Array(-8, 8, 0, -8, 8, 8)
|
||||
@@ -1,15 +0,0 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c1jvxh8xwxd77"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bwxeu131pl2s3" path="res://Envoroment/Hazards/Spike/art/Spike.png" id="1_jaub8"]
|
||||
|
||||
[node name="Spike" type="Node2D"]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_jaub8")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="."]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HitBox"]
|
||||
polygon = PackedVector2Array(-8, 8, 0, -8, 8, 8)
|
||||
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://biud0nkyvmlv0"]
|
||||
[gd_scene format=3 uid="uid://biud0nkyvmlv0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dorym5b277g7c" path="res://level_transition.gd" id="1_tkgsd"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hwgkx"]
|
||||
size = Vector2(20, 102)
|
||||
|
||||
[node name="LevelTransition" type="Node2D"]
|
||||
[node name="LevelTransition" type="Node2D" unique_id=959721624]
|
||||
script = ExtResource("1_tkgsd")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=1263285960]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1687913439]
|
||||
position = Vector2(10, -51)
|
||||
shape = SubResource("RectangleShape2D_hwgkx")
|
||||
debug_color = Color(0.75157195, 0.19894448, 0.99999994, 0.41960785)
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
27
Envoroment/Levels/4.tscn
Normal file
27
Envoroment/Levels/4.tscn
Normal file
File diff suppressed because one or more lines are too long
28
Envoroment/Levels/5.tscn
Normal file
28
Envoroment/Levels/5.tscn
Normal file
File diff suppressed because one or more lines are too long
33
Envoroment/Levels/6.tscn
Normal file
33
Envoroment/Levels/6.tscn
Normal file
File diff suppressed because one or more lines are too long
38
Envoroment/Levels/END.tscn
Normal file
38
Envoroment/Levels/END.tscn
Normal file
@@ -0,0 +1,38 @@
|
||||
[gd_scene format=3 uid="uid://dcrnnrnvbqmq0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bcc4liqds1j4t" path="res://icon.svg" id="1_hq8kj"]
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_vj5c4"]
|
||||
|
||||
[node name="End" type="Node2D" unique_id=597373496]
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=423366882]
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1268605444]
|
||||
offset_left = -270.0
|
||||
offset_top = -117.0
|
||||
offset_right = -89.0
|
||||
offset_bottom = -94.0
|
||||
text = "Thank you for playing :)"
|
||||
|
||||
[node name="Label" type="Label" parent="Label" unique_id=381993421]
|
||||
layout_mode = 0
|
||||
offset_left = -5.0
|
||||
offset_top = 65.0
|
||||
offset_right = 539.0
|
||||
offset_bottom = 88.0
|
||||
text = "Source code at https://git.astronand.dev/TSA/2026-video-game-project"
|
||||
|
||||
[node name="Label" type="Label" parent="Label/Label" unique_id=46903352]
|
||||
layout_mode = 0
|
||||
offset_left = -5.0
|
||||
offset_top = 65.0
|
||||
offset_right = 539.0
|
||||
offset_bottom = 88.0
|
||||
text = "Made with godot"
|
||||
|
||||
[node name="MeshInstance2D" type="MeshInstance2D" parent="." unique_id=1235096764]
|
||||
position = Vector2(-156.00002, 96)
|
||||
scale = Vector2(88.5, -86.5)
|
||||
mesh = SubResource("QuadMesh_vj5c4")
|
||||
texture = ExtResource("1_hq8kj")
|
||||
@@ -1,8 +1,11 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dqldqg0ctdmbn"]
|
||||
[gd_scene format=3 uid="uid://dqldqg0ctdmbn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ca7jd0ttc0v67" path="res://Entities/Player/player.tscn" id="1_xxuxq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dauoaulv7uea4" path="res://Envoroment/Levels/art/test_tile.png" id="2_4q1i2"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1jvxh8xwxd77" path="res://Envoroment/Hazards/Spike/spike.tscn" id="3_rcnev"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1jvxh8xwxd77" path="res://Envoroment/Hazards/Spike/floor_spike.tscn" id="3_rcnev"]
|
||||
[ext_resource type="PackedScene" uid="uid://cv5yf8sc01kb3" path="res://Envoroment/Hazards/Spike/left_wall_spike.tscn" id="4_h07ok"]
|
||||
[ext_resource type="PackedScene" uid="uid://3qs5nfxts77e" path="res://Envoroment/Hazards/Spike/right_wall_spike.tscn" id="5_su6na"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqecxndiwbk6w" path="res://Envoroment/Hazards/Spike/roof_spike.tscn" id="6_kt3nv"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_f4wtk"]
|
||||
texture = ExtResource("2_4q1i2")
|
||||
@@ -12,21 +15,24 @@ texture = ExtResource("2_4q1i2")
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_f0gh6"]
|
||||
resource_name = "Hazards"
|
||||
scenes/1/scene = ExtResource("3_rcnev")
|
||||
scenes/2/scene = ExtResource("4_h07ok")
|
||||
scenes/3/scene = ExtResource("5_su6na")
|
||||
scenes/4/scene = ExtResource("6_kt3nv")
|
||||
|
||||
[sub_resource type="TileSet" id="TileSet_pb67c"]
|
||||
physics_layer_0/collision_layer = 1
|
||||
sources/0 = SubResource("TileSetAtlasSource_f4wtk")
|
||||
sources/1 = SubResource("TileSetScenesCollectionSource_f0gh6")
|
||||
|
||||
[node name="BaseLevel" type="Node2D"]
|
||||
[node name="BaseLevel" type="Node2D" unique_id=374257334]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_xxuxq")]
|
||||
[node name="Player" parent="." unique_id=812354970 instance=ExtResource("1_xxuxq")]
|
||||
|
||||
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="Player"]
|
||||
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="Player" unique_id=1455386856]
|
||||
remote_path = NodePath("../../Camera2D")
|
||||
|
||||
[node name="Ground" type="TileMapLayer" parent="."]
|
||||
[node name="Ground" type="TileMapLayer" parent="." unique_id=1754112512]
|
||||
tile_set = SubResource("TileSet_pb67c")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=895804309]
|
||||
position_smoothing_enabled = true
|
||||
|
||||
40
TSA.apple-touch-icon.png.import
Normal file
40
TSA.apple-touch-icon.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3x87152snexy"
|
||||
path="res://.godot/imported/TSA.apple-touch-icon.png-29317dee0854c91f50b3a37c63b5d43b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://TSA.apple-touch-icon.png"
|
||||
dest_files=["res://.godot/imported/TSA.apple-touch-icon.png-29317dee0854c91f50b3a37c63b5d43b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
2
TSA.html
2
TSA.html
@@ -111,7 +111,7 @@ body {
|
||||
|
||||
<script src="TSA.js"></script>
|
||||
<script>
|
||||
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"TSA","experimentalVK":false,"fileSizes":{"TSA.pck":392416,"TSA.wasm":35739700},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4};
|
||||
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"TSA","experimentalVK":false,"fileSizes":{"TSA.pck":1196800,"TSA.wasm":35739700},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4};
|
||||
const GODOT_THREADS_ENABLED = false;
|
||||
const engine = new Engine(GODOT_CONFIG);
|
||||
|
||||
|
||||
40
TSA.icon.png.import
Normal file
40
TSA.icon.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bclsaq2kk34uh"
|
||||
path="res://.godot/imported/TSA.icon.png-91ae0a74f97fe2b1ea0716e76aef0d7b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://TSA.icon.png"
|
||||
dest_files=["res://.godot/imported/TSA.icon.png-91ae0a74f97fe2b1ea0716e76aef0d7b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
40
TSA.png.import
Normal file
40
TSA.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bsp7jhroldnvu"
|
||||
path="res://.godot/imported/TSA.png-576accd5f27205c61132b7b6460c3067.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://TSA.png"
|
||||
dest_files=["res://.godot/imported/TSA.png-576accd5f27205c61132b7b6460c3067.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
@@ -15,7 +15,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
[application]
|
||||
|
||||
config/name="TSA"
|
||||
run/main_scene="uid://dtkg88hfvln2d"
|
||||
run/main_scene="uid://cnq5ir1kfkqan"
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
@@ -78,6 +78,41 @@ dash={
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
RESTART={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
1={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
2={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
3={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
4={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
5={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":53,"key_label":0,"unicode":53,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
6={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":54,"key_label":0,"unicode":54,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user