mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 22:05:53 +00:00
Turrets
This commit is contained in:
parent
1d24be6156
commit
d60878c94b
10 changed files with 180 additions and 4 deletions
19
Scripts/Actors/Turret.cs
Normal file
19
Scripts/Actors/Turret.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
public partial class Turret : Enemy
|
||||
{
|
||||
private AnimatedSprite2D _sprite;
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
|
||||
_sprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
|
||||
|
||||
_sprite.Play("default");
|
||||
_sprite.SpeedScale = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -113,7 +113,6 @@ public partial class CameraPlayerDetection : PlayerDetection
|
|||
Node colliderNode = result["collider"].As<Node>();
|
||||
if (colliderNode is InteractionController interactionController && interactionController == _cachedPlayer)
|
||||
{
|
||||
GD.Print("Player detected!");
|
||||
detected = true;
|
||||
// Handle detection logic here
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue