mirror of
https://github.com/jwinterm/MoonLaunch.git
synced 2026-10-20 06:08:31 +02:00
first commit
This commit is contained in:
@@ -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
@@ -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.
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user