first commit

This commit is contained in:
John Murphy
2017-09-09 23:43:18 -07:00
parent 1edf82bc30
commit a48a9a1310
4 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ extends KinematicBody2D
# var b = "textvar"
func _fixed_process(delta):
move(Vector2(0.3,0.5))
move(Vector2(0.1,0.2))
#pass
func _ready():
+2 -1
View File
@@ -5,7 +5,8 @@ extends Area2D
# var b = "textvar"
func _fixed_process(delta):
pass
#pass
print(is_gravity_a_point())
func _ready():
# Called every time the node is added to the scene.
+1 -1
View File
@@ -5,7 +5,7 @@ extends KinematicBody2D
# var b = "textvar"
func _fixed_process(delta):
move(Vector2(0.2,0.4))
move(Vector2(0.1,0.1))
#pass
func _ready():
+5 -9
View File
@@ -1,8 +1,6 @@
extends RigidBody2D
# class member variables go here, for example:
# var a = 2
# var b = "textvar"
var time = 0.0
var thrust_force = Vector2()
var thrust
@@ -10,10 +8,8 @@ var revthrust
var bear_left
var bear_right
func calc_moon_gravity():
pass
func _process(delta):
func _input(delta):
# var lv = s.get_linear_velocity()
# var step = s.get_step()
var rotation = get_rot()
@@ -28,13 +24,12 @@ func _process(delta):
func _fixed_process(delta):
time += delta
print(time)
# print(time)
if (thrust):
# print("Rotation: ", rotation, " Linear velocity: ", lv, " sin rotation: ", sin(rotation), " cos rotation: ", cos(rotation))
apply_impulse(Vector2(0,0), -thrust_force)
if (revthrust):
# print("Rotation: ", rotation, " Linear velocity: ", lv, " sin rotation: ", sin(rotation), " cos rotation: ", cos(rotation))
apply_impulse(Vector2(0,0), thrust_force)
if (bear_left):
rotate(0.1)
@@ -44,4 +39,5 @@ func _fixed_process(delta):
func _ready():
# set_gravity_scale(1)
set_process(true)
set_process_input(true)
set_fixed_process(true)