new release
This commit is contained in:
parent
f17d98fac4
commit
e0a8aee886
11 changed files with 192 additions and 65 deletions
|
@ -13,7 +13,7 @@ var firstrun
|
|||
var musictracks = ["res://music/x-force.ogg", "res://music/alien-bulls.ogg", "res://music/eternity.ogg", "res://music/truth.ogg", "res://music/broken.ogg", "res://music/maran.ogg", "res://music/orion.ogg", "res://music/rose.ogg", "res://music/oskars.ogg", "res://music/rock.ogg", "res://music/yes-i-see.ogg", "res://music/tekilla.ogg", "res://music/sweetest-sin.ogg"]
|
||||
var sfxtracks = ["res://sfx/title.wav", "res://sfx/crash.ogg", "res://sfx/complete.ogg"]
|
||||
var debug = false
|
||||
var release = "R0.2.0-beta"
|
||||
var release = "R0.2.1-beta"
|
||||
var sk = false
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
|
|
|
@ -16,12 +16,26 @@ func _process(delta):
|
|||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 3
|
||||
|
|
|
@ -6,45 +6,41 @@ var ctime
|
|||
# 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():
|
||||
#Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
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):
|
||||
Global.xm = 0
|
||||
Global.ym = 0
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
Global.xm = Input.get_joy_axis(0,JOY_ANALOG_LX)
|
||||
Global.ym = Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -10000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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:
|
||||
#Global.xm = Input.get_last_mouse_velocity().x / 100
|
||||
#Global.ym = Input.get_last_mouse_velocity().y / 100
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
Global.xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
Global.xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
Global.ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
Global.ym = 1
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
|
||||
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()
|
||||
#elif !Global.sk && Global.live == null:
|
||||
# _sk()
|
||||
|
||||
#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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
#pass
|
||||
func _sk():
|
||||
Global.sk = true
|
||||
#get_tree().change_scene_to_file("res://bootclick.tscn")
|
||||
var selftest = load("res://selftest.tscn").instantiate()
|
||||
get_tree().root.add_child.call_deferred(selftest)
|
||||
|
|
|
@ -12,12 +12,28 @@ func _ready():
|
|||
|
||||
# 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:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -200 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -200 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -20000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
#pass
|
||||
|
|
|
@ -12,11 +12,28 @@ func _ready():
|
|||
|
||||
# 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:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -300 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -300 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -30000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
#pass
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://backgounds/nebula_-_6044 (720p).ogv" type="VideoStream" id=1]
|
||||
[ext_resource path="res://sprites/ss.png" type="Texture" id=2]
|
||||
|
@ -6,6 +6,7 @@
|
|||
[ext_resource path="res://fonts/about.tres" type="DynamicFont" id=4]
|
||||
[ext_resource path="res://levels/roll.gd" type="Script" id=5]
|
||||
[ext_resource path="res://levels/credits.gd" type="Script" id=6]
|
||||
[ext_resource path="res://levels/bottomhud.tscn" type="PackedScene" id=7]
|
||||
|
||||
[node name="credits" type="Node2D"]
|
||||
script = ExtResource( 6 )
|
||||
|
@ -75,6 +76,10 @@ Steam Deck
|
|||
Arch Linux Rolling
|
||||
Provided by Evelyn Freeman
|
||||
|
||||
Pinephone
|
||||
Debian 12
|
||||
Provided by Kimberly Arch
|
||||
|
||||
Feedback
|
||||
El Suavecito
|
||||
Vix
|
||||
|
@ -482,3 +487,5 @@ You can reuse assets for non-commercial purposes only
|
|||
Be kind and have a happy unfunaversary"
|
||||
align = 1
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource( 7 )]
|
||||
|
|
|
@ -12,13 +12,30 @@ func _ready():
|
|||
|
||||
# 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:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.x < 782 && position.x > 496:
|
||||
if position.y < 468 && position.y > 270:
|
||||
Global.live = 2
|
||||
|
|
|
@ -16,11 +16,26 @@ func _process(delta):
|
|||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.x > 496:
|
||||
Global.live = 2
|
||||
#pass
|
||||
|
|
|
@ -16,11 +16,26 @@ func _process(delta):
|
|||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.x < 782:
|
||||
Global.live = 2
|
||||
#pass
|
||||
|
|
|
@ -16,11 +16,26 @@ func _process(delta):
|
|||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.y > 270:
|
||||
Global.live = 2
|
||||
#pass
|
||||
|
|
|
@ -16,11 +16,26 @@ func _process(delta):
|
|||
var ym = 0
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live == 1:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta
|
||||
if Input.get_joy_axis(0,JOY_ANALOG_LX) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) > 0.2 || Input.get_joy_axis(0,JOY_ANALOG_LX) < -0.2 || Input.get_joy_axis(0,JOY_ANALOG_LY) < -0.2:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * delta * Input.get_joy_axis(0,JOY_ANALOG_LX))-Vector2.UP.rotated(rotation) * -50000 *delta * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
elif Input.is_mouse_button_pressed(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
|
||||
#if Input.get_joy_axis(0,JOY_ANALOG_LY) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_ANALOG_LY)
|
||||
position += velocity * delta
|
||||
if position.y < 468:
|
||||
Global.live = 2
|
||||
#pass
|
||||
|
|
Loading…
Reference in a new issue