basic tests for a wider variety of files
This commit is contained in:
@@ -7,7 +7,7 @@ using Movementtests.systems.damage;
|
||||
[GlobalClass]
|
||||
public partial class RDamageModifier : Resource, IDamageable
|
||||
{
|
||||
public event Action<IDamageable, DamageRecord> DamageTaken;
|
||||
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
|
||||
|
||||
[Export]
|
||||
public EDamageTypes DamageType { get; set;}
|
||||
|
||||
@@ -5,11 +5,11 @@ using Movementtests.interfaces;
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
||||
public partial class CHealth : Node, IHealthable
|
||||
{
|
||||
public event Action<IHealthable, HealthChangedRecord> HealthChanged;
|
||||
public event Action<IHealthable> HealthDepleted;
|
||||
public event Action<IHealthable, HealthChangedRecord> HealthChanged = null!;
|
||||
public event Action<IHealthable> HealthDepleted = null!;
|
||||
|
||||
[Export]
|
||||
public RHealth RHealth { get; set; }
|
||||
public RHealth RHealth { get; set; } = null!;
|
||||
|
||||
public float CurrentHealth { get; set; }
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using Movementtests.interfaces;
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_wind.png")]
|
||||
public partial class CKnockback : Node3D, IKnockbackable
|
||||
{
|
||||
[Export] public RKnockback RKnockback { get; set;}
|
||||
|
||||
private KnockbackRecord _knockbackRecord = null;
|
||||
[Export] public RKnockback RKnockback { get; set;} = null!;
|
||||
|
||||
private KnockbackRecord _knockbackRecord = null!;
|
||||
|
||||
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
||||
{
|
||||
@@ -20,7 +20,7 @@ public partial class CKnockback : Node3D, IKnockbackable
|
||||
|
||||
var knockbackDirection = GlobalPosition - _knockbackRecord.DamageRecord.SourceLocation;
|
||||
var finalKnockback = knockbackDirection.Normalized() * RKnockback.Modifier * _knockbackRecord.ForceMultiplier;
|
||||
_knockbackRecord = null;
|
||||
_knockbackRecord = null!;
|
||||
return finalKnockback;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,9 @@ namespace Movementtests.scenes.movement;
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_path_follow.png")]
|
||||
public partial class CGroundedMovement : Node3D, IMoveable
|
||||
{
|
||||
[Export] public RMovement RMovement { get; set; }
|
||||
[Export] public RMovement RMovement { get; set; } = null!;
|
||||
|
||||
[Export]
|
||||
public RayCast3D WallInFrontRayCast { get; set; }
|
||||
[Export] public RayCast3D WallInFrontRayCast { get; set; } = null!;
|
||||
|
||||
|
||||
public Vector3 ComputeVelocity(MovementInputs inputs)
|
||||
|
||||
Reference in New Issue
Block a user