Initial commit

This commit is contained in:
2020-10-26 00:50:16 -04:00
commit e3358f6dd1
707 changed files with 12028 additions and 0 deletions

33
scripts/Player.cs Normal file
View File

@@ -0,0 +1,33 @@
using Godot;
using System;
public class Player : Creature
{
[Signal]
public delegate void UpdatePlayerGuiHandler(Player player);
public override void _Ready()
{
// Update GUI on stat changes
health.statUpdated += UpdateGui;
}
public override void _Process(float delta)
{
ProcessMovement();
}
protected void ProcessMovement()
{
Move(InputHandler.MovementInput());
}
protected void UpdateGui(int newValue = -1)
{
EmitSignal(nameof(UpdatePlayerGuiHandler), this);
}
}