mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:05:34 +00:00
Laser
This commit is contained in:
parent
8e5c575917
commit
75c0a7d994
11 changed files with 813 additions and 293 deletions
24
Scripts/Actors/3D/LaserStarterTest3D.cs
Normal file
24
Scripts/Actors/3D/LaserStarterTest3D.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors._3D;
|
||||
|
||||
public partial class LaserStarterTest3D : Node3D, IActivable
|
||||
{
|
||||
[Export]
|
||||
private Laser _laser;
|
||||
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
GD.Print("Activating laser");
|
||||
_laser.SpawnFromDirection(_laser.GlobalPosition, Vector3.Forward);
|
||||
|
||||
_laser.SpawnFromTarget(_laser.GlobalPosition, _laser.GlobalPosition + new Vector3(20, 0, 0));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Toggle()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue