![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | ZombieGame007 |
extends KinematicBody2D
var speed = 1
Declare member variables here. Examples:
var a = 2
var b = “text”
Called when the node enters the scene tree for the first time.
func _physics_process(delta):
if Input.is_key_pressed(KEY_W):
move_and_collide(Vector2(0,-speed)):
else Input.is_key_pressed(KEY_S):
move_and_collide(Vector2(0,speed)):