Commit of existing data.

This commit is contained in:
2025-06-22 23:22:32 -06:00
commit 1bbd8c812f
208 changed files with 6327 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
class_name DoorZone
extends Area2D
@export_category("Outgoing")
@export_file("*.tscn") var TargetRoomPath: String
@export var TargetDoor: String
@export var PreserveX: bool = false
@export var PreserveY: bool = false
@export var PreserveVelocity: bool = false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func _on_body_entered(body: Node2D) -> void:
if body is Player:
if self.name == global.player_target:
return
var offset := Vector2(0., 0.);
if PreserveX:
offset.x = body.position.x - self.position.x
if PreserveY:
offset.y = body.position.y - self.position.y
global.player_offset = offset
global.player_velocity = Vector2(0., 0.)
if PreserveVelocity:
global.player_velocity = body.velocity
global.player_target = TargetDoor
global.goto_scene(load(TargetRoomPath))
func _on_body_exited(body: Node2D) -> void:
global.player_target = ""
+1
View File
@@ -0,0 +1 @@
uid://c027jkwb3uac4
+8
View File
@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://dh5xmwhdwobev"]
[ext_resource type="Script" uid="uid://c027jkwb3uac4" path="res://objects/door_zone.gd" id="1_cm4xy"]
[node name="DoorZone" type="Area2D"]
script = ExtResource("1_cm4xy")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cs262sxemhpum"
path="res://.godot/imported/jump_dust.png-341779febee3ef098cb2627403b1ea29.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://objects/fx/jump_dust.png"
dest_files=["res://.godot/imported/jump_dust.png-341779febee3ef098cb2627403b1ea29.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
+63
View File
@@ -0,0 +1,63 @@
[gd_scene load_steps=10 format=3 uid="uid://c4h1cj75b5sry"]
[ext_resource type="Texture2D" uid="uid://cs262sxemhpum" path="res://objects/fx/jump_dust.png" id="1_aj8qq"]
[ext_resource type="Script" uid="uid://dgo1wtjored0j" path="res://scripts/dust_particle.gd" id="2_d1aoh"]
[sub_resource type="AtlasTexture" id="AtlasTexture_71pl7"]
atlas = ExtResource("1_aj8qq")
region = Rect2(0, 0, 23, 22)
[sub_resource type="AtlasTexture" id="AtlasTexture_kwppy"]
atlas = ExtResource("1_aj8qq")
region = Rect2(23, 0, 23, 22)
[sub_resource type="AtlasTexture" id="AtlasTexture_h54gx"]
atlas = ExtResource("1_aj8qq")
region = Rect2(46, 0, 23, 22)
[sub_resource type="AtlasTexture" id="AtlasTexture_5nx71"]
atlas = ExtResource("1_aj8qq")
region = Rect2(69, 0, 23, 22)
[sub_resource type="AtlasTexture" id="AtlasTexture_ifxkf"]
atlas = ExtResource("1_aj8qq")
region = Rect2(92, 0, 23, 22)
[sub_resource type="AtlasTexture" id="AtlasTexture_0eeae"]
atlas = ExtResource("1_aj8qq")
region = Rect2(115, 0, 23, 22)
[sub_resource type="SpriteFrames" id="SpriteFrames_dyqnt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_71pl7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kwppy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h54gx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5nx71")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ifxkf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0eeae")
}],
"loop": false,
"name": &"default",
"speed": 24.0
}]
[node name="JumpDust" type="AnimatedSprite2D"]
sprite_frames = SubResource("SpriteFrames_dyqnt")
autoplay = "default"
frame_progress = 1.0
offset = Vector2(0, -9)
script = ExtResource("2_d1aoh")
[connection signal="animation_finished" from="." to="." method="_on_animation_finished"]
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkyfo8335hwnv"
path="res://.godot/imported/roll_dust.png-f921e62c1104c1a75294133942b0d92b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://objects/fx/roll_dust.png"
dest_files=["res://.godot/imported/roll_dust.png-f921e62c1104c1a75294133942b0d92b.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
+77
View File
@@ -0,0 +1,77 @@
[gd_scene load_steps=12 format=3 uid="uid://botc600n5fcgt"]
[ext_resource type="Texture2D" uid="uid://dkyfo8335hwnv" path="res://objects/fx/roll_dust.png" id="1_ocmkx"]
[ext_resource type="Script" uid="uid://dgo1wtjored0j" path="res://scripts/dust_particle.gd" id="2_ny4y2"]
[sub_resource type="AtlasTexture" id="AtlasTexture_j223t"]
atlas = ExtResource("1_ocmkx")
region = Rect2(0, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_15ql1"]
atlas = ExtResource("1_ocmkx")
region = Rect2(38, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_byoxk"]
atlas = ExtResource("1_ocmkx")
region = Rect2(76, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_m3d4f"]
atlas = ExtResource("1_ocmkx")
region = Rect2(114, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_6nm25"]
atlas = ExtResource("1_ocmkx")
region = Rect2(152, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_tqo4n"]
atlas = ExtResource("1_ocmkx")
region = Rect2(190, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_ur0hm"]
atlas = ExtResource("1_ocmkx")
region = Rect2(228, 0, 38, 39)
[sub_resource type="AtlasTexture" id="AtlasTexture_uuuyy"]
atlas = ExtResource("1_ocmkx")
region = Rect2(266, 0, 38, 39)
[sub_resource type="SpriteFrames" id="SpriteFrames_dyqnt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j223t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_15ql1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_byoxk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m3d4f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6nm25")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tqo4n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ur0hm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uuuyy")
}],
"loop": false,
"name": &"default",
"speed": 24.0
}]
[node name="RollDust" type="AnimatedSprite2D"]
sprite_frames = SubResource("SpriteFrames_dyqnt")
autoplay = "default"
frame_progress = 1.0
offset = Vector2(0, -9)
script = ExtResource("2_ny4y2")
[connection signal="animation_finished" from="." to="." method="_on_animation_finished"]
+26
View File
@@ -0,0 +1,26 @@
class_name Zombie
extends CharacterBody2D
const SPEED = 300.0
const JUMP_VELOCITY = -400.0
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction := Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
move_and_slide()
+1
View File
@@ -0,0 +1 @@
uid://bw8t7n771m0b4
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8v7mt7kbv7k5"
path="res://.godot/imported/zombie.png-cd8c3c30f31f1b01ad0e7564be92c691.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://objects/npcs/zombie.png"
dest_files=["res://.godot/imported/zombie.png-cd8c3c30f31f1b01ad0e7564be92c691.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
+203
View File
@@ -0,0 +1,203 @@
[gd_scene load_steps=28 format=3 uid="uid://enj7slqj7o2o"]
[ext_resource type="Texture2D" uid="uid://c8v7mt7kbv7k5" path="res://objects/npcs/zombie.png" id="1_8psf6"]
[ext_resource type="Script" uid="uid://bw8t7n771m0b4" path="res://objects/npcs/zombie.gd" id="1_qml1x"]
[ext_resource type="Script" uid="uid://bsveyr6o3li86" path="res://objects/npcs/zombie_sprite.gd" id="3_8bxsl"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qml1x"]
atlas = ExtResource("1_8psf6")
region = Rect2(0, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_8bxsl"]
atlas = ExtResource("1_8psf6")
region = Rect2(52, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_nyp6s"]
atlas = ExtResource("1_8psf6")
region = Rect2(104, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_knvin"]
atlas = ExtResource("1_8psf6")
region = Rect2(156, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_0k1nj"]
atlas = ExtResource("1_8psf6")
region = Rect2(208, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_4k8tf"]
atlas = ExtResource("1_8psf6")
region = Rect2(260, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_fljd2"]
atlas = ExtResource("1_8psf6")
region = Rect2(312, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_hci6t"]
atlas = ExtResource("1_8psf6")
region = Rect2(364, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_apr15"]
atlas = ExtResource("1_8psf6")
region = Rect2(416, 122, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_gigwc"]
atlas = ExtResource("1_8psf6")
region = Rect2(0, 0, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_5qsks"]
atlas = ExtResource("1_8psf6")
region = Rect2(52, 0, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_ys0de"]
atlas = ExtResource("1_8psf6")
region = Rect2(0, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_kni6o"]
atlas = ExtResource("1_8psf6")
region = Rect2(52, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_8lesc"]
atlas = ExtResource("1_8psf6")
region = Rect2(104, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_ai73t"]
atlas = ExtResource("1_8psf6")
region = Rect2(156, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_hmrhp"]
atlas = ExtResource("1_8psf6")
region = Rect2(208, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_reymy"]
atlas = ExtResource("1_8psf6")
region = Rect2(260, 183, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_wifnu"]
atlas = ExtResource("1_8psf6")
region = Rect2(0, 61, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_frsw6"]
atlas = ExtResource("1_8psf6")
region = Rect2(52, 61, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_8n4lj"]
atlas = ExtResource("1_8psf6")
region = Rect2(104, 61, 52, 61)
[sub_resource type="AtlasTexture" id="AtlasTexture_sqw4r"]
atlas = ExtResource("1_8psf6")
region = Rect2(156, 61, 52, 61)
[sub_resource type="SpriteFrames" id="SpriteFrames_4jgel"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qml1x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8bxsl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nyp6s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_knvin")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0k1nj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4k8tf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fljd2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hci6t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_apr15")
}],
"loop": false,
"name": &"attack",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gigwc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5qsks")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ys0de")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kni6o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8lesc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ai73t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hmrhp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_reymy")
}],
"loop": false,
"name": &"die",
"speed": 24.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wifnu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_frsw6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8n4lj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sqw4r")
}],
"loop": true,
"name": &"walk",
"speed": 6.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8psf6"]
radius = 6.0
height = 24.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8bxsl"]
size = Vector2(8, 13)
[node name="Zombie" type="CharacterBody2D"]
script = ExtResource("1_qml1x")
[node name="Sprite" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -10.5)
sprite_frames = SubResource("SpriteFrames_4jgel")
animation = &"attack"
frame = 5
script = ExtResource("3_8bxsl")
[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2(0, -12)
shape = SubResource("CapsuleShape2D_8psf6")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionAttack" type="CollisionShape2D" parent="Area2D"]
position = Vector2(10, -11.5)
shape = SubResource("RectangleShape2D_8bxsl")
debug_color = Color(0.9942227, 0, 0.23271917, 0.41960785)
+11
View File
@@ -0,0 +1,11 @@
extends AnimatedSprite2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+1
View File
@@ -0,0 +1 @@
uid://bsveyr6o3li86
+152
View File
@@ -0,0 +1,152 @@
class_name Player
extends CharacterBody2D
@onready var sprite := $Sprite as AnimatedSprite2D
@onready var audio_player := $AudioPlayer as AudioStreamPlayer
signal state_change(old: States, new: States)
enum States {IDLE, RUN_START, RUN, ROLL, JUMP_START, JUMP, FALL, LAND, DAMAGE, RAGDOLL, BOUNCE, LAY, SHOOT, JAB, STRAIGHT, KICK, POUND}
const STATES_IMMOBILE = [States.ROLL, States.DAMAGE, States.RAGDOLL, States.BOUNCE, States.LAY, States.SHOOT, States.JAB, States.STRAIGHT, States.KICK, States.POUND]
const STATES_AIRBORNE = [States.JUMP_START, States.JUMP, States.FALL]
const ROLL_DUST = preload("uid://botc600n5fcgt")
const JUMP_DUST = preload("uid://c4h1cj75b5sry")
const JUMP_SOUND = preload("uid://d1hwunwdel6sy")
const HIT_GROUND = preload("uid://ciglwfq0vua8i")
const SPEED = 90.0
const ACCEL = 450
const JUMP_VELOCITY = -312.0
const ROLL_VELOCITY = 150.0
const ROLL_DECEL = 1080
# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var state: States = States.IDLE: set = _set_state
var direction: float
var grounded: bool
var running: bool
var rolling: bool
var ragdoll: bool
var bounce: bool
var lay: bool
var shooting: bool
var melee: bool
func _set_state(s: States):
state_change.emit(state, s)
state = s
func _process(_delta: float) -> void:
$State.text = States.keys()[state]
func _physics_process(delta):
# Add the gravity.
if not is_on_floor():
velocity.y += gravity * delta
# Jumping
if state not in STATES_IMMOBILE and state not in STATES_AIRBORNE and Input.is_action_just_pressed("jump") and is_on_floor():
state = States.JUMP_START
audio_player.stream = JUMP_SOUND
audio_player.play()
var jump_dust = JUMP_DUST.instantiate()
jump_dust.position = position
add_sibling(jump_dust)
velocity.y = JUMP_VELOCITY
# Short hops
if Input.is_action_just_released("jump") && !is_on_floor():
velocity.y = velocity.y / 2
# Falling
if state not in [States.ROLL, States.RAGDOLL, States.BOUNCE] and velocity.y > 0:
state = States.FALL
if state in [States.FALL] and is_zero_approx(velocity.y):
if direction:
state = States.RUN
else:
state = States.LAND
# Rolls
if state not in STATES_IMMOBILE and state != States.ROLL and \
(Input.is_action_just_pressed("roll_jump") or Input.is_action_just_pressed("roll")):
state = States.ROLL
if is_on_floor():
var roll_dust = ROLL_DUST.instantiate()
roll_dust.position = position
roll_dust.flip_h = !sprite.flip_h
add_sibling(roll_dust)
if !sprite.flip_h:
velocity.x = ROLL_VELOCITY
else:
velocity.x = -ROLL_VELOCITY
if velocity.y >= 0 && Input.is_action_just_pressed("roll_jump"):
velocity.y = -120
# Melee
if state not in STATES_IMMOBILE and Input.is_action_just_pressed("melee"):
state = States.MELEE
if Input.is_action_pressed("roll"):
# Pound
pass
# Shooting
if state not in STATES_IMMOBILE and Input.is_action_just_pressed("shoot"):
state = States.SHOOT
match global.save.projectile:
global.save.Projectile.BLAST:
pass
# Ragdoll
if state not in [States.RAGDOLL, States.BOUNCE, States.LAY] and Input.is_action_just_pressed("ragdoll"):
state = States.RAGDOLL
if state in [States.RAGDOLL] and is_on_floor():
state = States.BOUNCE
var roll_dust = ROLL_DUST.instantiate()
roll_dust.position = position
roll_dust.flip_h = !sprite.flip_h
add_sibling(roll_dust)
velocity.y = -120
audio_player.stream = HIT_GROUND
audio_player.play()
if state in [States.BOUNCE] and is_on_floor() and velocity.y >= 0:
state = States.LAY
audio_player.stream = HIT_GROUND
audio_player.play()
if state in [States.LAY] and is_on_floor():
velocity.x = move_toward(velocity.x, 0, ACCEL * delta)
# Overall physics
direction = Input.get_axis("move_left", "move_right")
if state == States.ROLL and sprite.frame > 7:
# Slow down if in the later roll frames.
velocity.x = move_toward(velocity.x, 0, ROLL_DECEL * delta)
elif state not in [States.ROLL, States.DAMAGE, States.RAGDOLL, States.BOUNCE, States.LAY, States.SHOOT, States.MELEE]:
# Apply velocity changes if not in a restricted movement state.
velocity.x = move_toward(velocity.x, direction * SPEED, ACCEL * delta)
if direction:
if state not in [States.JUMP_START, States.JUMP, States.FALL, States.RUN_START, States.RUN]:
state = States.RUN_START
else:
if state not in [States.JUMP_START, States.JUMP, States.FALL, States.LAND]:
state = States.IDLE
move_and_slide()
+1
View File
@@ -0,0 +1 @@
uid://drpdjfp0o7bbv
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci24lybfsaxd0"
path="res://.godot/imported/player.png-ce2a37186354540f2edbb662bd1e85b2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://objects/player.png"
dest_files=["res://.godot/imported/player.png-ce2a37186354540f2edbb662bd1e85b2.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
+693
View File
@@ -0,0 +1,693 @@
[gd_scene load_steps=88 format=3 uid="uid://2f3x4fcr0os6"]
[ext_resource type="Texture2D" uid="uid://ci24lybfsaxd0" path="res://objects/player.png" id="1_2mhpo"]
[ext_resource type="Script" uid="uid://drpdjfp0o7bbv" path="res://objects/player.gd" id="1_c7kgv"]
[ext_resource type="Script" uid="uid://e6q7q0ljb34u" path="res://scripts/state_collision.gd" id="1_uxov2"]
[ext_resource type="Script" uid="uid://cgeaq15vi0bnd" path="res://objects/player_sprite.gd" id="3_uxov2"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ykyjo"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_uxov2"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_nmc1l"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_f46kd"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_3rerk"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_i825w"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_3rfka"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 602, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_i8sra"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_4vq5b"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_3nfmf"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_42cpl"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_vqq2l"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_r673r"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_mqnmn"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_5esnd"]
atlas = ExtResource("1_2mhpo")
region = Rect2(245, 344, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_w1o2u"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 0, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_s4hvt"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 0, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_2sux5"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 0, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_iqfnf"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 0, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_bhqug"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 258, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_cyhxw"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_wq66c"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_183dw"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_nflk0"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_uqwil"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_ggel1"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_d8ffw"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 473, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_2ve04"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 215, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_0rhe2"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 172, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_6ypbn"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_7rsoo"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_lywsn"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_cvk82"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_77i28"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_mle5l"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_i4kk0"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_s854h"]
atlas = ExtResource("1_2mhpo")
region = Rect2(245, 387, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_tj211"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 301, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_kqdjh"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 301, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_a5pfi"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 301, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_f2hc5"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 430, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_sktdc"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_ghhh6"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_dibtv"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_d4anp"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_ct16p"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_arub5"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_4g3oa"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 559, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_r7a5p"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_kmthn"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_775wt"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_dsdn8"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_q7t1j"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_f0f2d"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_jxo55"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_jilkr"]
atlas = ExtResource("1_2mhpo")
region = Rect2(245, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_uyug2"]
atlas = ExtResource("1_2mhpo")
region = Rect2(280, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_4jwck"]
atlas = ExtResource("1_2mhpo")
region = Rect2(315, 129, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_07yoj"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_fhocf"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_78ho2"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_8ch2p"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_f4byu"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_b5c7i"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_evbvi"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_ye2nl"]
atlas = ExtResource("1_2mhpo")
region = Rect2(245, 86, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_l3yn6"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_1crfk"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_7lcwi"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_g8y8i"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_bb8rj"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_il2j7"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 43, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_p2pxn"]
atlas = ExtResource("1_2mhpo")
region = Rect2(0, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_e728x"]
atlas = ExtResource("1_2mhpo")
region = Rect2(35, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_wmx0i"]
atlas = ExtResource("1_2mhpo")
region = Rect2(70, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_llth5"]
atlas = ExtResource("1_2mhpo")
region = Rect2(105, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_4wu0g"]
atlas = ExtResource("1_2mhpo")
region = Rect2(140, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_isejg"]
atlas = ExtResource("1_2mhpo")
region = Rect2(175, 516, 35, 43)
[sub_resource type="AtlasTexture" id="AtlasTexture_cebk3"]
atlas = ExtResource("1_2mhpo")
region = Rect2(210, 516, 35, 43)
[sub_resource type="SpriteFrames" id="SpriteFrames_blchw"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykyjo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uxov2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nmc1l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f46kd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3rerk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i825w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3rfka")
}],
"loop": false,
"name": &"air_kick",
"speed": 24.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_i8sra")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4vq5b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3nfmf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_42cpl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vqq2l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r673r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mqnmn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5esnd")
}],
"loop": false,
"name": &"damage",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_w1o2u")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s4hvt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2sux5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_iqfnf")
}],
"loop": true,
"name": &"default",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_bhqug")
}],
"loop": false,
"name": &"fall",
"speed": 1.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_cyhxw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wq66c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_183dw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nflk0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uqwil")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ggel1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d8ffw")
}],
"loop": false,
"name": &"jab",
"speed": 36.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2ve04")
}],
"loop": false,
"name": &"jump",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_0rhe2")
}],
"loop": false,
"name": &"jump_start",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6ypbn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7rsoo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lywsn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cvk82")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_77i28")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mle5l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i4kk0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s854h")
}],
"loop": false,
"name": &"knockdown",
"speed": 18.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_tj211")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kqdjh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a5pfi")
}],
"loop": false,
"name": &"land",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_f2hc5")
}],
"loop": false,
"name": &"lay",
"speed": 0.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_sktdc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ghhh6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dibtv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d4anp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ct16p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_arub5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4g3oa")
}],
"loop": false,
"name": &"pound",
"speed": 18.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_r7a5p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kmthn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_775wt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dsdn8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_q7t1j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f0f2d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jxo55")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jilkr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uyug2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4jwck")
}],
"loop": false,
"name": &"roll",
"speed": 18.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_07yoj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fhocf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_78ho2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8ch2p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f4byu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b5c7i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_evbvi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ye2nl")
}],
"loop": true,
"name": &"run",
"speed": 15.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l3yn6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1crfk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7lcwi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_g8y8i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bb8rj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_il2j7")
}],
"loop": false,
"name": &"run_start",
"speed": 18.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_p2pxn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e728x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wmx0i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_llth5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4wu0g")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_isejg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cebk3")
}],
"loop": false,
"name": &"straight",
"speed": 24.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_f46kd"]
radius = 8.0
height = 16.0
[sub_resource type="GDScript" id="GDScript_uxov2"]
script/source = "extends CollisionState2D
func _on_player_state_change(_old: Player.States, new: Player.States) -> void:
change_shape(Player.States.keys()[new])
"
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_nmc1l"]
radius = 6.0
height = 22.0
[node name="Player" type="CharacterBody2D"]
z_index = 10
floor_constant_speed = true
floor_snap_length = 2.0
script = ExtResource("1_c7kgv")
[node name="AudioPlayer" type="AudioStreamPlayer" parent="."]
max_polyphony = 2
[node name="Sprite" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -11)
sprite_frames = SubResource("SpriteFrames_blchw")
animation = &"roll"
frame = 4
offset = Vector2(0, -0.5)
script = ExtResource("3_uxov2")
[node name="Hitbox" type="CollisionShape2D" parent="."]
position = Vector2(0, -11)
shape = SubResource("CapsuleShape2D_f46kd")
script = SubResource("GDScript_uxov2")
Shapes = Dictionary[String, Shape2D]({
"IDLE": SubResource("CapsuleShape2D_nmc1l")
})
metadata/_custom_type_script = "uid://e6q7q0ljb34u"
[node name="State" type="Label" parent="."]
offset_left = -40.0
offset_top = -56.0
offset_right = 40.0
offset_bottom = -24.0
[node name="Attackbox" type="Area2D" parent="."]
[node name="CollisionState2D" type="CollisionShape2D" parent="Attackbox"]
script = ExtResource("1_uxov2")
metadata/_custom_type_script = "uid://e6q7q0ljb34u"
[connection signal="state_change" from="." to="Hitbox" method="_on_player_state_change"]
[connection signal="animation_finished" from="Sprite" to="Sprite" method="_on_animation_finished"]
+12
View File
@@ -0,0 +1,12 @@
class_name PlayerCamera2D
extends Camera2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
if global.player:
position = global.player.position
+1
View File
@@ -0,0 +1 @@
uid://dtdbkfoaaejw0
+54
View File
@@ -0,0 +1,54 @@
extends AnimatedSprite2D
@onready var player := $".." as Player
# Called when the node enters the scene tree for the first time.
func _ready():
play("default")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
match player.state:
Player.States.IDLE:
play("default")
Player.States.RUN_START:
play("run_start")
Player.States.RUN:
play("run")
Player.States.ROLL:
play("roll")
Player.States.JUMP_START:
play("jump_start")
Player.States.JUMP:
play("jump")
Player.States.FALL:
play("fall")
Player.States.LAND:
play("land")
Player.States.DAMAGE:
play("damage")
Player.States.RAGDOLL:
play("knockdown")
Player.States.BOUNCE:
play("knockdown")
if player.is_on_floor():
frame = 4
Player.States.LAY:
play("lay")
if player.direction:
flip_h = player.direction < 0
func _on_animation_finished():
match animation:
"run_start":
player.state = Player.States.RUN
"land":
player.state = Player.States.IDLE
"jump_start":
player.state = Player.States.JUMP
"roll":
player.state = Player.States.IDLE
"damage":
player.state = Player.States.IDLE
+1
View File
@@ -0,0 +1 @@
uid://cgeaq15vi0bnd
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cs21plpjp5lle"
path="res://.godot/imported/blast.png-1e5c9a58118096a1044ef4f96ebba846.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://objects/projectiles/blast.png"
dest_files=["res://.godot/imported/blast.png-1e5c9a58118096a1044ef4f96ebba846.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
+3
View File
@@ -0,0 +1,3 @@
[gd_scene format=3 uid="uid://bcjnrngre63n4"]
[node name="Blast" type="Node2D"]
+33
View File
@@ -0,0 +1,33 @@
extends Button
@onready var audio_player: AudioStreamPlayer = $AudioPlayer
@export var FocusSound: AudioStream
@export var PressSound: AudioStream
var flash: bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func _on_pressed() -> void:
if !PressSound:
return
audio_player.stream = PressSound
audio_player.play()
func _on_focus_entered() -> void:
if !PressSound:
return
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
return
audio_player.stream = FocusSound
audio_player.play()
+1
View File
@@ -0,0 +1 @@
uid://h6prwf5a5wwr
+13
View File
@@ -0,0 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://bqlbo0yh111fw"]
[ext_resource type="Script" uid="uid://h6prwf5a5wwr" path="res://objects/ui/sound_button.gd" id="1_f827h"]
[node name="SoundButton" type="Button"]
script = ExtResource("1_f827h")
[node name="AudioPlayer" type="AudioStreamPlayer" parent="."]
max_polyphony = 2
bus = &"SFX"
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="pressed" from="." to="." method="_on_pressed"]