chore,gd: refactored project structure and started the mantle system

This commit is contained in:
2025-05-22 13:35:01 +02:00
parent 67461aa4be
commit a926840570
212 changed files with 422 additions and 409 deletions

View File

@ -0,0 +1,33 @@
using Godot;
// This script is an example of how you can create game systems that
// interact with PlayerController. This script applies a low gravity effect
// to any PlayerController that enters the Area3D. It does this by modifying
// the value of AdditionalGravityPower owned by the Gravity child of
// PlayerController.
namespace PolarBears.PlayerControllerAddon;
public partial class LowGravityArea3D : Area3D
{
[Export] public float GravityReduction { set; get; } = 0.4f;
public override void _Ready()
{
BodyEntered += (Node3D body) =>
{
if (body is PlayerController player) {
player.Gravity.AdditionalGravityPower *= GravityReduction;
GD.Print("Low Gravity Zone Entered");
}
};
BodyExited += (Node3D body) =>
{
if (body is PlayerController player) {
player.Gravity.AdditionalGravityPower /= GravityReduction;
GD.Print("Low Gravity Zone Exited");
}
};
}
}