removed null!
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 4m52s

This commit is contained in:
2026-02-26 19:18:27 +01:00
parent 5408f455af
commit 290f79afd4
16 changed files with 151 additions and 151 deletions

View File

@@ -49,45 +49,45 @@ public partial class PlayerController : CharacterBody3D,
[Signal]
public delegate void PlayerDiedEventHandler();
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
public event Action<IHealthable, HealthChangedRecord> HealthChanged = null!;
public event Action<IHealthable> HealthDepleted = null!;
public event Action<IDamageable, DamageRecord> DamageTaken;
public event Action<IHealthable, HealthChangedRecord> HealthChanged;
public event Action<IHealthable> HealthDepleted;
///////////////////////////
// Public stuff //
///////////////////////////
public HeadSystem HeadSystem = null!;
public StairsSystem StairsSystem = null!;
public MantleSystem MantleSystem = null!;
public DashSystem DashSystem = null!;
public CollisionShape3D StandingCollider = null!;
public CollisionShape3D SlideCollider = null!;
public WeaponSystem WeaponSystem = null!;
public WallHugSystem WallHugSystem = null!;
public PlayerUi PlayerUi = null!;
public TextureRect DashIndicator = null!;
public ColorRect PowerCooldownIndicator = null!;
public Node3D DashIndicatorNode = null!;
public MeshInstance3D DashIndicatorMesh = null!;
public CylinderMesh DashIndicatorMeshCylinder = null!;
public RayCast3D WallRunSnapper = null!;
public ShapeCast3D GroundDetector = null!;
public ShapeCast3D CeilingDetector = null!;
public RayCast3D DirectGroundDetector = null!;
public Area3D WeaponHitbox = null!;
public AudioStreamPlayer3D SfxPlayer = null!;
public HeadSystem HeadSystem;
public StairsSystem StairsSystem;
public MantleSystem MantleSystem;
public DashSystem DashSystem;
public CollisionShape3D StandingCollider;
public CollisionShape3D SlideCollider;
public WeaponSystem WeaponSystem;
public WallHugSystem WallHugSystem;
public PlayerUi PlayerUi;
public TextureRect DashIndicator;
public ColorRect PowerCooldownIndicator;
public Node3D DashIndicatorNode;
public MeshInstance3D DashIndicatorMesh;
public CylinderMesh DashIndicatorMeshCylinder;
public RayCast3D WallRunSnapper;
public ShapeCast3D GroundDetector;
public ShapeCast3D CeilingDetector;
public RayCast3D DirectGroundDetector;
public Area3D WeaponHitbox;
public AudioStreamPlayer3D SfxPlayer;
public ShapeCast3D DashDamageDetector = null!;
public Area3D SlidingEnemyDetector = null!;
public ShapeCast3D DashDamageDetector;
public Area3D SlidingEnemyDetector;
public EntityAttributes Attributes { get; set; } = null!;
public EntityTags Tags { get; set; } = null!;
public EffectsManager EffectsManager { get; set; } = null!;
public EntityAbilities Abilities { get; set; } = null!;
public EventManager Events { get; set; } = null!;
public EntityAttributes Attributes { get; set; }
public EntityTags Tags { get; set; }
public EffectsManager EffectsManager { get; set; }
public EntityAbilities Abilities { get; set; }
public EventManager Events { get; set; }
// Inspector stuff
[Export] public Marker3D TutorialWeaponTarget = null!;
[Export] public Marker3D TutorialWeaponTarget;
[Export] public bool TutorialDone { get; set; }
[Export] public bool HasSword { get; set; } = true;
[Export] public bool HasParry { get; set; } = true;
@@ -102,9 +102,9 @@ public partial class PlayerController : CharacterBody3D,
[Export(PropertyHint.Range, "0,10f,0.1,or_greater")]
public float AimAssistReductionStartDistance { get; set; } = 10f;
[ExportGroup("Damage")] [Export] public RDamage RDamage { get; set; } = null!;
[Export] public RKnockback? RKnockback { get; set; } = null!;
[Export] public RHealth? RHealth { get; set; } = null!;
[ExportGroup("Damage")] [Export] public RDamage RDamage { get; set; }
[Export] public RKnockback? RKnockback { get; set; }
[Export] public RHealth? RHealth { get; set; }
[ExportGroup("Targeting")]
[Export(PropertyHint.Range, "0,20,0.1,or_greater")]
@@ -114,7 +114,7 @@ public partial class PlayerController : CharacterBody3D,
[ExportGroup("Instantiation")]
[Export]
public PackedScene Explosion { get; set; } = null!;
public PackedScene Explosion { get; set; }
// Movement stuff
[ExportCategory("Movement")]
@@ -141,7 +141,7 @@ public partial class PlayerController : CharacterBody3D,
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float MantleTime { get; set; } = 0.1f;
[Export]
public PackedScene MantlePath { get; set; } = null!;
public PackedScene MantlePath { get; set; }
[Export(PropertyHint.Range, "0,50,0.1")]
public float MantleDashStrength { get; set; } = 15f;
@@ -266,8 +266,8 @@ public partial class PlayerController : CharacterBody3D,
// Stairs and shit
private float _lastFrameWasOnFloor = -Mathf.Inf;
private const int NumOfHeadCollisionDetectors = 4;
private RayCast3D[] _headCollisionDetectors = null!;
private AudioStreamPlaybackInteractive _audioStream = null!;
private RayCast3D[] _headCollisionDetectors;
private AudioStreamPlaybackInteractive _audioStream;
// Basic movement
private bool _movementEnabled = true;
@@ -291,7 +291,7 @@ public partial class PlayerController : CharacterBody3D,
private Path? _mantlePath;
private bool _customMantle;
private Transform3D _customMantleStartTransform;
private Curve3D _customMantleCurve = null!;
private Curve3D _customMantleCurve;
private Vector3 _mantleStartPosition;
private Vector3 _velocityOnMantleStarted = Vector3.Zero;
@@ -328,56 +328,56 @@ public partial class PlayerController : CharacterBody3D,
private float _aimAssistMultiplier = 1.0f;
// Timers
private Timer _timeScaleAimInAirTimer = null!;
private Timer _weaponThrowUncatchableTimer = null!;
private Timer _simpleDashCooldownTimer = null!;
private Timer _airborneDashCooldownTimer = null!;
private Timer _powerCooldownTimer = null!;
private Timer _invincibilityTimer = null!;
private Timer _attackCooldown = null!;
private Timer _timeScaleAimInAirTimer;
private Timer _weaponThrowUncatchableTimer;
private Timer _simpleDashCooldownTimer;
private Timer _airborneDashCooldownTimer;
private Timer _powerCooldownTimer;
private Timer _invincibilityTimer;
private Timer _attackCooldown;
// State chart
private StateChart _playerState = null!;
private StateChart _playerState;
private StateChartState _aiming = null!;
private StateChartState _powerExpired = null!;
private StateChartState _powerRecharging = null!;
private StateChartState _powerFull = null!;
private StateChartState _aiming;
private StateChartState _powerExpired;
private StateChartState _powerRecharging;
private StateChartState _powerFull;
private StateChartState _grounded = null!;
private StateChartState _airborne = null!;
private StateChartState _coyoteEnabled = null!;
private StateChartState _jumping = null!;
private StateChartState _simpleJump = null!;
private StateChartState _doubleJump = null!;
private StateChartState _mantling = null!;
private StateChartState _simpleDash = null!;
private StateChartState _aimedDash = null!;
private StateChartState _weaponDash = null!;
private StateChartState _sliding = null!;
private StateChartState _groundSliding = null!;
private StateChartState _airGliding = null!;
private StateChartState _airGlidingDoubleJump = null!;
private StateChartState _slideCanceled = null!;
private StateChartState _slamming = null!;
private StateChartState _onWall = null!;
private StateChartState _onWallHugging = null!;
private StateChartState _onWallHanging = null!;
private StateChartState _onWallRunning = null!;
private StateChartState _grounded;
private StateChartState _airborne;
private StateChartState _coyoteEnabled;
private StateChartState _jumping;
private StateChartState _simpleJump;
private StateChartState _doubleJump;
private StateChartState _mantling;
private StateChartState _simpleDash;
private StateChartState _aimedDash;
private StateChartState _weaponDash;
private StateChartState _sliding;
private StateChartState _groundSliding;
private StateChartState _airGliding;
private StateChartState _airGlidingDoubleJump;
private StateChartState _slideCanceled;
private StateChartState _slamming;
private StateChartState _onWall;
private StateChartState _onWallHugging;
private StateChartState _onWallHanging;
private StateChartState _onWallRunning;
private StateChartState _attackStandard = null!;
private StateChartState _attackDash = null!;
private StateChartState _parryStandard = null!;
private StateChartState _parryDash = null!;
private StateChartState _attackStandard;
private StateChartState _attackDash;
private StateChartState _parryStandard;
private StateChartState _parryDash;
private Transition _onJumpFromWall = null!;
private Transition _onJumpFromWallFalling = null!;
private Transition _onJumpFromWallRunning = null!;
private Transition _onLeaveWallFromRun = null!;
private Transition _onAirborneToGrounded = null!;
private Transition _onJumpFromWall;
private Transition _onJumpFromWallFalling;
private Transition _onJumpFromWallRunning;
private Transition _onLeaveWallFromRun;
private Transition _onAirborneToGrounded;
private Transition _onGroundSlideJump = null!;
private Transition _onAirGlideDoubleJump = null!;
private Transition _onGroundSlideJump;
private Transition _onAirGlideDoubleJump;
// Damage
public CDamageable? CDamageable { get; set; }
@@ -395,9 +395,9 @@ public partial class PlayerController : CharacterBody3D,
private readonly List<IDamageable> _hitEnemies = new List<IDamageable>();
private ShapeCast3D _closeEnemyDetector = null!;
private RayCast3D _aimAssisRayCast = null!;
private Camera3D _camera = null!;
private ShapeCast3D _closeEnemyDetector;
private RayCast3D _aimAssisRayCast;
private Camera3D _camera;
public override void _Ready()
{
@@ -2348,7 +2348,7 @@ public partial class PlayerController : CharacterBody3D,
_audioStream.SwitchToClipByName("parry");
}
private PhysicsDirectSpaceState3D _spaceState = null!;
private PhysicsDirectSpaceState3D _spaceState;
public void StartDashAction(bool isParry)
{
if (isParry) HeadSystem.OnParry();