fixed basic movement, now add world loading
This commit is contained in:
parent
34ba37312a
commit
50f37ebc5f
23 changed files with 482 additions and 27 deletions
18
scripts/gameplay/Player.cs
Normal file
18
scripts/gameplay/Player.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/// <summary>
|
||||
/// Moves the player using top-down controls.
|
||||
/// </summary>
|
||||
|
||||
using Godot;
|
||||
//using System;
|
||||
|
||||
public partial class Player : CharacterBody2D
|
||||
{
|
||||
[Export] public float Speed = 220f;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Vector2 input = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
|
||||
Velocity = input * Speed;
|
||||
MoveAndSlide();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue