mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 11:55:54 +00:00
Isometric implementation
This commit is contained in:
parent
1434f7aa6d
commit
ed656f00bb
92 changed files with 2834 additions and 223 deletions
|
|
@ -23,6 +23,8 @@ public partial class FreezeModule : ModuleBase<PlayerState, CharacterBody2D>
|
|||
public bool Enabled { get; set; } = false;
|
||||
|
||||
private double _cooldownTimer = 0;
|
||||
|
||||
private IStateMachine<PlayerState, CharacterBody2D> _machine;
|
||||
|
||||
public override void EnterState(PlayerState state)
|
||||
{
|
||||
|
|
@ -33,9 +35,10 @@ public partial class FreezeModule : ModuleBase<PlayerState, CharacterBody2D>
|
|||
{
|
||||
Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody2D> machine)
|
||||
{
|
||||
_machine = machine;
|
||||
}
|
||||
|
||||
public override void Process(double delta)
|
||||
|
|
@ -77,7 +80,7 @@ public partial class FreezeModule : ModuleBase<PlayerState, CharacterBody2D>
|
|||
where child.BulletOwner is not BulletOwner.Player
|
||||
where !child.IsFrozen
|
||||
where child.BulletInfo.Freezable
|
||||
let distance = GlobalPosition.DistanceTo(child.GlobalPosition)
|
||||
let distance = _machine.MainObject.GlobalPosition.DistanceTo(child.GlobalPosition)
|
||||
where distance <= FreezeRadius
|
||||
select child).ToList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue