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

34
Abilities/Sword/Sword.cs Normal file
View File

@@ -0,0 +1,34 @@
using Godot;
using System;
public partial class Sword : MeleeBase
{
[Export] public float SweepArcDegrees { get; set; } = 90f;
[Export] public float Lifetime { get; set; } = 0.25f;
float _elapsedTime = 0f;
float _startRotation, _endRotation;
public override void _Ready()
{
base._Ready();
_startRotation = Rotation + Mathf.DegToRad(-SweepArcDegrees * 0.5f);
_endRotation = Rotation + Mathf.DegToRad(SweepArcDegrees * 0.5f);
Rotation = _startRotation;
}
public override void _PhysicsProcess(double delta)
{
_elapsedTime += (float)delta;
var t = _elapsedTime / Lifetime;
Rotation = Mathf.Lerp(_startRotation, _endRotation, t);
if (_elapsedTime >= Lifetime)
{
QueueFree();
}
}
}

View File

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

BIN
Abilities/Sword/Sword.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8iyfaq0a52a2"
path="res://.godot/imported/Sword.png-99830bfad10ffac3bbbde6d72e00388c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Abilities/Sword/Sword.png"
dest_files=["res://.godot/imported/Sword.png-99830bfad10ffac3bbbde6d72e00388c.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,16 @@
[gd_scene load_steps=3 format=3 uid="uid://bqiniro3w8jom"]
[ext_resource type="Texture2D" uid="uid://8iyfaq0a52a2" path="res://Abilities/Sword/Sword.png" id="1_0u6wf"]
[ext_resource type="Script" uid="uid://dgcyfw7bpt67q" path="res://Abilities/Sword/Sword.cs" id="1_aoixy"]
[node name="Sword" type="Area2D"]
script = ExtResource("1_aoixy")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(9, -4.7683716e-07)
rotation = 2.3561945
texture = ExtResource("1_0u6wf")
[node name="Collision" type="CollisionPolygon2D" parent="."]
position = Vector2(0, -7.5)
polygon = PackedVector2Array(21, 7.5, 18, 10.5, 6, 10.5, 6, 4.5, 18, 4.5)