This commit is contained in:
Dukantic
2024-10-25 20:35:40 +02:00
parent 2d1cbb3129
commit b32f61c50e
38 changed files with 1336 additions and 49 deletions

View File

@@ -1,6 +1,7 @@
using Godot;
using Godot.Collections;
using System;
using System.Threading.Tasks;
public partial class Gameboy : CanvasLayer
{
@@ -27,18 +28,21 @@ public partial class Gameboy : CanvasLayer
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
/*
if (Input.IsActionJustPressed("game"))
{
start();
}
else if (Input.IsActionJustPressed("interact") || Input.IsActionJustPressed("game"))
else if (Input.IsActionJustPressed("game"))
{
stop();
}
*/
}
void start()
async void start()
{
await ToSignal(GetTree().CreateTimer(0.5), "timeout");
Input.MouseMode = Input.MouseModeEnum.Visible;
player.Set("pausable", false);
this.Visible = true;
@@ -53,9 +57,9 @@ public partial class Gameboy : CanvasLayer
void attack()
{
if((int)Cmenu.Get("spell") -1 >= round)
if(round == 8 || (int)Cmenu.Get("spell") -1 >= round)
{
round = (round + 1) % 8;
round = (round + 1) % 9;
anim.Play(round.ToString());
actScore++;
updateScore();