finished third class. Character Pawn moving and attack with left and right attacks.

This commit is contained in:
2025-06-21 02:17:41 -03:00
parent c0e2efebd2
commit d8b4402926
196 changed files with 2580 additions and 3 deletions

BIN
Factions/Knights/Troops/.DS_Store vendored Normal file

Binary file not shown.

BIN
Factions/Knights/Troops/Archer/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vilqdrtsfgrn"
path="res://.godot/imported/Archer_Blue_(NoArms).png-4c2ffd16787ebdeb1efd1c4a420cdec3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Blue_(NoArms).png"
dest_files=["res://.godot/imported/Archer_Blue_(NoArms).png-4c2ffd16787ebdeb1efd1c4a420cdec3.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://clav171hwrqjw"
path="res://.godot/imported/Archer_Bow_Blue.png-84f87c6898dae20bb6a9df758371eeeb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Bow_Blue.png"
dest_files=["res://.godot/imported/Archer_Bow_Blue.png-84f87c6898dae20bb6a9df758371eeeb.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://coi0l4bvsiujy"
path="res://.godot/imported/Archer_Bow_Purple.png-53862f0ed7350dbed4bd8b596123de11.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Bow_Purple.png"
dest_files=["res://.godot/imported/Archer_Bow_Purple.png-53862f0ed7350dbed4bd8b596123de11.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cvibc0xyjnio6"
path="res://.godot/imported/Archer_Bow_Red.png-2f3de0514a7fa064f304ae747fd8048f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Bow_Red.png"
dest_files=["res://.godot/imported/Archer_Bow_Red.png-2f3de0514a7fa064f304ae747fd8048f.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cola6ham41wb1"
path="res://.godot/imported/Archer_Bow_Yellow.png-4a1305181d6ee36e2d2748b905c72614.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Bow_Yellow.png"
dest_files=["res://.godot/imported/Archer_Bow_Yellow.png-4a1305181d6ee36e2d2748b905c72614.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cdhkbiefwp1f7"
path="res://.godot/imported/Archer_Purple_(NoArms).png-3bd65c31ddde2380f7fe23b262e0cfff.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Purple_(NoArms).png"
dest_files=["res://.godot/imported/Archer_Purple_(NoArms).png-3bd65c31ddde2380f7fe23b262e0cfff.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmyi4a2cbigxn"
path="res://.godot/imported/Archer_Red_(NoArms).png-a0bd93acdedf7fc21040c88d22cc1068.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Red_(NoArms).png"
dest_files=["res://.godot/imported/Archer_Red_(NoArms).png-a0bd93acdedf7fc21040c88d22cc1068.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://levll8w7y7xi"
path="res://.godot/imported/Archer_Yellow_(NoArms).png-2838f2f6491d6fb36cfabf7a67578b6e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Archer + Bow/Archer_Yellow_(NoArms).png"
dest_files=["res://.godot/imported/Archer_Yellow_(NoArms).png-2838f2f6491d6fb36cfabf7a67578b6e.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dyd3u1heoq65j"
path="res://.godot/imported/Arrow.png-6be8575ffdc707c9f5300ed52c610e3c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Arrow/Arrow.png"
dest_files=["res://.godot/imported/Arrow.png-6be8575ffdc707c9f5300ed52c610e3c.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qg01mjvp1uqv"
path="res://.godot/imported/Archer_Blue.png-f64117c4f9e55e5702590b4898fc9a91.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Blue/Archer_Blue.png"
dest_files=["res://.godot/imported/Archer_Blue.png-f64117c4f9e55e5702590b4898fc9a91.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b5b2mojtaopv5"
path="res://.godot/imported/Archer_Purlple.png-a91c1bd8e646e3407c329c004a34488c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Purple/Archer_Purlple.png"
dest_files=["res://.godot/imported/Archer_Purlple.png-a91c1bd8e646e3407c329c004a34488c.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

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bw1jweu3w6dps"
path="res://.godot/imported/Archer_Red.png-0b9a97b86f84c61b3c82986f2678bd03.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Red/Archer_Red.png"
dest_files=["res://.godot/imported/Archer_Red.png-0b9a97b86f84c61b3c82986f2678bd03.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxeovtde6jl7"
path="res://.godot/imported/Archer_Yellow.png-8eda7c10e5f22802ba7530738187b097.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Archer/Yellow/Archer_Yellow.png"
dest_files=["res://.godot/imported/Archer_Yellow.png-8eda7c10e5f22802ba7530738187b097.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
Factions/Knights/Troops/Dead/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bihmgnerroyty"
path="res://.godot/imported/Dead.png-bdba5b524bc2709a46598dd755c02349.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Dead/Dead.png"
dest_files=["res://.godot/imported/Dead.png-bdba5b524bc2709a46598dd755c02349.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
Factions/Knights/Troops/Pawn/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1bwuduv7605p"
path="res://.godot/imported/Pawn_Blue.png-5bd920ed37f90d6f8d7cb2439504a5e1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Pawn/Blue/Pawn_Blue.png"
dest_files=["res://.godot/imported/Pawn_Blue.png-5bd920ed37f90d6f8d7cb2439504a5e1.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://br5voork4a3wp"
path="res://.godot/imported/Pawn_Purple.png-c9038d81ce3161439ae009bd5a14ca22.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Pawn/Purple/Pawn_Purple.png"
dest_files=["res://.godot/imported/Pawn_Purple.png-c9038d81ce3161439ae009bd5a14ca22.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

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://byuu0tfas3s5k"
path="res://.godot/imported/Pawn_Red.png-2a61be4edb4d91cbc33cc4a84784c4a1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Pawn/Red/Pawn_Red.png"
dest_files=["res://.godot/imported/Pawn_Red.png-2a61be4edb4d91cbc33cc4a84784c4a1.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://n56bn8grmos5"
path="res://.godot/imported/Pawn_Yellow.png-f1568d8a9404644544cbf2d5bcc3d86f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Pawn/Yellow/Pawn_Yellow.png"
dest_files=["res://.godot/imported/Pawn_Yellow.png-f1568d8a9404644544cbf2d5bcc3d86f.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

@@ -0,0 +1,122 @@
[gd_scene load_steps=10 format=3 uid="uid://dsp8jku6h5xxa"]
[ext_resource type="PackedScene" uid="uid://dfbpq23nrtd23" path="res://Factions/Knights/Troops/base_character.tscn" id="1_d2j80"]
[ext_resource type="Texture2D" uid="uid://1bwuduv7605p" path="res://Factions/Knights/Troops/Pawn/Blue/Pawn_Blue.png" id="2_c6f2o"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_c6f2o"]
radius = 6.0
[sub_resource type="Animation" id="Animation_lftkj"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Texture:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_em6uh"]
resource_name = "attack_axe"
length = 0.6
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Texture:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [18, 19, 20, 21, 22, 23]
}
[sub_resource type="Animation" id="Animation_7phpi"]
resource_name = "attack_hammer"
length = 0.6
step = 0.6
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Texture:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [12, 13, 14, 15, 16, 17]
}
[sub_resource type="Animation" id="Animation_c6f2o"]
resource_name = "idle"
length = 0.6
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Texture:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5]
}
[sub_resource type="Animation" id="Animation_4028v"]
resource_name = "run"
length = 0.6
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Texture:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [6, 7, 8, 9, 10, 11]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7phpi"]
_data = {
&"RESET": SubResource("Animation_lftkj"),
&"attack_axe": SubResource("Animation_em6uh"),
&"attack_hammer": SubResource("Animation_7phpi"),
&"idle": SubResource("Animation_c6f2o"),
&"run": SubResource("Animation_4028v")
}
[node name="Pawn" instance=ExtResource("1_d2j80")]
_move_speed = 192.0
_left_attack_name = "attack_hammer"
_right_attack_name = "attack_axe"
[node name="Texture" parent="." index="0"]
position = Vector2(0, -26)
texture = ExtResource("2_c6f2o")
hframes = 6
vframes = 6
[node name="Collision" parent="." index="1"]
show_behind_parent = true
rotation = 1.5708
shape = SubResource("CapsuleShape2D_c6f2o")
[node name="Animation" parent="." index="2"]
libraries = {
&"": SubResource("AnimationLibrary_7phpi")
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://doc2pnmhdcth4"
path="res://.godot/imported/Warrior_Blue.png-7866718a716447d3c84e77e1d1a97237.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Warrior/Blue/Warrior_Blue.png"
dest_files=["res://.godot/imported/Warrior_Blue.png-7866718a716447d3c84e77e1d1a97237.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b32gkj8vo1r6v"
path="res://.godot/imported/Warrior_Purple.png-0a49c85c0e40df03bc4fab090b7eb699.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Warrior/Purple/Warrior_Purple.png"
dest_files=["res://.godot/imported/Warrior_Purple.png-0a49c85c0e40df03bc4fab090b7eb699.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://obb7u3ojnojf"
path="res://.godot/imported/Warrior_Red.png-28ee058ea38b51d839e1935ae2d43434.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Warrior/Red/Warrior_Red.png"
dest_files=["res://.godot/imported/Warrior_Red.png-28ee058ea38b51d839e1935ae2d43434.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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://xuc3kdbg11x8"
path="res://.godot/imported/Warrior_Yellow.png-da317becaf3886c3ffaf1460cfa4563f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Factions/Knights/Troops/Warrior/Yellow/Warrior_Yellow.png"
dest_files=["res://.godot/imported/Warrior_Yellow.png-da317becaf3886c3ffaf1460cfa4563f.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

@@ -0,0 +1,62 @@
extends CharacterBody2D
class_name BaseCharacter
var _can_attack: bool = true
var _attack_animation_name: String = ""
@export_category("Variables")
@export var _move_speed: float = 128.0
@export var _left_attack_name: String
@export var _right_attack_name: String
@export_category("Objects")
@export var _animation: AnimationPlayer
@export var _sprite2d: Sprite2D
func _process(delta: float) -> void:
pass
func _physics_process(_delta: float) -> void:
_move()
_attack()
_animate()
func _move() -> void:
var _direction: Vector2 = Input.get_vector("move_left", "move_right", "move_up", "move_down")
velocity = _direction * _move_speed
move_and_slide()
func _attack() -> void:
if Input.is_action_just_pressed("left_attack") and _can_attack:
_can_attack = false
_attack_animation_name = _left_attack_name
set_physics_process(false)
if Input.is_action_just_pressed("right_attack") and _can_attack:
_can_attack = false
_attack_animation_name = _right_attack_name
set_physics_process(false)
func _animate() -> void:
if velocity.x > 0:
_sprite2d.flip_h = false
if velocity.x < 0:
_sprite2d.flip_h = true
if _can_attack == false:
_animation.play(_attack_animation_name)
return
if velocity:
_animation.play("run")
return
_animation.play("idle")
#print("direction is: " + str(_direction))
#print("moved to " + str(velocity))
func _on_animation_finished(_anim_name: StringName) -> void:
#if _anim_name == "attack_hammer" or _anim_name == "attack_axe":
if _anim_name == _attack_animation_name:
_can_attack = true
set_physics_process(true)

View File

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

View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=3 uid="uid://dfbpq23nrtd23"]
[ext_resource type="Script" uid="uid://cbuavletjs0kl" path="res://Factions/Knights/Troops/base_character.gd" id="1_jdal0"]
[node name="BaseCharacter" type="CharacterBody2D" node_paths=PackedStringArray("_animation", "_sprite2d")]
script = ExtResource("1_jdal0")
_animation = NodePath("Animation")
_sprite2d = NodePath("Texture")
[node name="Texture" type="Sprite2D" parent="."]
[node name="Collision" type="CollisionShape2D" parent="."]
[node name="Animation" type="AnimationPlayer" parent="."]
[connection signal="animation_finished" from="Animation" to="." method="_on_animation_finished"]