parent
593f0af4f7
commit
6837eb8bbc
@ -1 +1 @@
|
||||
4.1.1.stable
|
||||
4.1.2.stable
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
extends Label
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Global.time > Global.timelimit:
|
||||
set_text("You are out of fuel");
|
@ -0,0 +1,61 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
var wormhole = load("res://levels/abstract.tscn").instantiate()
|
||||
|
||||
func _ready():
|
||||
get_tree().root.add_child.call_deferred(wormhole)
|
||||
Global.wait = Time.get_ticks_msec()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Time.get_ticks_msec() - Global.wait > Global.timelimit:
|
||||
Global.live = 2
|
||||
if (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_Y) || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_joy_button_pressed(0,JOY_BUTTON_BACK) || Input.is_joy_button_pressed(0,JOY_BUTTON_START) || Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) || Input.is_joy_button_pressed(0,JOY_BUTTON_LEFT_SHOULDER)):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
elif Input.is_key_pressed(KEY_C):
|
||||
Global.live = 2
|
||||
elif Input.is_key_pressed(KEY_V):
|
||||
Global.live = 3
|
||||
if Global.live == 0:
|
||||
_title()
|
||||
elif Global.live == 2:
|
||||
_crash()
|
||||
elif Global.live == 3:
|
||||
_complete()
|
||||
#pass
|
||||
|
||||
func _title():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
get_tree().root.remove_child(wormhole)
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
func _crash():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
Global.time = Time.get_ticks_msec() - Global.wait
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
queue_free()
|
||||
get_tree().root.remove_child(wormhole)
|
||||
get_tree().change_scene_to_file("res://backgounds/supernova.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
func _complete():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
Global.time = Time.get_ticks_msec() - Global.wait
|
||||
get_tree().root.remove_child(wormhole)
|
||||
get_tree().change_scene_to_file("res://levels/credits.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
@ -0,0 +1,3 @@
|
||||
[remap]
|
||||
|
||||
path="res://.godot/exported/133200997/export-e6f09ccf30517420614fd59735807251-abstract.scn"
|
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
extends Label
|
||||
|
||||
var frequency = 5
|
||||
var amplitude = 550
|
||||
var time = 0
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
#pass
|
||||
time += delta
|
||||
var movement = -cos(time*frequency)*amplitude
|
||||
position.x+=movement * delta
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
@ -0,0 +1,17 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
var bgsound := AudioStreamPlayer.new()
|
||||
|
||||
func _ready():
|
||||
add_child(bgsound)
|
||||
var titlemusic = load("res://music/truth.ogg")
|
||||
bgsound.stream = titlemusic
|
||||
bgsound.play(0)
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
@ -0,0 +1,3 @@
|
||||
[remap]
|
||||
|
||||
path="res://.godot/exported/133200997/export-cf941fec57098a1decd3f22c444f8a96-abstract.scn"
|
@ -0,0 +1,42 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 3
|
||||
#pass
|
@ -0,0 +1,46 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
var ctime
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
ctime = Time.get_ticks_msec()
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -10000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
if (Time.get_ticks_msec() - ctime) <= 67:
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
Global.mousepos = get_viewport().get_mouse_position() - Global.origmpos
|
||||
else :
|
||||
Global.mousepos = get_viewport().get_mouse_position() - Global.origmpos
|
||||
self.position = Vector2(origpos.x+Global.mousepos.x, origpos.y+Global.mousepos.y)
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * xm * delta)-Vector2.UP.rotated(rotation) * -10000 * ym * delta
|
||||
origpos = self.position
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
ctime = Time.get_ticks_msec()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -0,0 +1,39 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -20000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*2), origpos.y+(Global.mousepos.y*2))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * xm * delta)-Vector2.UP.rotated(rotation) * -20000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -0,0 +1,39 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -30000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*3), origpos.y+(Global.mousepos.y*3))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * xm * delta)-Vector2.UP.rotated(rotation) * -30000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -0,0 +1,55 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
var bgsound := AudioStreamPlayer.new()
|
||||
var song1 = load("res://music/yes-i-see.ogg")
|
||||
var song2 = load("res://music/tekilla.ogg")
|
||||
var song3 = load("res://music/sweetest-sin.ogg")
|
||||
var playstart = false
|
||||
var playindex = 0
|
||||
|
||||
func _ready():
|
||||
add_child(bgsound)
|
||||
bgsound.stream = song1
|
||||
bgsound.play(0)
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var bgtime = bgsound.get_playback_position() + AudioServer.get_time_since_last_mix()
|
||||
# Compensate for output latency.
|
||||
bgtime -= AudioServer.get_output_latency()
|
||||
#print("Time is: ", bgtime)
|
||||
if bgtime < 0:
|
||||
if playstart:
|
||||
if playindex == 0:
|
||||
playindex = 1
|
||||
playstart = false
|
||||
bgsound.stream = song2
|
||||
bgsound.play(0)
|
||||
elif playindex == 1:
|
||||
playindex = 2
|
||||
playstart = false
|
||||
bgsound.stream = song3
|
||||
bgsound.play(0)
|
||||
else:
|
||||
_complete()
|
||||
elif bgsound.has_stream_playback():
|
||||
playstart = true
|
||||
#pass
|
||||
|
||||
func _complete():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
get_tree().change_scene_to_file("res://backgounds/radio.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_Y) || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_joy_button_pressed(0,JOY_BUTTON_BACK) || Input.is_joy_button_pressed(0,JOY_BUTTON_START) || Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) || Input.is_joy_button_pressed(0,JOY_BUTTON_LEFT_SHOULDER):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_complete()
|
@ -0,0 +1,3 @@
|
||||
[remap]
|
||||
|
||||
path="res://.godot/exported/133200997/export-713f41e55ec40c095f11bcd989d5f146-credits.scn"
|
@ -0,0 +1,42 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 2
|
||||
#pass
|
@ -0,0 +1,4 @@
|
||||
extends Label
|
||||
|
||||
func _process(delta):
|
||||
position.y -= delta * 20
|
@ -0,0 +1,13 @@
|
||||
extends Sprite2D
|
||||
|
||||
var angular_speed = PI
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Global.live == 2:
|
||||
rotation += angular_speed * delta * 5
|
||||
#pass
|
@ -0,0 +1,7 @@
|
||||
extends Label
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if (Global.timelimit - (Time.get_ticks_msec() - Global.wait)) > 0:
|
||||
set_text("Time: " + str((Global.timelimit - (Time.get_ticks_msec() - Global.wait))/1000));
|
||||
else:
|
||||
set_text(str(0));
|
@ -0,0 +1,41 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x > 496:
|
||||
Global.live = 2
|
||||
#pass
|
@ -0,0 +1,41 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x < 782:
|
||||
Global.live = 2
|
||||
#pass
|
@ -0,0 +1,41 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.y > 270:
|
||||
Global.live = 2
|
||||
#pass
|
@ -0,0 +1,41 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.y < 468:
|
||||
Global.live = 2
|
||||
#pass
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
extends VideoStreamPlayer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_finished():
|
||||
play()
|
||||
#pass # Replace with function body.
|
@ -0,0 +1,12 @@
|
||||
extends Sprite2D
|
||||
|
||||
var angular_speed = PI
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
rotation += angular_speed * delta
|
||||
#pass
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
extends Label
|
||||
|
||||
var frequency = 5
|
||||
var amplitude = 550
|
||||
var time = 0
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
#pass
|
||||
time += delta
|
||||
var movement = cos(time*frequency)*amplitude
|
||||
position.x+=movement * delta
|
@ -1,41 +0,0 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 3
|
||||
#pass
|
@ -1,45 +0,0 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
var ctime
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
ctime = Time.get_ticks_msec()
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -10000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
if (Time.get_ticks_msec() - ctime) <= 67:
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
Global.mousepos = get_viewport().get_mouse_position() - Global.origmpos
|
||||
else :
|
||||
Global.mousepos = get_viewport().get_mouse_position() - Global.origmpos
|
||||
self.position = Vector2(origpos.x+Global.mousepos.x, origpos.y+Global.mousepos.y)
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * xm * delta)-Vector2.UP.rotated(rotation) * -10000 * ym * delta
|
||||
origpos = self.position
|
||||
Global.origmpos = get_viewport().get_mouse_position()
|
||||
ctime = Time.get_ticks_msec()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -1,38 +0,0 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -20000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*2), origpos.y+(Global.mousepos.y*2))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * xm * delta)-Vector2.UP.rotated(rotation) * -20000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -1,38 +0,0 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -30000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*3), origpos.y+(Global.mousepos.y*3))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * xm * delta)-Vector2.UP.rotated(rotation) * -30000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
#pass
|
@ -1,41 +0,0 @@
|
||||
extends Sprite2D
|
||||
|
||||
var origpos
|
||||
#var origmpos
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
#var velocity = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
||||
func _ready():
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
#var mousepos = get_viewport().get_mouse_position() - origmpos
|
||||
self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5))
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||
origpos = self.position
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 2
|
||||
#pass
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.