mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2026-03-22 00:26:23 +00:00
lilbit of progress (only instancin a single line with bullet
This commit is contained in:
@@ -153,7 +153,7 @@ func process_rotation():
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
print(Global.get('control'))
|
||||
#print(Global.get('control'))
|
||||
# if Global.get('control')._on_line_pressed():
|
||||
# enable_trajectory('line')
|
||||
# if Global.get('control')._on_sine_pressed():
|
||||
@@ -329,11 +329,19 @@ sync func shoot(new_trajectory:String):
|
||||
|
||||
|
||||
func enable_trajectory_line(new_trajectory_line:String):
|
||||
# var x = bullet_trajectory[new_trajectory_line].instance()
|
||||
# #print(x)
|
||||
# get_parent().add_child(x)
|
||||
# x.global_position = shoot_point.global_position
|
||||
# x.global_rotation = shoot_point.global_rotation
|
||||
#for x in get_children(): #if there is gun remove it
|
||||
#x.queue_free()
|
||||
|
||||
var x = bullet_trajectory[new_trajectory_line].instance()
|
||||
print(x)
|
||||
get_parent().add_child(x)
|
||||
x.global_position = shoot_point.global_position
|
||||
x.global_rotation = shoot_point.global_rotation
|
||||
|
||||
|
||||
func enable_trajectory(new_trajectory_line:String):
|
||||
for gun in get_children(): #if there is gun remove it
|
||||
|
||||
@@ -9,7 +9,7 @@ var sine_button
|
||||
var parab_button
|
||||
var hyper_button
|
||||
var global
|
||||
var control = false
|
||||
var control
|
||||
|
||||
var clientPhase = {
|
||||
"0": {
|
||||
|
||||
@@ -34,7 +34,7 @@ func _ready():
|
||||
|
||||
|
||||
func trajectory():
|
||||
clear_points()
|
||||
|
||||
while dot_position.x < 1000:
|
||||
if pos.x > 0:
|
||||
add_point(dot_position)
|
||||
|
||||
@@ -18,7 +18,6 @@ var a_parameter = 0
|
||||
|
||||
|
||||
func trajectory():
|
||||
clear_points()
|
||||
while dot_position.x < 1000:
|
||||
add_point(dot_position)
|
||||
velocity.y = 10 * a_parameter
|
||||
|
||||
Reference in New Issue
Block a user