fixed level loading and starting to setup proper gyms, zoos and playtest levels
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 23s
Create tag and build when new code gets to main / Test (push) Successful in 8m23s
Create tag and build when new code gets to main / Export (push) Successful in 10m40s

This commit is contained in:
2026-02-03 16:31:37 +01:00
parent 8a3faff7d0
commit 0e412c2a42
53 changed files with 1122 additions and 22 deletions

View File

@@ -354,6 +354,13 @@ public partial class PlayerController : CharacterBody3D,
public float CurrentHealth { get; set; }
private bool _isInvincible;
public bool IsInvincibleOverride { get; set; }
public bool IsInvincible
{
get => _isInvincible || IsInvincibleOverride;
set => _isInvincible = value;
}
private readonly List<IDamageable> _hitEnemies = new List<IDamageable>();
private ShapeCast3D _closeEnemyDetector;
@@ -1438,7 +1445,7 @@ public partial class PlayerController : CharacterBody3D,
SetupSlideCollision();
SlidingEnemyDetector.Monitoring = true;
_isInvincible = true;
IsInvincible = true;
}
public bool CanStandUpFromSlide()
@@ -1565,7 +1572,7 @@ public partial class PlayerController : CharacterBody3D,
public void SlideEnded()
{
SlidingEnemyDetector.Monitoring = false;
_isInvincible = false;
IsInvincible = false;
SetupStandingCollision();
_audioStream!.SwitchToClipByName("footsteps");
@@ -2002,7 +2009,7 @@ public partial class PlayerController : CharacterBody3D,
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
if (_isInvincible)
if (IsInvincible)
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
var finalDamage = CDamageable.TakeDamage(damageRecord);
@@ -2023,7 +2030,7 @@ public partial class PlayerController : CharacterBody3D,
public void OnHitInvincibility()
{
_isInvincible = true;
IsInvincible = true;
_invincibilityTimer.Start();
}
@@ -2041,14 +2048,13 @@ public partial class PlayerController : CharacterBody3D,
_audioStream!.SwitchToClipByName("parry");
}
// TODO: fix repeated code and improve parry knockback
private PhysicsDirectSpaceState3D _spaceState;
public void StartDashAction(bool isParry)
{
var streamName = isParry ? "parry" : "attacks";
_audioStream!.SwitchToClipByName(streamName);
_isInvincible = true;
IsInvincible = true;
var plannedDashLocation = _targetLocation + Vector3.Down*HeadSystem.Position.Y;
var query = PhysicsRayQueryParameters3D.Create(HeadSystem.GlobalPosition, plannedDashLocation, DashSystem.DashCast3D.CollisionMask);
@@ -2058,7 +2064,7 @@ public partial class PlayerController : CharacterBody3D,
plannedDashLocation = (Vector3) result["position"];
}
var travel = plannedDashLocation - (GlobalPosition + Vector3.Up*_playerHeight);
var travel = plannedDashLocation - (GlobalPosition + Vector3.Up*_playerHeight/2);
_preDashVelocity = Velocity;
_dashDirection = travel.Normalized();
var dashTween = CreatePositionTween(plannedDashLocation, AimedDashTime);
@@ -2085,7 +2091,7 @@ public partial class PlayerController : CharacterBody3D,
{
stunnable.Stun();
}
_isInvincible = false;
IsInvincible = false;
_playerState.SendEvent("attack_finished");
}
@@ -2205,9 +2211,10 @@ public partial class PlayerController : CharacterBody3D,
public void ResetInvincibility()
{
_isInvincible = false;
IsInvincible = false;
}
// Sound
public void OnFootStepped()
{