2.3
This commit is contained in:
parent
a698901777
commit
680126711f
1 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,7 @@ using System;
|
||||||
|
|
||||||
public partial class Player : Node3D
|
public partial class Player : Node3D
|
||||||
{
|
{
|
||||||
|
private int counter = 0;
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
GD.Print("Hello World!");
|
GD.Print("Hello World!");
|
||||||
|
@ -11,9 +12,10 @@ public partial class Player : Node3D
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
if (Input.IsActionJustPressed("ui_accept"))
|
if (Input.IsActionJustPressed("ui_accept")){
|
||||||
{
|
GD.Print("Spacebar is pressed");
|
||||||
GD.Print("Player accepted");
|
counter += 1;
|
||||||
|
GD.Print("Counter: " + counter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue