Added player and a basic test level

This commit is contained in:
2026-02-06 16:00:03 -05:00
parent 1b0f1c9080
commit 83a4a8f374
104 changed files with 6897 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
extends Node
func _ready() -> void:
#Health ready
#on ready it sets the current health to the max health
currenthealth = maxHealth
#================================================COIN===============================================
#the coin amount the player has
static var totalCoinAmount: int
#signal for the UI
signal on_coin_amount_recevied
func give_pickup_award(coinAmount: int) -> void:
#add the award amount to the total amount
totalCoinAmount += coinAmount
#emist the siganl so the UI updates
on_coin_amount_recevied.emit(totalCoinAmount)
#================================================AMMO===============================================
static var ammo: int = 30
signal on_ammo_update
func decrease_ammo(ammoAmount: int) -> void:
ammo -= ammoAmount
on_ammo_update.emit(ammo)
func add_ammo(ammoAmount: int) -> void:
ammo += ammoAmount
on_ammo_update.emit(ammo)
#===============================================HEALTH==============================================
var maxHealth: int = 100
var currenthealth: int
#signal
signal on_health_changed(newHealth)
signal on_max_health_changed(newMaxHealth)
func decress_health(healthAmount: int) -> void:
#decreases the current health y the health amount
currenthealth -= healthAmount
#clamps the current health so it dosen't go under 0s
currenthealth = clampi(currenthealth, 0, maxHealth)
#emmits the health change signal
on_health_changed.emit(currenthealth)
func increase_health(healthAmount: int) -> void:
#add the amount of health to the current healt
currenthealth += healthAmount
#clamps the current health so it doesn't go over max health
currenthealth = clampi(currenthealth, 0, maxHealth)
#emits the health change signal
on_health_changed.emit(currenthealth)
func increase_max_health(healthAmount: int) -> void:
maxHealth += healthAmount
on_max_health_changed.emit(maxHealth)
func decress_max_health(healthAmount: int) -> void:
maxHealth -= healthAmount
on_max_health_changed.emit(maxHealth)
#=============================================INVENTORY=============================================
var invetory: Dictionary
func add_to_inventory(type: String, value: String) -> void:
invetory[type] = value
func has_inventory_item(value: String) -> bool:
if value == null:
return false
var item = invetory.find_key(value)
if item:
return true
return false
#==============================================WEAPONS==============================================
var currentFirstWeapon: String = "fist"
var currentSecondWeapon: String = "fist"
var currentFirstWeaponIndex: int = 0
var currentSecondWeaponIndex: int = 0
func change_weapon(weaponKey: String, slot: String) -> void:
match slot:
"first": #primary
currentFirstWeapon = weaponKey
"second": #secondary
currentSecondWeapon = weaponKey

View File

@@ -0,0 +1 @@
uid://b7ujq5k25d7gg

68
Entities/Player/player.gd Normal file
View File

@@ -0,0 +1,68 @@
class_name Player
extends CharacterBody2D
signal move
#nodes
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
@onready var hit_animation_player: AnimationPlayer = $HitAnimationPlayer
@onready var camera_center: Marker2D = $Markers/CameraCenter
@onready var center: Marker2D = $Markers/Center
#State Vars
const GRAVITY: int = 700
@export var speed: float = 1000
@export var maxSpeed: float = 175
@export var friction: int = 1000
@export var airFriction: int = 250
@export var jumpHight: float = -275
@export var maxJumpCount: int = 1
@export var ammo: int = 3
var deathEffect: PackedScene = preload("uid://dm4oirxl6bpnn")
var camreaCenterPosition: Vector2
var swordHitBoxXPos: float
func _ready() -> void:
#connects the signal from scene manager to on spawn
#sets the things to make player movement better
set_floor_constant_speed_enabled(true)
floor_snap_length = 2
@warning_ignore("unused_parameter")
func _physics_process(delta: float) -> void:
#calls move and slide so the state scripts don't have to cause that causes bugs
move_and_slide()
#emits move purly for jump state cause that is dependent on exact move and slide in the code
move.emit()
#kills the player when they get too low
if global_position.y > 200:
player_death()
#sets the players pos to the spawn pos so the player statrs on the correct door to the level
func on_spawn(spawnPosition: Vector2):
global_position = spawnPosition
func player_death() -> void:
Util.add_effect_to_self(self, deathEffect)
queue_free()
func _on_hurt_box_area_entered(area: Area2D) -> void:
#this checks if the area is a bullet
if !area.get_parent().is_in_group("Enemy Bullet"):
return
var body = area.get_parent() as Node
hurt(body)
func _on_hurt_box_body_entered(body: Node2D) -> void:
if !body.is_in_group("Enemy"):
return
hurt(body)
func hurt(enemy: Node2D) -> void:
PlayerManager.decress_health(enemy.damage)
hit_animation_player.play("hit")
if PlayerManager.currenthealth == 0:
player_death()

View File

@@ -0,0 +1 @@
uid://0oxneml3esdx

1146
Entities/Player/player.tscn Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ovhxr3xoi275"
path="res://.godot/imported/shot-hit-preview.png-d0285105d18b83375693c513e0ba6cde.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/bullet_art/shot-hit-preview.png"
dest_files=["res://.godot/imported/shot-hit-preview.png-d0285105d18b83375693c513e0ba6cde.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bj12shtrac4e3"
path="res://.godot/imported/shot-preview.png-9e2ab024545145e7d1d43c49e41313ba.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/bullet_art/shot-preview.png"
dest_files=["res://.godot/imported/shot-preview.png-9e2ab024545145e7d1d43c49e41313ba.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dscwyaio3d18q"
path="res://.godot/imported/player land 48x48.png-006d9162c04cc1841c88cb2fe134b542.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/air/player land 48x48.png"
dest_files=["res://.godot/imported/player land 48x48.png-006d9162c04cc1841c88cb2fe134b542.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bnjxcfrvobn0o"
path="res://.godot/imported/player new jump 48x48.png-df3d4a89d921f5becfbca209bf328536.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/air/player new jump 48x48.png"
dest_files=["res://.godot/imported/player new jump 48x48.png-df3d4a89d921f5becfbca209bf328536.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://crj6i22c4noqf"
path="res://.godot/imported/Hammer Attack.png-db8ebfc7ef6b820d179bb24b33de3b4f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Hammer Attack.png"
dest_files=["res://.godot/imported/Hammer Attack.png-db8ebfc7ef6b820d179bb24b33de3b4f.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctuurlx52kwdf"
path="res://.godot/imported/Player Jab 48x48.png-cc7196ee7f6faab7553ca0e6b8bf246f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Player Jab 48x48.png"
dest_files=["res://.godot/imported/Player Jab 48x48.png-cc7196ee7f6faab7553ca0e6b8bf246f.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dryds4i6iyl2x"
path="res://.godot/imported/Player Punch Cross 64x64.png-cf4f7236e44d89c2ab5e73f62fe5edbe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Player Punch Cross 64x64.png"
dest_files=["res://.godot/imported/Player Punch Cross 64x64.png-cf4f7236e44d89c2ab5e73f62fe5edbe.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1abjy0qrytws"
path="res://.godot/imported/Player Running Aiming 48x48.png-e2bf1277703c6caa5969001331ae21e8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Player Running Aiming 48x48.png"
dest_files=["res://.godot/imported/Player Running Aiming 48x48.png-e2bf1277703c6caa5969001331ae21e8.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fpi34lir78yq"
path="res://.godot/imported/Player Running Shooting 48x48.png-cd2f8435211ca2cac5efdc2c7bf79015.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Player Running Shooting 48x48.png"
dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-cd2f8435211ca2cac5efdc2c7bf79015.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lyj81coxte8q"
path="res://.godot/imported/Revolver.png-3a6893b24caa155aa86272d671bc379b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Revolver.png"
dest_files=["res://.godot/imported/Revolver.png-3a6893b24caa155aa86272d671bc379b.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnlj5816dpajy"
path="res://.godot/imported/Shoot Fall.png-25bdd667a8fb9e6f94e331d31ed7c10a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/Shoot Fall.png"
dest_files=["res://.godot/imported/Shoot Fall.png-25bdd667a8fb9e6f94e331d31ed7c10a.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://p3aq5ngiy2rw"
path="res://.godot/imported/ShootSpriteSheet.png-b816d34c266cbcad06a67e80efbd4304.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/ShootSpriteSheet.png"
dest_files=["res://.godot/imported/ShootSpriteSheet.png-b816d34c266cbcad06a67e80efbd4304.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvibkv3ndiy5i"
path="res://.godot/imported/SwordAttack.png-36618b965c905cc351d3caf021a1300c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/SwordAttack.png"
dest_files=["res://.godot/imported/SwordAttack.png-36618b965c905cc351d3caf021a1300c.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c3a6oysgs3j52"
path="res://.godot/imported/pixil-frame-0 (12).png-fca69d73c70eb746fd1996b9a3c884b0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/pixil-frame-0 (12).png"
dest_files=["res://.godot/imported/pixil-frame-0 (12).png-fca69d73c70eb746fd1996b9a3c884b0.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bj5ukgia2iakm"
path="res://.godot/imported/player katana continuous attack 80x64.png-eea3990c67472f046a3b77f6c0c73691.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/player katana continuous attack 80x64.png"
dest_files=["res://.godot/imported/player katana continuous attack 80x64.png-eea3990c67472f046a3b77f6c0c73691.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b1ihdsj3334ox"
path="res://.godot/imported/player shoot 2H 48x48.png-1729090e66a80f1af655e788667c7fe2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/attacks/player shoot 2H 48x48.png"
dest_files=["res://.godot/imported/player shoot 2H 48x48.png-1729090e66a80f1af655e788667c7fe2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://gofoeahkocid"
path="res://.godot/imported/Player Side-Climb 48x48.png-f9bb088b57f2d4831bc4fd89e0a045c9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/climbing/Player Side-Climb 48x48.png"
dest_files=["res://.godot/imported/Player Side-Climb 48x48.png-f9bb088b57f2d4831bc4fd89e0a045c9.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcchw88tqk32"
path="res://.godot/imported/player ledge climb 48x48.png-1603a7cf98a3d0dc06cc6f00b74370d5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/climbing/player ledge climb 48x48.png"
dest_files=["res://.godot/imported/player ledge climb 48x48.png-1603a7cf98a3d0dc06cc6f00b74370d5.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dravykrek6bsu"
path="res://.godot/imported/player wall slide 48x48.png-3360a886dec3f27d66d96f0c6df9be53.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/climbing/player wall slide 48x48.png"
dest_files=["res://.godot/imported/player wall slide 48x48.png-3360a886dec3f27d66d96f0c6df9be53.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btd00ndkgoc4"
path="res://.godot/imported/Player Crouch-Idle 48x48.png-ba8631793697139c9bc5099cd3392ee2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/crouch/Player Crouch-Idle 48x48.png"
dest_files=["res://.godot/imported/Player Crouch-Idle 48x48.png-ba8631793697139c9bc5099cd3392ee2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dxu6sq5ioqv14"
path="res://.godot/imported/player crouch-walk 48x48.png-def5affdc5fcf59d40942ba741887ef7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/crouch/player crouch-walk 48x48.png"
dest_files=["res://.godot/imported/player crouch-walk 48x48.png-def5affdc5fcf59d40942ba741887ef7.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://devpg7djajmg1"
path="res://.godot/imported/Player Death 64x64.png-a2246597d9c0d382224ee2b52120d5cb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/damage/Player Death 64x64.png"
dest_files=["res://.godot/imported/Player Death 64x64.png-a2246597d9c0d382224ee2b52120d5cb.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c5qyaarb6cjcf"
path="res://.godot/imported/Player Hurt 48x48.png-8ca6347bd1a5cd1357e4b79f938b918f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/damage/Player Hurt 48x48.png"
dest_files=["res://.godot/imported/Player Hurt 48x48.png-8ca6347bd1a5cd1357e4b79f938b918f.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blgt31uqia0oh"
path="res://.godot/imported/Player Idle 48x48.png-62de311bcbba954f50575686d2b83103.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/movement/Player Idle 48x48.png"
dest_files=["res://.godot/imported/Player Idle 48x48.png-62de311bcbba954f50575686d2b83103.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8ikd1u3yxiu8"
path="res://.godot/imported/Player Roll 48x48.png-02489fbdabb9289ee528584406336b1a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/movement/Player Roll 48x48.png"
dest_files=["res://.godot/imported/Player Roll 48x48.png-02489fbdabb9289ee528584406336b1a.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://yhwop1cni1js"
path="res://.godot/imported/Player Slide 48x48.png-8da809ca9ba632492e823031e7fed554.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/movement/Player Slide 48x48.png"
dest_files=["res://.godot/imported/Player Slide 48x48.png-8da809ca9ba632492e823031e7fed554.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ck3y2nikphwlt"
path="res://.godot/imported/player run 48x48.png-5fb0057afde10731ff3824e8f8b86d45.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_art/the_dude/movement/player run 48x48.png"
dest_files=["res://.godot/imported/player run 48x48.png-5fb0057afde10731ff3824e8f8b86d45.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmp35xmgh574d"
path="res://.godot/imported/partical_effect.png-23e9c8e07c2d3280dbfc54e912b820da.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_death_effect/art/partical_effect.png"
dest_files=["res://.godot/imported/partical_effect.png-23e9c8e07c2d3280dbfc54e912b820da.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwwrpe5wfh7ds"
path="res://.godot/imported/spark.png-d0c63d49c6c40935b4755a0ea93391d2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Entities/Player/player_death_effect/art/spark.png"
dest_files=["res://.godot/imported/spark.png-d0c63d49c6c40935b4755a0ea93391d2.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

View File

@@ -0,0 +1,5 @@
extends Node2D
func _on_animated_sprite_2d_animation_finished() -> void:
queue_free()

View File

@@ -0,0 +1 @@
uid://3g2l2xhvoxj8

View File

@@ -0,0 +1,109 @@
[gd_scene load_steps=15 format=3 uid="uid://dm4oirxl6bpnn"]
[ext_resource type="Texture2D" uid="uid://cwwrpe5wfh7ds" path="res://entities/player/player_death_effect/art/spark.png" id="1_335v7"]
[ext_resource type="Script" uid="uid://3g2l2xhvoxj8" path="res://entities/player/player_death_effect/player_death_effect.gd" id="1_i0k0j"]
[ext_resource type="Texture2D" uid="uid://cmp35xmgh574d" path="res://entities/player/player_death_effect/art/partical_effect.png" id="2_ann6r"]
[sub_resource type="Gradient" id="Gradient_t8ru6"]
colors = PackedColorArray(0, 1, 1, 1, 0, 0, 1, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_hhxfb"]
gradient = SubResource("Gradient_t8ru6")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_644o4"]
particle_flag_disable_z = true
emission_shape = 1
emission_sphere_radius = 35.0
angular_velocity_min = -1.60933e-05
angular_velocity_max = -1.60933e-05
radial_velocity_min = -2.23517e-05
radial_velocity_max = 30.0
gravity = Vector3(0, -0.5, 0)
linear_accel_min = 15.0
linear_accel_max = 30.0
radial_accel_min = -2.23517e-06
radial_accel_max = -2.23517e-06
scale_min = 0.1
scale_max = 0.5
color_ramp = SubResource("GradientTexture1D_hhxfb")
[sub_resource type="AtlasTexture" id="AtlasTexture_fidmw"]
atlas = ExtResource("1_335v7")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_i0k0j"]
atlas = ExtResource("1_335v7")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ann6r"]
atlas = ExtResource("1_335v7")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_t8ru6"]
atlas = ExtResource("1_335v7")
region = Rect2(96, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_hhxfb"]
atlas = ExtResource("1_335v7")
region = Rect2(128, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_644o4"]
atlas = ExtResource("1_335v7")
region = Rect2(160, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_e74oy"]
atlas = ExtResource("1_335v7")
region = Rect2(192, 0, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_tvjs0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fidmw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i0k0j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ann6r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t8ru6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hhxfb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_644o4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e74oy")
}, {
"duration": 1.0,
"texture": null
}],
"loop": false,
"name": &"deathEffect",
"speed": 12.0
}]
[node name="PlayerDeathEffect" type="Node2D"]
script = ExtResource("1_i0k0j")
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
position = Vector2(0, -18)
amount = 100
texture = ExtResource("2_ann6r")
speed_scale = 1.5
explosiveness = 0.5
process_material = SubResource("ParticleProcessMaterial_644o4")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -19)
sprite_frames = SubResource("SpriteFrames_tvjs0")
animation = &"deathEffect"
autoplay = "deathEffect"
frame = 7
frame_progress = 1.0
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]

View File

@@ -0,0 +1,75 @@
[gd_resource type="VisualShader" load_steps=5 format=3 uid="uid://cqjsw6d71kkd2"]
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_wwqby"]
parameter_name = "hit_color"
default_value_enabled = true
default_value = Color(0.886654, 0, 0.166007, 1)
[sub_resource type="VisualShaderNodeBooleanParameter" id="VisualShaderNodeBooleanParameter_12sdw"]
parameter_name = "enabled"
default_value_enabled = true
[sub_resource type="VisualShaderNodeIf" id="VisualShaderNodeIf_bj1hx"]
default_input_values = [0, 0.0, 1, 1.0, 2, 1e-05, 3, Vector3(0, 0, 0), 4, Vector3(0, 0, 0), 5, Vector3(0, 0, 0)]
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_net7a"]
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)
nodes/fragment/2/node = SubResource("VisualShaderNodeColorParameter_wwqby")
nodes/fragment/2/position = Vector2(-420, 220)
nodes/fragment/3/node = SubResource("VisualShaderNodeBooleanParameter_12sdw")
nodes/fragment/3/position = Vector2(-380, -60)
nodes/fragment/4/node = SubResource("VisualShaderNodeIf_bj1hx")
nodes/fragment/4/position = Vector2(20, 140)
nodes/fragment/5/node = SubResource("VisualShaderNodeInput_net7a")
nodes/fragment/5/position = Vector2(-420, 480)
nodes/fragment/connections = PackedInt32Array(3, 0, 4, 0, 2, 0, 4, 3, 4, 0, 0, 0, 5, 0, 4, 4, 5, 0, 4, 5)

View File

@@ -0,0 +1,88 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var wallCheck: ShapeCast2D
@export var floorCheck: RayCast2D
@export var ledgeGrabBox: CollisionShape2D
@export_category("Fall State")
@export var coyoteTime: float = .2
var coyoteJump: bool
const GRAVITY = player.GRAVITY
@onready var speed = player.speed
@onready var maxSpeed = player.maxSpeed
@onready var friction = player.airFriction
var fallTimeAmount: int = 10
var fallTime: float
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
func on_phyisics_process(delta: float) -> void:
fallTime += fallTimeAmount * delta
#print(fallTime)
if !player.is_on_floor():
get_coyte_time()
player.velocity.y += GRAVITY * delta
#player.velocity.x = move_toward(player.velocity.x, 0, friction)
var direction: float = GameInputEvents.movement_input()
if direction:
player.velocity.x += direction * speed * delta
player.velocity.x = clamp(player.velocity.x, -maxSpeed, maxSpeed)
if direction != 0:
animatedSprite2D.flip_h = false if direction > 0 else true
if direction == 0:
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
transition_states()
func get_coyte_time() -> void:
await get_tree().create_timer(coyoteTime).timeout
coyoteJump = false
func enter() -> void:
animatedSprite2D.play("Fall")
fallTime = 0
ledgeGrabBox.disabled = false
if player.is_on_floor():
ledgeGrabBox.disabled = true
return
coyoteJump = true
func exit() -> void:
fallTime = 0
ledgeGrabBox.disabled = true
animatedSprite2D.stop()
func transition_states() -> void:
#transitioning state
#idle state
if player.is_on_floor() and fallTime > 5:
transition.emit("Land")
elif player.is_on_floor() and fallTime <= 5:
transition.emit("idle")
#jump state
if GameInputEvents.jump_input():
transition.emit("jump")
#jump state
if GameInputEvents.jump_input() and coyoteJump:
transition.emit("jump")
if wallCheck.is_colliding() and !floorCheck.is_colliding() and player.velocity.y == 0 and player.is_on_floor():
transition.emit("Grab")

View File

@@ -0,0 +1 @@
uid://rdj1553spwa8

View File

@@ -0,0 +1,86 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var wallCheck: ShapeCast2D
@export var floorCheck: RayCast2D
@export var ledgeGrabBox: CollisionShape2D
const jumpGravity = player.GRAVITY
@onready var jumpHight = player.jumpHight
@onready var maxJumpCount = player.maxJumpCount
@onready var speed = player.speed
@onready var maxSpeed = player.maxSpeed
@onready var friction = player.friction
var currentJumpCount: int
var coyoteJump: bool
@warning_ignore("unused_parameter")
func _physics_process(delta: float) -> void:
await player.move
if player.is_on_floor() or (player.is_on_wall() and GameInputEvents.wall_cling_input()):
currentJumpCount = 0
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
func on_phyisics_process(delta: float) -> void:
player.velocity.y += jumpGravity * delta
if player.is_on_floor():
currentJumpCount = 0
player.velocity.y = jumpHight
coyoteJump = false
currentJumpCount += 1
if coyoteJump and currentJumpCount != maxJumpCount:
player.velocity.y = jumpHight
coyoteJump = false
currentJumpCount += 1
#multi jumps
if !player.is_on_floor() and GameInputEvents.jump_input() and currentJumpCount != maxJumpCount:
player.velocity.y = jumpHight
currentJumpCount += 1
var direction: float = GameInputEvents.movement_input()
if direction:
player.velocity.x += direction * speed * delta
player.velocity.x = clamp(player.velocity.x, -maxSpeed, maxSpeed)
if direction != 0:
animatedSprite2D.flip_h = false if direction > 0 else true
if direction == 0:
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
await player.move
transition_states()
func enter() -> void:
ledgeGrabBox.disabled = false
animatedSprite2D.play("Jump")
coyoteJump = true
func exit() -> void:
ledgeGrabBox.disabled = true
coyoteJump = false
animatedSprite2D.stop()
func transition_states() -> void:
#transition states
#idle state
if player.is_on_floor():
transition.emit("idle")
#fall state
if player.velocity.y > 0:
transition.emit("fall")
if wallCheck.is_colliding() and not floorCheck.is_colliding() and player.velocity.y == 0 and player.is_on_floor():
transition.emit("Grab")

View File

@@ -0,0 +1 @@
uid://j4lec2sab50d

View File

@@ -0,0 +1,32 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@onready var friction = player.friction
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
@warning_ignore("unused_parameter")
func on_phyisics_process(delta: float) -> void:
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
if !animatedSprite2D.is_playing():
transition.emit("idle")
var direction = GameInputEvents.movement_input()
if direction != 0 and animatedSprite2D.frame > 4:
transition.emit("Run")
if GameInputEvents.jump_input() and animatedSprite2D.frame > 4:
transition.emit("Jump")
func enter() -> void:
animatedSprite2D.play("Land")
func exit() -> void:
pass

View File

@@ -0,0 +1 @@
uid://iu5jv2o1im70

View File

@@ -0,0 +1,57 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var weapons: Weapons
@export_category("Shoot State")
@export var stateMachine: NodeStateMachine
const GRAVITY = player.GRAVITY
@onready var friction = player.friction
@onready var airFriction = player.airFriction
var canAttack: bool = false
func _ready() -> void:
animatedSprite2D.animation_looped.connect(on_loop)
weapons.on_weapon_change.connect(on_weapon_change)
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
@warning_ignore("unused_parameter")
func on_phyisics_process(delta: float) -> void:
if player.is_on_floor():
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
elif !player.is_on_floor():
player.velocity.y += GRAVITY * delta
player.velocity.x = move_toward(player.velocity.x, 0, airFriction * delta)
if animatedSprite2D.frame == weapons.get_weapon_attack_frame() and canAttack:
weapons.attack()
canAttack = false
func enter() -> void:
canAttack = true
weapons.on_start_attack()
play_correct_animation()
func exit() -> void:
animatedSprite2D.stop()
weapons.on_attack_end()
func on_loop() -> void:
canAttack = true
if GameInputEvents.is_first_attack_held() or GameInputEvents.is_second_attack_held():
pass
elif stateMachine.currentNodeState == self:
transition.emit("idle")
func play_correct_animation() -> void:
animatedSprite2D.play(weapons.get_weapon_attack_aninmation_type(), weapons.get_weapon_speed())
func on_weapon_change() -> void:
canAttack = true
play_correct_animation()

View File

@@ -0,0 +1 @@
uid://b2p1m7vqxyjj7

View File

@@ -0,0 +1,23 @@
class_name GameInputEvents
extends Node
static func movement_input() -> float:
var direction : float = Input.get_axis("move_left", "move_right")
return direction
static func jump_input() -> bool:
var jumpInput: bool = Input.is_action_just_pressed("move_jump")
var jumpRelesed: bool = Input.is_action_pressed("move_jump")
return jumpInput or jumpRelesed
static func crouch_input() -> bool:
var crouchInput: bool = Input.is_action_just_pressed("crouch")
return crouchInput
static func fall_input() -> bool:
var fallInput: bool = Input.is_action_just_pressed("force_fall")
return fallInput
static func wall_cling_input() -> bool:
var wallClingInput: bool = Input.is_action_just_pressed("wall_cling")
return wallClingInput

View File

@@ -0,0 +1 @@
uid://d38hxs4nttxcm

View File

@@ -0,0 +1,51 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var collisionShapeMove: AnimationPlayer
@onready var friction = player.friction
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
@warning_ignore("unused_parameter")
func on_phyisics_process(delta: float) -> void:
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
transition_states()
func enter() -> void:
collisionShapeMove.play("Crouch")
animatedSprite2D.play("Crouch")
func exit() -> void:
animatedSprite2D.stop()
func transition_states() -> void:
#transition states
#run state
var direction = GameInputEvents.movement_input()
if !player.is_on_floor():
collisionShapeMove.play("Normal")
transition.emit("fall")
if direction and player.is_on_floor():
transition.emit("crouchwalk")
#jump state
if GameInputEvents.jump_input():
collisionShapeMove.play("Normal")
transition.emit("jump")
#idle state
if not Input.is_action_pressed("crouch"):
collisionShapeMove.play("Normal")
transition.emit("idle")

View File

@@ -0,0 +1 @@
uid://cmtajhnx8xaqt

View File

@@ -0,0 +1,56 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var collisionShapeMove: AnimationPlayer
const GRAVITY = player.GRAVITY
@onready var speed: float = player.speed /3
@onready var maxSpeed: float = player.maxSpeed /3
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
func on_phyisics_process(delta: float) -> void:
var direction = GameInputEvents.movement_input()
if direction:
player.velocity.x += direction * speed * delta
player.velocity.x = clamp(player.velocity.x, -maxSpeed, maxSpeed)
if direction != 0:
animatedSprite2D.flip_h = false if direction > 0 else true
transition_states(direction)
func enter() -> void:
collisionShapeMove.play("Crouch")
animatedSprite2D.play("Crouch Walk")
func exit() -> void:
animatedSprite2D.stop()
func transition_states(direction) -> void:
#transition states
#fall state
if !player.is_on_floor():
collisionShapeMove.play("Normal")
transition.emit("fall")
#idle state
if direction == 0:
transition.emit("crouchidle")
#jump state
if GameInputEvents.jump_input():
collisionShapeMove.play("Normal")
transition.emit("jump")
if not Input.is_action_pressed("crouch"):
collisionShapeMove.play("Normal")
transition.emit("run")

View File

@@ -0,0 +1 @@
uid://c2lag80wot5k

View File

@@ -0,0 +1,46 @@
extends NodeState
@export_category("nodes")
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var ledgeGrabBox: CollisionShape2D
@export var wallCheck: ShapeCast2D
@export var floorCheck: RayCast2D
const GRAVITY = player.GRAVITY
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
@warning_ignore("unused_parameter")
func on_phyisics_process(delta: float) -> void:
var collision = wallCheck.get_collision_normal(0)
if collision.x == -1:
animatedSprite2D.flip_h = false
if collision.x == 1:
animatedSprite2D.flip_h = true
transition_states()
func enter() -> void:
player.velocity.x = 0
ledgeGrabBox.disabled = false
animatedSprite2D.play("Ledge Grab")
func exit() -> void:
ledgeGrabBox.disabled = true
animatedSprite2D.stop()
func transition_states() -> void:
if GameInputEvents.jump_input():
transition.emit("jump")
if floorCheck.is_colliding():
transition.emit("idle")
if GameInputEvents.crouch_input():
ledgeGrabBox.disabled = true
transition.emit("fall")

View File

@@ -0,0 +1 @@
uid://d3t3fweggs161

View File

@@ -0,0 +1,44 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@onready var friction = player.friction
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
@warning_ignore("unused_parameter")
func on_phyisics_process(delta: float) -> void:
player.velocity.x = move_toward(player.velocity.x, 0, friction * delta)
transition_states()
func enter() -> void:
animatedSprite2D.play("Idle")
func exit() -> void:
animatedSprite2D.stop()
func transition_states() -> void:
#transitioning state
#fall state
if !player.is_on_floor():
transition.emit("fall")
#run state
var direction: float = GameInputEvents.movement_input()
if direction and player.is_on_floor():
transition.emit("Run")
#jump state
if GameInputEvents.jump_input():
transition.emit("jump")
#shoot crouch state
if Input.is_action_pressed("crouch"):
transition.emit("CrouchIdle")

View File

@@ -0,0 +1 @@
uid://boof2qmi8clv3

View File

@@ -0,0 +1,53 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
const GRAVITY = player.GRAVITY
@onready var speed = player.speed
@onready var maxSpeed = player.maxSpeed
@warning_ignore("unused_parameter")
func on_process(delta: float) -> void:
pass
func on_phyisics_process(delta: float) -> void:
var direction = GameInputEvents.movement_input()
if direction:
player.velocity.x += direction * speed * delta
player.velocity.x = clamp(player.velocity.x, -maxSpeed, maxSpeed)
if direction != 0:
animatedSprite2D.flip_h = false if direction > 0 else true
transition_states(direction)
func enter() -> void:
animatedSprite2D.play("Run")
func exit() -> void:
animatedSprite2D.stop()
func transition_states(direction) -> void:
#transition states
#fall state
if !player.is_on_floor():
transition.emit("fall")
#idle state
if direction == 0:
transition.emit("idle")
#jump state
if GameInputEvents.jump_input():
transition.emit("jump")
#Crouch state
#TODO make work better
if GameInputEvents.crouch_input():
transition.emit("crouchwalk")

View File

@@ -0,0 +1 @@
uid://orlqcyink5er

View File

@@ -0,0 +1,21 @@
extends NodeState
@export var player: Player
@export var animatedSprite2D: AnimatedSprite2D
@export var collisionShapeMove: AnimationPlayer
func enter() -> void:
collisionShapeMove.play("Crouch")
func on_phyisics_process(_delta: float) -> void:
transition_states()
func on_process(_delta: float) -> void:
pass
func exit() -> void:
collisionShapeMove.play("Normal")
func transition_states() -> void:
pass

View File

@@ -0,0 +1 @@
uid://cywssm5t3d5uv