Merge branch 'feature/playerRework'

This commit is contained in:
Lucas 2024-07-22 23:08:56 +02:00
commit edd6ed0f4c
27 changed files with 780 additions and 849 deletions

1
.gitattributes vendored
View file

@ -6,3 +6,4 @@
*.material filter=lfs diff=lfs merge=lfs -text
*.anim filter=lfs diff=lfs merge=lfs -text
*.mesh filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text

View file

@ -8,7 +8,7 @@
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_dixrq"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bjsqx"]
size = Vector2(64.4614, 47.0722)
size = Vector2(43.3023, 13.4486)
[node name="Gym" type="Node2D"]
y_sort_enabled = true
@ -18,18 +18,18 @@ environment = SubResource("Environment_iaiy2")
camera_attributes = SubResource("CameraAttributesPractical_dixrq")
[node name="player" parent="." instance=ExtResource("1_mkpg2")]
position = Vector2(490, 44)
position = Vector2(966, 130)
floor_constant_speed = true
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="TreeSwamp01Sprt" type="Sprite2D" parent="StaticBody2D"]
z_as_relative = false
position = Vector2(0, -993)
position = Vector2(0, -895)
scale = Vector2(4.06445, 4.06445)
texture = ExtResource("2_hscig")
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(-3.8147e-06, -133)
position = Vector2(21, -127.669)
scale = Vector2(4.06445, 4.06445)
shape = SubResource("RectangleShape2D_bjsqx")

View file

@ -8,26 +8,30 @@ const SPEED = 500.0
func _physics_process(delta):
#region Movement
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var directionX = Input.get_axis("ui_left", "ui_right")
var directionY = Input.get_axis("ui_up", "ui_down")
var directionX = Input.get_axis("move_left", "move_right")
var directionY = Input.get_axis("move_up", "move_down")
if directionX :
velocity.x = directionX * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
if directionY:
velocity.y = directionY * SPEED
else:
velocity.y = move_toward(velocity.y, 0, SPEED)
#if velocity.x > 0:
#$AnimationPlayer.play("player_WalkRight")
#if velocity.x < 0 :
#$AnimationPlayer.play("player_WalkLeft")
#if (velocity.x == 0 and velocity.y == 0):
#$AnimationPlayer.play("idle")
#endregion
#region Animation
var WalkLeft = directionX < 0 or (directionY < 0 and directionY != 0)
var Idle = (velocity.x == 0 and velocity.y == 0)
$AnimationTree.set("parameters/Locomotion/conditions/Idle",Idle)
$AnimationTree.set("parameters/Locomotion/conditions/WalkLeft",WalkLeft and !Idle )
$AnimationTree.set("parameters/Locomotion/conditions/WalkRight",!WalkLeft and !Idle)
#endregion
move_and_slide()

File diff suppressed because it is too large Load diff

BIN
player/animations/WalkLeft.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
player/animations/WalkRight.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
player/animations/idle.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
player/archer.png (Stored with Git LFS) Normal file

Binary file not shown.

34
player/archer.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dc0ryln54y2hw"
path="res://.godot/imported/archer.png-4a4554f7c1f05b30b963279b0f0fd63b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/archer.png"
dest_files=["res://.godot/imported/archer.png-4a4554f7c1f05b30b963279b0f0fd63b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

6
player/currentCloth.tres Normal file
View file

@ -0,0 +1,6 @@
[gd_resource type="CanvasTexture" load_steps=2 format=3 uid="uid://5pmqr3y62guu"]
[ext_resource type="Texture2D" uid="uid://dc0ryln54y2hw" path="res://player/archer.png" id="1_31kra"]
[resource]
diffuse_texture = ExtResource("1_31kra")

6
player/currentHat.tres Normal file
View file

@ -0,0 +1,6 @@
[gd_resource type="CanvasTexture" load_steps=2 format=3 uid="uid://5qixrbrclydr"]
[ext_resource type="Texture2D" uid="uid://0m4sejstlmy7" path="res://extracted/Texture2D/Hat Glasses.png" id="1_ogipp"]
[resource]
diffuse_texture = ExtResource("1_ogipp")

BIN
player/hat-layout.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4uytb8rfy2su"
path="res://.godot/imported/hat-layout.jpg-ebdfb0401e800b34d514cfcf52d1d4a6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/hat-layout.jpg"
dest_files=["res://.godot/imported/hat-layout.jpg-ebdfb0401e800b34d514cfcf52d1d4a6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/hermandad-beige.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dyc587uwlcfy2"
path="res://.godot/imported/hermandad-beige.png-67161087b415043ee4d8909c324527e2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/hermandad-beige.png"
dest_files=["res://.godot/imported/hermandad-beige.png-67161087b415043ee4d8909c324527e2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/hermandad-black.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dptor7en7li7e"
path="res://.godot/imported/hermandad-black.png-f537a854f0057b54811a4ea752e2f73a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/hermandad-black.png"
dest_files=["res://.godot/imported/hermandad-black.png-f537a854f0057b54811a4ea752e2f73a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/hermandad-brown.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvpva5dpajyge"
path="res://.godot/imported/hermandad-brown.png-1c96d58b1942229876ff9d7f0d8434f3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/hermandad-brown.png"
dest_files=["res://.godot/imported/hermandad-brown.png-1c96d58b1942229876ff9d7f0d8434f3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/player-layout.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctsllsisn5ykr"
path="res://.godot/imported/player-layout.jpg-efb2fae2dafee2fc7180977836d17ae8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/player-layout.jpg"
dest_files=["res://.godot/imported/player-layout.jpg-efb2fae2dafee2fc7180977836d17ae8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/playerSkin_ref.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://sod0ms1cfkjf"
path="res://.godot/imported/playerSkin_ref.png-c2ecf286618bb847bb611ccb2b97dd35.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/playerSkin_ref.png"
dest_files=["res://.godot/imported/playerSkin_ref.png-c2ecf286618bb847bb611ccb2b97dd35.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

BIN
player/witch.png (Stored with Git LFS) Normal file

Binary file not shown.

34
player/witch.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bkr5mxvjo28ae"
path="res://.godot/imported/witch.png-2c2137107dd652427d34f0c64e9e561c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/witch.png"
dest_files=["res://.godot/imported/witch.png-2c2137107dd652427d34f0c64e9e561c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

@ -16,9 +16,66 @@ run/main_scene="res://maps/gym.tscn"
config/features=PackedStringArray("4.2", "Mobile")
config/icon="res://extracted/Texture2D/Map.png"
[editor_plugins]
[editor]
enabled=PackedStringArray("res://addons/modular_sprite_animation_factory/plugin.cfg")
version_control/plugin_name="GitPlugin"
version_control/autoload_on_startup=true
[input]
move_up={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"echo":false,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
sticker_mode={
"deadzone": 0.5,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
select={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(143, 14),"global_position":Vector2(147, 55),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
back={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(104, 15),"global_position":Vector2(108, 56),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
menu={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
[rendering]

BIN
source/player_skins.psd (Stored with Git LFS) Normal file

Binary file not shown.