added fixed dash targets and can dash towards enemies to hit them, get a knockback or dash through if killed
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Export (push) Failing after 1m51s

This commit is contained in:
2026-01-21 16:46:20 +01:00
parent fb78add739
commit db49703326
19 changed files with 370 additions and 60 deletions

View File

@@ -0,0 +1,31 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IStunnable
{
public Vector3 GetTargetGlobalPosition()
{
return GlobalPosition;
}
private uint _defaultCollisionMask;
public override void _Ready()
{
_defaultCollisionMask = CollisionMask;
}
public bool IsStunned { get; set; }
public float StunDuration { get; set; } = 0.1f;
public void Stun()
{
_defaultCollisionMask = 0;
GetTree().CreateTimer(StunDuration).Timeout += Unstun;
}
public void Unstun()
{
_defaultCollisionMask = CollisionMask;
}
}

View File

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

View File

@@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=3 uid="uid://qup00a7x2sji"]
[ext_resource type="Script" uid="uid://c10qfkvmrm6uq" path="res://scenes/FixedDashTarget/FixedDashthroughTarget.cs" id="1_r0j7a"]
[sub_resource type="SphereShape3D" id="SphereShape3D_nkm8n"]
radius = 1.0
[sub_resource type="SphereMesh" id="SphereMesh_r0j7a"]
radius = 1.0
height = 2.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kgb3i"]
albedo_color = Color(5.1018596e-06, 0.6818665, 0.7627612, 1)
metallic = 0.8
metallic_specular = 0.6
roughness = 0.1
emission_enabled = true
emission = Color(0, 0.68968636, 0.7473501, 1)
[node name="FixedDashthroughTarget" type="AnimatableBody3D"]
collision_layer = 288
collision_mask = 0
script = ExtResource("1_r0j7a")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_nkm8n")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_r0j7a")
surface_material_override/0 = SubResource("StandardMaterial3D_kgb3i")