forked from team-sg/hero-mark-2
first commit
This commit is contained in:
commit
096ebe5aa4
275 changed files with 3937 additions and 0 deletions
13
objects/rock/rock.gd
Normal file
13
objects/rock/rock.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends KinematicBody2D
|
||||
var velocity = Vector2.ZERO
|
||||
|
||||
func _physics_process(delta):
|
||||
if !is_on_floor():
|
||||
#Gravity
|
||||
velocity.y = 100
|
||||
velocity.x = 0
|
||||
move_and_slide(velocity,Vector2.UP)
|
||||
velocity.x = 0
|
||||
|
||||
func push(direction):
|
||||
velocity -= direction * 32
|
Loading…
Add table
Add a link
Reference in a new issue