massive work towards godot 4

This commit is contained in:
2023-02-01 04:43:50 -05:00
parent 42259a89ed
commit 5dac6ced93
484 changed files with 5935 additions and 5084 deletions

View File

@ -0,0 +1,30 @@
[gd_scene load_steps=8 format=3]
[ext_resource type="Texture2D" uid="uid://nc2p2vnqoqgw" path="res://assets/art/slash_effect2.png" id="1"]
[ext_resource type="Texture2D" uid="uid://d2i7ccfpc02oc" path="res://assets/art/slash_effect3.png" id="2"]
[ext_resource type="Texture2D" uid="uid://deo8pw0jpbiou" path="res://assets/art/slash_effect4.png" id="3"]
[ext_resource type="Texture2D" uid="uid://7ucol82h3vtr" path="res://assets/art/slash_effect5.png" id="4"]
[ext_resource type="Texture2D" uid="uid://nu06lwegyfpy" path="res://assets/art/slash_effect1.png" id="5"]
[ext_resource type="Script" path="res://scripts/destroy_after_animation.gd" id="6"]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 1 ), ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ) ],
"loop": true,
"name": "destroy",
"speed": 100.0
}, {
"frames": [ ExtResource( 5 ) ],
"loop": true,
"name": "spawn",
"speed": 5.0
} ]
[node name="SlashAnimation" type="Node2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
frames = SubResource( 1 )
animation = "destroy"
frame = 2
playing = true
script = ExtResource( 6 )

View File

@ -0,0 +1,71 @@
[gd_scene load_steps=11 format=3 uid="uid://blr7x54kkvyf7"]
[ext_resource type="Script" path="res://scripts/baddie.gd" id="1_y8j84"]
[ext_resource type="Script" path="res://scripts/basic_enemy.gd" id="2_hefj0"]
[ext_resource type="Texture2D" uid="uid://p868d486c0c3" path="res://assets/art/Enemies/basic_enemy3.png" id="3_u6icv"]
[ext_resource type="Texture2D" uid="uid://iewpb4eaydo1" path="res://assets/art/Enemies/basic_enemy1.png" id="4_r5s5n"]
[ext_resource type="Texture2D" uid="uid://cnkpv43ex1bxo" path="res://assets/art/Enemies/basic_enemy2.png" id="5_ftr1e"]
[ext_resource type="Texture2D" uid="uid://6hlixqpg7pb6" path="res://assets/art/Enemies/basic_enemy4.png" id="6_qfqk3"]
[ext_resource type="Texture2D" uid="uid://df3auvg5myvws" path="res://assets/art/light.png" id="7_8amn3"]
[sub_resource type="SpriteFrames" id="2"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_u6icv")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("4_r5s5n")
}, {
"duration": 1.0,
"texture": ExtResource("5_ftr1e")
}, {
"duration": 1.0,
"texture": ExtResource("3_u6icv")
}, {
"duration": 1.0,
"texture": ExtResource("6_qfqk3")
}],
"loop": true,
"name": &"run",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="3"]
[sub_resource type="RectangleShape2D" id="4"]
[node name="Basic Enemy" type="Node2D"]
modulate = Color(1, 1, 0, 1)
script = ExtResource("1_y8j84")
HP = 3
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
script = ExtResource("2_hefj0")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"]
texture_filter = 1
frames = SubResource("2")
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
scale = Vector2(0.35, 0.45)
shape = SubResource("3")
[node name="Area2D" type="Area2D" parent="CharacterBody2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D/Area2D"]
position = Vector2(5, -2)
scale = Vector2(0.5, 0.25)
shape = SubResource("4")
one_way_collision_margin = 30.0
[node name="PointLight2D" type="PointLight2D" parent="CharacterBody2D"]
energy = 0.25
texture = ExtResource("7_8amn3")
texture_scale = 1.5

7
nodes/MusicPlayer.tscn Normal file
View File

@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="AudioStream" uid="uid://dqm4rc76fpbkt" path="res://assets/music/dos-88/DOS-88 - Automatav2.ogg" id="1"]
[node name="MusicPlayer" type="AudioStreamPlayer"]
stream = ExtResource( 1 )
bus = "Music"

View File

@ -0,0 +1,20 @@
[gd_scene load_steps=5 format=3]
[ext_resource type="Theme" uid="uid://cxgvk5h68qluc" path="res://general_theme.tres" id="1"]
[ext_resource type="FontFile" uid="uid://d04y8053bm382" path="res://assets/fonts/pixelmix/pixelmix.ttf" id="2"]
[ext_resource type="Script" path="res://scripts/RunLabel.gd" id="3"]
[sub_resource type="FontFile" id=1]
size = 8
font_data = ExtResource( 2 )
[node name="Node2D" type="Node2D"]
[node name="Label" type="Label" parent="."]
offset_right = 40.0
offset_bottom = 14.0
theme = ExtResource( 1 )
custom_fonts/font = SubResource( 1 )
custom_colors/font_color = Color( 0.6, 0.898039, 0.313726, 1 )
text = "test"
script = ExtResource( 3 )

122
nodes/Victory.tscn Normal file
View File

@ -0,0 +1,122 @@
[gd_scene load_steps=6 format=3]
[ext_resource type="Theme" uid="uid://cxgvk5h68qluc" path="res://general_theme.tres" id="1"]
[ext_resource type="FontFile" uid="uid://5pudbq7h6eh7" path="res://assets/fonts/pixelmix/pixelmix_bold.ttf" id="2"]
[ext_resource type="Script" path="res://scripts/Console.gd" id="3"]
[sub_resource type="FontFile" id=1]
size = 48
font_data = ExtResource( 2 )
[sub_resource type="GDScript" id=2]
script/source = "extends ColorRect
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
# Called when the node enters the scene tree for the first time.
func _ready():
show()
fade_in()
pass # Replace with function body.
const VICTORY_SCREEN = \"res://Nodes/Victory.tscn\"
var progress = 255
var fade_timer
const FADE_SPEED = 0.0125
const FADE_RATE = 8
func fade_in():
modulate.a = progress/255.0
if progress > 0:
progress -= FADE_RATE
if(!fade_timer):
fade_timer = Timer.new()
add_child(fade_timer)
fade_timer.connect(\"timeout\",Callable(self,\"fade_in\"))
fade_timer.start(FADE_SPEED)
else:
fade_timer.queue_free()
var prog_two = 0
func fade_out():
modulate.a = prog_two/255.0
if prog_two < 255:
prog_two += FADE_RATE
if(!fade_timer):
fade_timer = Timer.new()
add_child(fade_timer)
fade_timer.connect(\"timeout\",Callable(self,\"fade_out\"))
fade_timer.start(FADE_SPEED)
else:
fade_timer.queue_free()"
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
theme = ExtResource( 1 )
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Control" type="Control" parent="CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
theme = ExtResource( 1 )
[node name="Level Complete" type="Label" parent="CanvasLayer/Control"]
offset_left = 20.0
offset_top = 15.0
offset_right = 691.0
offset_bottom = 88.0
custom_fonts/font = SubResource( 1 )
custom_colors/font_color = Color( 0.6, 0.898039, 0.313726, 1 )
text = "LEVEL COMPLETE!"
[node name="Console" type="Control" parent="CanvasLayer/Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 3 )
[node name="Display" type="Label" parent="CanvasLayer/Control/Console"]
offset_left = 20.0
offset_top = 70.0
offset_right = 550.0
offset_bottom = 480.0
custom_colors/font_color = Color( 0.6, 0.898039, 0.313726, 1 )
text = "Running debugger...
Debugging complete!"
[node name="Buttons" type="HBoxContainer" parent="CanvasLayer/Control/Console"]
offset_left = 20.0
offset_top = 480.0
offset_right = 550.0
offset_bottom = 520.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Button2" type="Button" parent="CanvasLayer/Control/Console/Buttons"]
offset_left = 241.0
offset_right = 289.0
offset_bottom = 40.0
text = "Test"
[node name="ColorRect" type="ColorRect" parent="CanvasLayer/Control/Console"]
offset_left = 20.0
offset_top = 475.0
offset_right = 550.0
offset_bottom = 485.0
scale = Vector2( 1, 0.5 )
color = Color( 0.6, 0.898039, 0.313726, 1 )
[node name="FadeRect" type="ColorRect" parent="CanvasLayer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 0, 0, 0, 1 )
script = SubResource( 2 )

17
nodes/equipment/Line2D.gd Normal file
View File

@ -0,0 +1,17 @@
extends Line2D
var target
var point
@export var targetPath: NodePath
@export var trailLength = 0
func _ready():
target = get_node(targetPath)
func _process(_delta: float) -> void:
global_position = Vector2(0,0)
global_rotation = 0
point = target.global_position
add_point(point)
while get_point_count() > trailLength:
remove_point(0)

View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://d2q155626ggba"]
[ext_resource type="Texture2D" uid="uid://dvgpurvjnvtea" path="res://assets/art/player_arms.png" id="1_amahe"]
[node name="Arms" type="Node2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_amahe")

View File

@ -0,0 +1,46 @@
[gd_scene load_steps=4 format=3 uid="uid://bx6o3cvmmpboe"]
[ext_resource type="Script" path="res://scripts/equipment/pistol.gd" id="1_a74on"]
[ext_resource type="PackedScene" uid="uid://ljnxxvv8n4ho" path="res://nodes/projectiles/pistol_bullet.tscn" id="2_suef3"]
[ext_resource type="Texture2D" uid="uid://68bhqeovy8xl" path="res://assets/art/equipment/pistol/pistol.png" id="2_vtqpk"]
[node name="Pistol" type="Node2D" node_paths=PackedStringArray("left_arm", "right_arm", "origin", "bullet_spawning_point", "pistol_handle", "sprite", "sheath_point")]
rotation = 0.00217739
script = ExtResource("1_a74on")
bullet = ExtResource("2_suef3")
left_arm = NodePath("LeftArmLine2D")
right_arm = NodePath("RightArmLine2D")
origin = NodePath("Origin")
bullet_spawning_point = NodePath("Origin/Handle/BulletSpawner")
pistol_handle = NodePath("Origin/Handle")
sprite = NodePath("Origin/Handle/Sprite2D")
sheath_point = NodePath("SheathPos")
auto_z_index = false
[node name="Origin" type="Node2D" parent="."]
[node name="Handle" type="Node2D" parent="Origin"]
position = Vector2(3.99999, -0.00870954)
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="Origin/Handle"]
texture_filter = 1
position = Vector2(0.5, -0.5)
texture = ExtResource("2_vtqpk")
[node name="BulletSpawner" type="Node2D" parent="Origin/Handle"]
position = Vector2(3, -1)
[node name="LeftArmLine2D" type="Line2D" parent="."]
points = PackedVector2Array(-2.5, 0, 3.5, 1)
width = 1.0
default_color = Color(0.6, 0.898039, 0.313726, 1)
[node name="RightArmLine2D" type="Line2D" parent="."]
points = PackedVector2Array(2.5, 0, 3.5, 1)
width = 1.0
default_color = Color(0.6, 0.898039, 0.313726, 1)
[node name="SheathPos" type="Node2D" parent="."]
position = Vector2(-6, 3)
rotation = 1.5708

173
nodes/equipment/saber.tscn Normal file
View File

@ -0,0 +1,173 @@
[gd_scene load_steps=12 format=3 uid="uid://djxjod3bnqdq6"]
[ext_resource type="Script" path="res://scripts/equipment/saber.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://2qvbod1l4s0q" path="res://assets/art/equipment/katana/katana_equipment.png" id="2_xtivd"]
[ext_resource type="AudioStream" uid="uid://3f8vhhml15h" path="res://assets/sound/Cancel2.wav" id="5_1dip1"]
[ext_resource type="Texture2D" uid="uid://ceqv31vnvglcm" path="res://assets/art/trail.png" id="17_kab6p"]
[ext_resource type="Script" path="res://nodes/equipment/Line2D.gd" id="18"]
[sub_resource type="CapsuleShape2D" id="2"]
radius = 32.0
height = 96.0
[sub_resource type="Animation" id="Animation_dbnl7"]
resource_name = "idle"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D/Area2D:monitoring")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_toqbl"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D/Area2D:monitoring")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_s6hcs"]
resource_name = "attack"
length = 0.5
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0, 0, 0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 2, -0.25, 0, 0.25, 0, 3, -0.25, 0, 0.25, 0, 4, -0.25, 0, 0.25, 0, 5, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5)
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D/Area2D:monitoring")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
tracks/2/type = "audio"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer2D")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("5_1dip1")
}],
"times": PackedFloat32Array(0.3)
}
[sub_resource type="Animation" id="Animation_qbfwu"]
resource_name = "sheathed"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_77vfc"]
_data = {
"RESET": SubResource("Animation_toqbl"),
"attack": SubResource("Animation_s6hcs"),
"idle": SubResource("Animation_dbnl7"),
"sheathed": SubResource("Animation_qbfwu")
}
[node name="Arms" type="Node2D" node_paths=PackedStringArray("animation_player", "area")]
script = ExtResource("1")
animation_player = NodePath("AnimationPlayer")
area = NodePath("Sprite2D/Area2D")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("2_xtivd")
hframes = 7
metadata/_edit_group_ = true
[node name="Line2D" type="Line2D" parent="Sprite2D"]
visible = false
z_index = -10
z_as_relative = false
points = PackedVector2Array(27.1471, 15.6522)
default_color = Color(0.596078, 0.596078, 0.596078, 0.65098)
texture = ExtResource("17_kab6p")
texture_mode = 2
script = ExtResource("18")
targetPath = NodePath("..")
trailLength = 8
[node name="Area2D" type="Area2D" parent="Sprite2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite2D/Area2D"]
position = Vector2(24, -8)
rotation = 1.5708
scale = Vector2(0.5, 0.5)
shape = SubResource("2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_speed = 2.0
libraries = {
"": SubResource("AnimationLibrary_77vfc")
}
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_1dip1")
volume_db = -16.0
bus = &"Sound Effects"

39
nodes/exit.tscn Normal file
View File

@ -0,0 +1,39 @@
[gd_scene load_steps=9 format=3]
[ext_resource type="Script" path="res://scripts/Exit.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://mn17ql7wilx3" path="res://assets/art/Exit/Exit1.png" id="2"]
[ext_resource type="Texture2D" uid="uid://ca3q21m0btdrl" path="res://assets/art/Exit/Exit2.png" id="3"]
[ext_resource type="Texture2D" uid="uid://cbft4yscrmjw5" path="res://assets/art/Exit/Exit3.png" id="4"]
[ext_resource type="Texture2D" uid="uid://8nubee34g3bl" path="res://assets/art/Exit/Exit4.png" id="5"]
[ext_resource type="Texture2D" uid="uid://df3auvg5myvws" path="res://assets/art/light.png" id="6"]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "default",
"speed": 12.0
} ]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 7.00912, 7.45768 )
[node name="Exit" type="Node2D"]
script = ExtResource( 1 )
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
z_index = -1
frames = SubResource( 1 )
frame = 2
playing = true
[node name="Area2D" type="Area2D" parent="."]
editor/display_folded = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 0, 0.5 )
shape = SubResource( 2 )
[node name="PointLight2D" type="PointLight2D" parent="."]
texture = ExtResource( 6 )
color = Color( 0.486275, 1, 0.25098, 1 )

58
nodes/gui.tscn Normal file
View File

@ -0,0 +1,58 @@
[gd_scene load_steps=4 format=3 uid="uid://btdd2g3e7uk1e"]
[ext_resource type="Theme" uid="uid://x4at2pluavto" path="res://general_theme.tres" id="1_mehkg"]
[ext_resource type="Texture2D" uid="uid://byvaevohjdunq" path="res://assets/art/cornerGUI.png" id="2_v0myb"]
[ext_resource type="Texture2D" uid="uid://taaths18mmx0" path="res://assets/art/pickup-outline.png" id="3_1wjbg"]
[node name="GUI" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_mehkg")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 0
anchor_right = 1.0
offset_right = -904.0
offset_bottom = 31.0
texture = ExtResource("2_v0myb")
expand_mode = 1
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_left = 36.4586
offset_top = 11.069
offset_right = 160.459
offset_bottom = 42.069
text = "0"
clip_text = true
[node name="TextureRect2" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 13.7422
offset_top = 16.7484
offset_right = 33.7422
offset_bottom = 36.7484
texture = ExtResource("3_1wjbg")
expand_mode = 1
[node name="Healthbar" type="ProgressBar" parent="."]
layout_mode = 0
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -92.5
offset_top = -50.0
offset_right = 92.5
offset_bottom = -14.0
step = 1.0
value = 100.0
[node name="SlideRect" type="ColorRect" parent="."]
layout_mode = 0
anchor_right = 1.0
color = Color(0, 0, 0, 1)

31
nodes/jump_platform.tscn Normal file
View File

@ -0,0 +1,31 @@
[gd_scene load_steps=9 format=3]
[ext_resource type="Texture2D" uid="uid://rig2dboor6s7" path="res://assets/art/jump_platform1.png" id="1"]
[ext_resource type="Texture2D" uid="uid://diphwlslm0iy1" path="res://assets/art/jump_platform2.png" id="2"]
[ext_resource type="Texture2D" uid="uid://dwwvlvt4r5hed" path="res://assets/art/jump_platform3.png" id="3"]
[ext_resource type="Texture2D" uid="uid://b3ttt5vljp022" path="res://assets/art/jump_platform4.png" id="4"]
[ext_resource type="Texture2D" uid="uid://d0e3kf30cvhyy" path="res://assets/art/jump_platform5.png" id="5"]
[ext_resource type="Texture2D" uid="uid://vcpivylpa36o" path="res://assets/art/jump_platform6.png" id="6"]
[ext_resource type="Script" path="res://scripts/destroy_after_animation.gd" id="7"]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 1 ), ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ) ],
"loop": false,
"name": "spawn",
"speed": 10.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 2 ), ExtResource( 1 ) ],
"loop": false,
"name": "destroy",
"speed": 20.0
} ]
[node name="Platform" type="Node2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
frames = SubResource( 1 )
animation = "spawn"
frame = 5
playing = true
script = ExtResource( 7 )

14
nodes/light.tscn Normal file
View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Texture2D" uid="uid://ceaml5a56mbes" path="res://assets/art/basic_light.png" id="1"]
[ext_resource type="Texture2D" uid="uid://df3auvg5myvws" path="res://assets/art/light.png" id="2"]
[node name="Light3D" type="Node2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource( 1 )
[node name="PointLight2D" type="PointLight2D" parent="."]
position = Vector2( 0, -2 )
texture = ExtResource( 2 )
texture_scale = 1.5

43
nodes/pickup.tscn Normal file
View File

@ -0,0 +1,43 @@
[gd_scene load_steps=7 format=3]
[ext_resource type="Script" path="res://scripts/pickup.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://nw1eg7vb3df6" path="res://assets/art/pickup1.png" id="2"]
[ext_resource type="Texture2D" uid="uid://ibtidhnw6mnj" path="res://assets/art/pickup2.png" id="3"]
[sub_resource type="GDScript" id=1]
script/source = "extends Area2D
func _ready():
connect(\"body_entered\",Callable(self,\"_collide\"))
func _collide(body):
if body.has_method(\"pickupCoin\"):
body.pickupCoin()
queue_free()"
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 6, 6 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[node name="Pickup" type="Node2D"]
script = ExtResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
gravity = 0.0
angular_damp = 0.0
script = SubResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 2 )
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Area2D/CollisionShape2D"]
frames = SubResource( 3 )
frame = 1
playing = true

124
nodes/player.tscn Normal file
View File

@ -0,0 +1,124 @@
[gd_scene load_steps=19 format=3 uid="uid://de3exlu8jniam"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_5wuh1"]
[ext_resource type="PackedScene" path="res://nodes/jump_platform.tscn" id="2_2rooy"]
[ext_resource type="AudioStream" uid="uid://e1gdx6vyd2d" path="res://assets/sound/Hero_Hurt.wav" id="3_lh4fm"]
[ext_resource type="Texture2D" uid="uid://bbvwnbdi7c73q" path="res://assets/art/player_idle1.png" id="3_ysyyu"]
[ext_resource type="AudioStream" uid="uid://ctrvdk7xy30xe" path="res://assets/sound/Sword2.wav" id="4_1lxuw"]
[ext_resource type="Texture2D" uid="uid://7g8omiygjov6" path="res://assets/art/player_idle2.png" id="4_585xo"]
[ext_resource type="Texture2D" uid="uid://shmqt4muytce" path="res://assets/art/player_jump.png" id="5_6hboq"]
[ext_resource type="Texture2D" uid="uid://jefgte85r5ef" path="res://assets/art/player_walk1.png" id="6_k4y2d"]
[ext_resource type="Texture2D" uid="uid://6p070flkv03q" path="res://assets/art/player_walk2.png" id="7_4r16g"]
[ext_resource type="Script" path="res://scripts/player_animation.gd" id="8_cni8a"]
[ext_resource type="Texture2D" uid="uid://bdx6qdcgai31i" path="res://assets/art/player_walk3.png" id="8_whu83"]
[ext_resource type="Texture2D" uid="uid://dvgpurvjnvtea" path="res://assets/art/player_arms.png" id="13_60wnm"]
[sub_resource type="CapsuleShape2D" id="2"]
radius = 4.0
height = 15.0
[sub_resource type="Animation" id="Animation_ofhi2"]
resource_name = "idle"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [ExtResource("3_ysyyu"), ExtResource("4_585xo")]
}
[sub_resource type="Animation" id="Animation_jp12d"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_ysyyu")]
}
[sub_resource type="Animation" id="Animation_pjs8v"]
resource_name = "walk"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("6_k4y2d"), ExtResource("7_4r16g"), ExtResource("8_whu83")]
}
[sub_resource type="Animation" id="Animation_7msof"]
resource_name = "jump"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("5_6hboq")]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6ihh4"]
_data = {
"RESET": SubResource("Animation_jp12d"),
"idle": SubResource("Animation_ofhi2"),
"jump": SubResource("Animation_7msof"),
"walk": SubResource("Animation_pjs8v")
}
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("animation_player", "arms_sprite", "equipment_node")]
script = ExtResource("1_5wuh1")
jump_platform = ExtResource("2_2rooy")
animation_player = NodePath("AnimationPlayer")
arms_sprite = NodePath("ArmsSprite2D")
damage_sound = ExtResource("3_lh4fm")
sword_sound = ExtResource("4_1lxuw")
equipment_dir = "res://nodes/equipment"
equipment_node = NodePath("Equipment")
[node name="Camera2D" type="Camera2D" parent="."]
current = true
zoom = Vector2(2, 2)
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("3_ysyyu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("2")
[node name="Equipment" type="Node2D" parent="."]
[node name="ArmsSprite2D" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("13_60wnm")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." node_paths=PackedStringArray("sprite")]
libraries = {
"": SubResource("AnimationLibrary_6ihh4")
}
script = ExtResource("8_cni8a")
sprite = NodePath("../Sprite2D")

View File

@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=3 uid="uid://ljnxxvv8n4ho"]
[ext_resource type="Texture2D" uid="uid://cslxomqr84gra" path="res://assets/art/equipment/pistol/pistol_bullet.png" id="1_faw2g"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_h4vu7"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dooh7"]
size = Vector2(2, 1)
[node name="bullet" type="Area2D"]
script = ExtResource("1_h4vu7")
[node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(0, 0, 0, 1)
texture_filter = 1
texture = ExtResource("1_faw2g")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_dooh7")

62
nodes/ui_game_over.tscn Normal file
View File

@ -0,0 +1,62 @@
[gd_scene load_steps=3 format=3 uid="uid://campy0ltqj64h"]
[ext_resource type="Theme" uid="uid://x4at2pluavto" path="res://general_theme.tres" id="1_ryqd1"]
[sub_resource type="GDScript" id="8"]
script/source = "extends Button
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
# Called when the node enters the scene tree for the first time.
func _ready():
connect(\"button_down\",Callable(self,\"on_button\"))
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func on_button():
get_tree().change_scene_to_file(\"res://Nodes/Title.tscn\")
"
[node name="GameOver" type="Control"]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_ryqd1")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
color = Color(0, 0, 0, 0.352941)
[node name="Label" type="Label" parent="."]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -227.5
offset_top = -50.0
offset_right = 227.5
offset_bottom = 50.0
text = "Unit Lost..."
[node name="MainMenu" type="Button" parent="."]
layout_mode = 0
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -82.5
offset_top = -80.0
offset_right = 82.5
offset_bottom = -40.0
text = "Main Menu"
script = SubResource("8")