Created
January 18, 2021 02:40
-
-
Save seisvelas/cbc15329cfe991adf7b4c22123155a5c to your computer and use it in GitHub Desktop.
Move and slice Godot script for Pancho
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends KinematicBody2D | |
var motion = Vector2() | |
func _physics_process(_delta): | |
motion.y += 10 | |
if Input.is_action_pressed("ui_right"): | |
motion.x = 200 | |
elif Input.is_action_pressed("ui_left"): | |
motion.x = -200 | |
else: | |
motion.x = 0 | |
var _mov_and_slide_ret = move_and_slide(motion) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment