basic capture functionality
This commit is contained in:
parent
246f3c0840
commit
c141e6a169
20 changed files with 430 additions and 14 deletions
20
scripts/world/Creature.cs
Normal file
20
scripts/world/Creature.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Godot;
|
||||
|
||||
public partial class Creature : Area2D
|
||||
{
|
||||
[Export] public string CreatureId { get; set; } = "creature:ember_fox";
|
||||
public bool IsCaptured { get; private set; } = false;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Make sure we receive overlap events
|
||||
Monitoring = true;
|
||||
Monitorable = true;
|
||||
}
|
||||
|
||||
public void Despawn()
|
||||
{
|
||||
IsCaptured = true;
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue