game
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user