mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 11:15:55 +00:00
Preliminary lasers
This commit is contained in:
parent
3a7fd66193
commit
7cb5bfb593
20 changed files with 1779 additions and 1049 deletions
|
|
@ -38,6 +38,11 @@ public partial class OpenCloseActorAnimationManager3D : Node
|
|||
}
|
||||
}
|
||||
|
||||
public void Toggle(bool state)
|
||||
{
|
||||
AnimationPlayer.Play(state ? OpeningAnimationName : ClosingAnimationName);
|
||||
}
|
||||
|
||||
public void PlayOpening()
|
||||
{
|
||||
AnimationPlayer.Play(OpeningAnimationName);
|
||||
|
|
|
|||
23
Scripts/Actors/3D/Turret3DAnimator.cs
Normal file
23
Scripts/Actors/3D/Turret3DAnimator.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors._3D;
|
||||
|
||||
public partial class Turret3DAnimator : Node
|
||||
{
|
||||
[Export] public AnimationPlayer Animator { get; private set; }
|
||||
[Export] public StringName OnAnimationName { get; private set; }
|
||||
[Export] public StringName OffAnimationName { get; private set; }
|
||||
|
||||
public void ChangeState(bool state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
Animator?.Play(OnAnimationName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Animator?.Play(OffAnimationName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
1
Scripts/Actors/3D/Turret3DAnimator.cs.uid
Normal file
1
Scripts/Actors/3D/Turret3DAnimator.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cbnblvav5ck8a
|
||||
|
|
@ -23,6 +23,8 @@ public partial class ScriptableBulletsEmitter3D : Destructible3D, IActivable, IS
|
|||
[Export]
|
||||
public bool EmitOnStart { get; set; } = false;
|
||||
|
||||
[Export]
|
||||
public bool IndestructibleWhileDisabled { get; set; } = true;
|
||||
// [Export] public bool Indestructible { get; private set; } = false;
|
||||
// [Export] public float Health = 1f;
|
||||
//
|
||||
|
|
@ -32,7 +34,8 @@ public partial class ScriptableBulletsEmitter3D : Destructible3D, IActivable, IS
|
|||
|
||||
[Signal]
|
||||
public delegate void StateChangedEventHandler(bool isEmitting);
|
||||
|
||||
|
||||
|
||||
private bool _isActive = false;
|
||||
|
||||
//private BulletScript _scriptInstance;
|
||||
|
|
@ -63,7 +66,8 @@ public partial class ScriptableBulletsEmitter3D : Destructible3D, IActivable, IS
|
|||
_isActive = true;
|
||||
ScriptMachine.Start();
|
||||
}
|
||||
EmitSignal(SignalName.StateChanged, _isActive);
|
||||
EmitSignalStateChanged(_isActive);
|
||||
//EmitSignal(SignalName.StateChanged, _isActive);
|
||||
}
|
||||
|
||||
public override void _func_godot_apply_properties(Dictionary<string, Variant> props)
|
||||
|
|
@ -116,7 +120,8 @@ public partial class ScriptableBulletsEmitter3D : Destructible3D, IActivable, IS
|
|||
ScriptMachine.Start();
|
||||
}
|
||||
|
||||
EmitSignal(SignalName.StateChanged, _isActive);
|
||||
EmitSignalStateChanged(_isActive);
|
||||
//EmitSignal(SignalName.StateChanged, _isActive);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue