Skip to content

Instantly share code, notes, and snippets.

@blackwolf12333
Created January 1, 2015 18:04
Show Gist options
  • Save blackwolf12333/81d6902be63270ccc0e8 to your computer and use it in GitHub Desktop.
Save blackwolf12333/81d6902be63270ccc0e8 to your computer and use it in GitHub Desktop.
extends Node2D
# member variables here, example:
# var a=2
# var b="textvar"
func _ready():
set_process(true)
get_node("player").connect("body_enter", self, "_on_player_body_enter")
pass
func _process(delta):
var pos = get_node("player").get_pos()
pos.y -= 20*delta;
get_node("player").set_pos(pos)
func _on_player_body_enter( body ):
print(body)
pass # replace with function body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment