Initial commit

This commit is contained in:
2026-01-17 18:33:45 -06:00
commit 673bdc0396
45 changed files with 856 additions and 0 deletions

BIN
Characters/Knight/Body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4yg084mipkvx"
path="res://.godot/imported/Body.png-9ac1bc650c921cb3e7a32b6cc11a85a8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Knight/Body.png"
dest_files=["res://.godot/imported/Body.png-9ac1bc650c921cb3e7a32b6cc11a85a8.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,27 @@
using System.Collections.Generic;
using Godot;
public partial class Knight : CharacterBase
{
[Export] public PackedScene Weapon { get; set; } = default!;
public override string[] _GetConfigurationWarnings()
{
var strings = new List<string>();
if (!Weapon?.CanInstantiate() ?? true)
{
strings.Add("Weapon is not set or invalid scene.");
}
return [.. strings];
}
protected override void _UsePrimary()
{
var weapon = Weapon.Instantiate<MeleeBase>();
weapon.Spawn(this);
AddChild(weapon);
}
}

View File

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

View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://csrkrerssl8wm"]
[ext_resource type="Script" uid="uid://c3ydje1po7p2w" path="res://Characters/Knight/Knight.cs" id="1_8l5bb"]
[ext_resource type="PackedScene" uid="uid://bqiniro3w8jom" path="res://Abilities/Sword/Sword.tscn" id="2_0fgit"]
[ext_resource type="Texture2D" uid="uid://4yg084mipkvx" path="res://Characters/Knight/Body.png" id="3_5avd5"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0fgit"]
size = Vector2(16, 32)
[node name="Character" type="CharacterBody2D"]
motion_mode = 1
script = ExtResource("1_8l5bb")
Weapon = ExtResource("2_0fgit")
Speed = 300.0
PrimaryCooldown = 1.0
[node name="Body" type="Sprite2D" parent="."]
texture = ExtResource("3_5avd5")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_0fgit")