complete project reorganization
This commit is contained in:
31
scenes/components/damage/CDamageable.cs
Normal file
31
scenes/components/damage/CDamageable.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_skull.png")]
|
||||
public partial class CDamageable : Node, IDamageable
|
||||
{
|
||||
public event Action<IDamageable, DamageRecord> DamageTaken;
|
||||
|
||||
[Export]
|
||||
public RDamageModifier[] DamageModifiers { get; set; }
|
||||
|
||||
|
||||
public DamageRecord TakeDamage(DamageRecord damageRecord)
|
||||
{
|
||||
var finalDamage = 0f;
|
||||
foreach (var damageable in DamageModifiers.ToIDamageables())
|
||||
finalDamage += damageable.TakeDamage(damageRecord).Damage.DamageDealt;
|
||||
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||
DamageTaken?.Invoke(this, finalDamageRecord);
|
||||
return finalDamageRecord;
|
||||
}
|
||||
|
||||
public DamageRecord ComputeDamage(DamageRecord damageRecord)
|
||||
{
|
||||
var finalDamage = 0f;
|
||||
foreach (var damageable in DamageModifiers.ToIDamageables())
|
||||
finalDamage += damageable.ComputeDamage(damageRecord).Damage.DamageDealt;
|
||||
return damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||
}
|
||||
}
|
||||
1
scenes/components/damage/CDamageable.cs.uid
Normal file
1
scenes/components/damage/CDamageable.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b0u23nkpaimyc
|
||||
6
scenes/components/damage/CDamageable.tscn
Normal file
6
scenes/components/damage/CDamageable.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://hpsg4fqwrx1u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://scenes/components/damage/CDamageable.cs" id="1_qp8bd"]
|
||||
|
||||
[node name="CDamageable" type="Node" unique_id=482221079]
|
||||
script = ExtResource("1_qp8bd")
|
||||
9
scenes/components/damage/EDamageTypes.cs
Normal file
9
scenes/components/damage/EDamageTypes.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Movementtests.systems.damage;
|
||||
|
||||
public enum EDamageTypes
|
||||
{
|
||||
Normal,
|
||||
Fire,
|
||||
Ice,
|
||||
Explosion,
|
||||
}
|
||||
1
scenes/components/damage/EDamageTypes.cs.uid
Normal file
1
scenes/components/damage/EDamageTypes.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dubmiwfuunxmu
|
||||
20
scenes/components/damage/RDamage.cs
Normal file
20
scenes/components/damage/RDamage.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.systems.damage;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_skull.png")]
|
||||
public partial class RDamage : Resource
|
||||
{
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float DamageDealt { get; set;}
|
||||
|
||||
[Export]
|
||||
public EDamageTypes DamageType { get; set;}
|
||||
|
||||
public RDamage() : this(1.0f, EDamageTypes.Normal) {}
|
||||
public RDamage(float damageDealt, EDamageTypes damageType)
|
||||
{
|
||||
DamageDealt = damageDealt;
|
||||
DamageType = damageType;
|
||||
}
|
||||
}
|
||||
1
scenes/components/damage/RDamage.cs.uid
Normal file
1
scenes/components/damage/RDamage.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://jitubgv6judn
|
||||
43
scenes/components/damage/RDamageModifier.cs
Normal file
43
scenes/components/damage/RDamageModifier.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.interfaces;
|
||||
using Movementtests.systems.damage;
|
||||
|
||||
[Icon("res://assets/ui/IconGodotNode/white/icon_freeze.png")]
|
||||
[GlobalClass]
|
||||
public partial class RDamageModifier : Resource, IDamageable
|
||||
{
|
||||
public event Action<IDamageable, DamageRecord> DamageTaken;
|
||||
|
||||
[Export]
|
||||
public EDamageTypes DamageType { get; set;}
|
||||
[Export]
|
||||
public float Modifier { get; set;}
|
||||
|
||||
public RDamageModifier() : this(EDamageTypes.Normal, 1.0f) {}
|
||||
public RDamageModifier(EDamageTypes damageType, float modifier)
|
||||
{
|
||||
Modifier = modifier;
|
||||
DamageType = damageType;
|
||||
}
|
||||
|
||||
public DamageRecord TakeDamage(DamageRecord damageRecord)
|
||||
{
|
||||
if (damageRecord.Damage.DamageType != DamageType)
|
||||
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||
|
||||
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
|
||||
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||
DamageTaken?.Invoke(this, finalDamageRecord);
|
||||
return finalDamageRecord;
|
||||
}
|
||||
|
||||
public DamageRecord ComputeDamage(DamageRecord damageRecord)
|
||||
{
|
||||
if (damageRecord.Damage.DamageType != DamageType)
|
||||
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||
|
||||
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
|
||||
return damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||
}
|
||||
}
|
||||
1
scenes/components/damage/RDamageModifier.cs.uid
Normal file
1
scenes/components/damage/RDamageModifier.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b6y3ugfydvch0
|
||||
35
scenes/components/health/CHealth.cs
Normal file
35
scenes/components/health/CHealth.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Godot;
|
||||
using System;
|
||||
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;
|
||||
|
||||
[Export]
|
||||
public RHealth RHealth { get; set; }
|
||||
|
||||
public float CurrentHealth { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
CurrentHealth = RHealth.StartingHealth;
|
||||
}
|
||||
|
||||
public HealthChangedRecord ReduceHealth(IDamageable source, DamageRecord damageRecord)
|
||||
{
|
||||
var previousHealth = CurrentHealth;
|
||||
CurrentHealth -= damageRecord.Damage.DamageDealt;
|
||||
var record = new HealthChangedRecord(CurrentHealth, previousHealth, RHealth.StartingHealth);
|
||||
HealthChanged?.Invoke(this, record);
|
||||
|
||||
if (CurrentHealth <= 0)
|
||||
{
|
||||
CurrentHealth = 0;
|
||||
HealthDepleted?.Invoke(this);
|
||||
}
|
||||
return record;
|
||||
}
|
||||
}
|
||||
1
scenes/components/health/CHealth.cs.uid
Normal file
1
scenes/components/health/CHealth.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bjwrpv3jpsc1e
|
||||
6
scenes/components/health/CHealth.tscn
Normal file
6
scenes/components/health/CHealth.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://c4ikbhojckpnc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://scenes/components/health/CHealth.cs" id="1_75uyt"]
|
||||
|
||||
[node name="CHealth" type="Node" unique_id=1940090217]
|
||||
script = ExtResource("1_75uyt")
|
||||
14
scenes/components/health/CHealthbar.cs
Normal file
14
scenes/components/health/CHealthbar.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_heart.png")]
|
||||
public partial class CHealthbar : Sprite3D
|
||||
{
|
||||
private Healthbar _healthbar;
|
||||
public Healthbar Healthbar => _healthbar;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_healthbar = GetNode<Healthbar>("%Healthbar");
|
||||
}
|
||||
}
|
||||
1
scenes/components/health/CHealthbar.cs.uid
Normal file
1
scenes/components/health/CHealthbar.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://chfb3cjo6exga
|
||||
32
scenes/components/health/CHealthbar.tscn
Normal file
32
scenes/components/health/CHealthbar.tscn
Normal file
@@ -0,0 +1,32 @@
|
||||
[gd_scene format=3 uid="uid://bwx2um43k0ou4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://chfb3cjo6exga" path="res://scenes/components/health/CHealthbar.cs" id="1_w5itk"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyw8p0p6a78tl" path="res://scenes/ui/healthbar/healthbar.tscn" id="2_w5itk"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_jkj2g"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="CHealthBar" type="Sprite3D" unique_id=1527974573]
|
||||
billboard = 1
|
||||
double_sided = false
|
||||
no_depth_test = true
|
||||
texture = SubResource("ViewportTexture_jkj2g")
|
||||
script = ExtResource("1_w5itk")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="." unique_id=791051331]
|
||||
transparent_bg = true
|
||||
size = Vector2i(520, 20)
|
||||
|
||||
[node name="Healthbar" parent="SubViewport" unique_id=739464079 instance=ExtResource("2_w5itk")]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -120.0
|
||||
offset_top = -4.0
|
||||
offset_right = 120.0
|
||||
offset_bottom = 4.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
12
scenes/components/health/RDeathEffect.cs
Normal file
12
scenes/components/health/RDeathEffect.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_thunder.png")]
|
||||
public partial class RDeathEffect : Resource, IKillable
|
||||
{
|
||||
public void Kill(IHealthable source)
|
||||
{
|
||||
GD.Print($"Death Effect triggered on {source}");
|
||||
}
|
||||
}
|
||||
1
scenes/components/health/RDeathEffect.cs.uid
Normal file
1
scenes/components/health/RDeathEffect.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b4cwruitopcee
|
||||
16
scenes/components/health/RHealth.cs
Normal file
16
scenes/components/health/RHealth.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
||||
public partial class RHealth : Resource
|
||||
{
|
||||
[Export]
|
||||
public float StartingHealth { get; set;}
|
||||
|
||||
public RHealth() : this(100.0f) {}
|
||||
public RHealth(float startingHealth)
|
||||
{
|
||||
StartingHealth = startingHealth;
|
||||
}
|
||||
}
|
||||
1
scenes/components/health/RHealth.cs.uid
Normal file
1
scenes/components/health/RHealth.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://baiapod3csndf
|
||||
26
scenes/components/knockback/CKnockback.cs
Normal file
26
scenes/components/knockback/CKnockback.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Godot;
|
||||
using System;
|
||||
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;
|
||||
|
||||
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
||||
{
|
||||
_knockbackRecord = knockbackRecord;
|
||||
}
|
||||
|
||||
public Vector3 ComputeKnockback()
|
||||
{
|
||||
if (_knockbackRecord == null) return Vector3.Zero;
|
||||
|
||||
var knockbackDirection = GlobalPosition - _knockbackRecord.DamageRecord.SourceLocation;
|
||||
var finalKnockback = knockbackDirection.Normalized() * RKnockback.Modifier * _knockbackRecord.ForceMultiplier;
|
||||
_knockbackRecord = null;
|
||||
return finalKnockback;
|
||||
}
|
||||
}
|
||||
1
scenes/components/knockback/CKnockback.cs.uid
Normal file
1
scenes/components/knockback/CKnockback.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b8dprpcjeac7e
|
||||
13
scenes/components/knockback/CKnockback.tscn
Normal file
13
scenes/components/knockback/CKnockback.tscn
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_scene format=3 uid="uid://bctpe34ddamg5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b8dprpcjeac7e" path="res://scenes/components/knockback/CKnockback.cs" id="1_ix2yg"]
|
||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="2_uqiml"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gbu2d"]
|
||||
script = ExtResource("2_uqiml")
|
||||
Modifier = 1.0
|
||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
||||
|
||||
[node name="CKnockback" type="Node3D" unique_id=303705317]
|
||||
script = ExtResource("1_ix2yg")
|
||||
RKnockback = SubResource("Resource_gbu2d")
|
||||
16
scenes/components/knockback/RKnockback.cs
Normal file
16
scenes/components/knockback/RKnockback.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_wind.png")]
|
||||
public partial class RKnockback : Resource
|
||||
{
|
||||
[Export]
|
||||
public float Modifier { get; set;}
|
||||
|
||||
public RKnockback() : this(1.0f) {}
|
||||
public RKnockback(float modifier)
|
||||
{
|
||||
Modifier = modifier;
|
||||
}
|
||||
}
|
||||
1
scenes/components/knockback/RKnockback.cs.uid
Normal file
1
scenes/components/knockback/RKnockback.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b44cse62qru7j
|
||||
62
scenes/components/movement/CFlyingMovement.cs
Normal file
62
scenes/components/movement/CFlyingMovement.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using Godot;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
namespace Movementtests.scenes.movement;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_path_follow.png")]
|
||||
public partial class CFlyingMovement : Node3D, IMoveable
|
||||
{
|
||||
[Export] public RMovement RMovement { get; set; }
|
||||
|
||||
[Export(PropertyHint.Layers3DPhysics)]
|
||||
public uint TerrainCollision { get; set; } = 1;
|
||||
|
||||
private bool _movingToDesiredHeight = true;
|
||||
private Vector3 _randomDirection;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
|
||||
}
|
||||
|
||||
public Vector3 ComputeVelocity(MovementInputs inputs)
|
||||
{
|
||||
var velocity = inputs.Velocity;
|
||||
var spaceState = GetWorld3D().DirectSpaceState;
|
||||
var target = inputs.TargetLocation;
|
||||
var direction = (target - GlobalPosition).Normalized();
|
||||
// Check if we have a direct line of sight to the player
|
||||
if (!_movingToDesiredHeight)
|
||||
{
|
||||
velocity = velocity.Lerp(direction * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
|
||||
|
||||
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
|
||||
var result = spaceState.IntersectRay(query);
|
||||
if (result.Count > 0)
|
||||
{
|
||||
_movingToDesiredHeight = true;
|
||||
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity = velocity.Lerp(_randomDirection * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
|
||||
|
||||
var groundQuery = PhysicsRayQueryParameters3D.Create(GlobalPosition, GlobalPosition+Vector3.Down*RMovement.TargetHeight, TerrainCollision);
|
||||
var groundResult = spaceState.IntersectRay(groundQuery);
|
||||
if (groundResult.Count == 0)
|
||||
{
|
||||
velocity.Y = 0;
|
||||
|
||||
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
|
||||
var result = spaceState.IntersectRay(query);
|
||||
if (result.Count == 0)
|
||||
{
|
||||
_movingToDesiredHeight = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return velocity;
|
||||
}
|
||||
}
|
||||
1
scenes/components/movement/CFlyingMovement.cs.uid
Normal file
1
scenes/components/movement/CFlyingMovement.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cps1rbkxs3nvq
|
||||
6
scenes/components/movement/CFlyingMovement.tscn
Normal file
6
scenes/components/movement/CFlyingMovement.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://dmw5ibwrb483f"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cps1rbkxs3nvq" path="res://scenes/components/movement/CFlyingMovement.cs" id="1_i26q2"]
|
||||
|
||||
[node name="CFlyingMovement" type="Node3D" unique_id=138989060]
|
||||
script = ExtResource("1_i26q2")
|
||||
35
scenes/components/movement/CGroundedMovement.cs
Normal file
35
scenes/components/movement/CGroundedMovement.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Godot;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
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 RayCast3D WallInFrontRayCast { get; set; }
|
||||
|
||||
|
||||
public Vector3 ComputeVelocity(MovementInputs inputs)
|
||||
{
|
||||
var velocity = inputs.Velocity;
|
||||
var target = inputs.TargetLocation;
|
||||
var direction = (target - GlobalPosition).Normalized();
|
||||
|
||||
var targetPlane = new Vector3(target.X, GlobalPosition.Y, target.Z);
|
||||
LookAt(targetPlane);
|
||||
float xAcc = (float) Mathf.Lerp(velocity.X, direction.X * RMovement.Speed, inputs.delta * RMovement.Acceleration);
|
||||
float zAcc = (float) Mathf.Lerp(velocity.Z, direction.Z * RMovement.Speed, inputs.delta * RMovement.Acceleration);
|
||||
velocity.X = xAcc;
|
||||
velocity.Z = zAcc;
|
||||
|
||||
if (WallInFrontRayCast.IsColliding())
|
||||
velocity.Y = RMovement.Speed;
|
||||
else if (!inputs.isOnFloor)
|
||||
velocity += inputs.gravity * (float)inputs.delta * RMovement.GravityModifier;
|
||||
|
||||
return velocity;
|
||||
}
|
||||
}
|
||||
1
scenes/components/movement/CGroundedMovement.cs.uid
Normal file
1
scenes/components/movement/CGroundedMovement.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bdag2eeixw2lt
|
||||
6
scenes/components/movement/CGroundedMovement.tscn
Normal file
6
scenes/components/movement/CGroundedMovement.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://dbr7ioio158ew"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bdag2eeixw2lt" path="res://scenes/components/movement/CGroundedMovement.cs" id="1_e0agf"]
|
||||
|
||||
[node name="CGroundedMovement" type="Node3D" unique_id=1833494224]
|
||||
script = ExtResource("1_e0agf")
|
||||
25
scenes/components/movement/RMovement.cs
Normal file
25
scenes/components/movement/RMovement.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_path_follow.png")]
|
||||
public partial class RMovement : Resource
|
||||
{
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float Speed { get; set;}
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float Acceleration { get; set;}
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float GravityModifier { get; set;}
|
||||
|
||||
[Export(PropertyHint.Range, "0,20,1,or_greater")]
|
||||
public float TargetHeight { get; set;}
|
||||
|
||||
public RMovement() : this(1.0f, 0.0f, 0.0f, 0.0f) {}
|
||||
public RMovement(float speed, float acceleration, float gravityModifier, float targetHeight)
|
||||
{
|
||||
Speed = speed;
|
||||
Acceleration = acceleration;
|
||||
GravityModifier = gravityModifier;
|
||||
TargetHeight = targetHeight;
|
||||
}
|
||||
}
|
||||
1
scenes/components/movement/RMovement.cs.uid
Normal file
1
scenes/components/movement/RMovement.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dtpxijlnb2c5
|
||||
Reference in New Issue
Block a user