Initial commit: Godot idle game project setup with basic player movement
This commit is contained in:
commit
ef38f19f04
7 changed files with 130 additions and 0 deletions
7
scripts/Main.gd
Normal file
7
scripts/Main.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
print("Game started!")
|
||||
|
||||
func _process(_delta):
|
||||
pass
|
||||
8
scripts/Player.gd
Normal file
8
scripts/Player.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends CharacterBody2D
|
||||
|
||||
const SPEED = 300.0
|
||||
|
||||
func _physics_process(_delta):
|
||||
var direction = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
||||
velocity = direction * SPEED
|
||||
move_and_slide()
|
||||
Loading…
Add table
Add a link
Reference in a new issue