diff --git a/levels/ast1.gd b/levels/ast1.gd index 0b73c55..072e1af 100644 --- a/levels/ast1.gd +++ b/levels/ast1.gd @@ -32,6 +32,8 @@ func _process(delta): Global.ym = -1 if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): Global.ym = 1 + Global.xm = Input.get_last_mouse_velocity().x / 100 + Global.ym = Input.get_last_mouse_velocity().y / 100 velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta ctime = Time.get_ticks_msec() elif !Global.sk && Global.live == null: diff --git a/levels/wall1.gd b/levels/wall1.gd index 06fbb43..1e25d9b 100644 --- a/levels/wall1.gd +++ b/levels/wall1.gd @@ -16,26 +16,11 @@ func _process(delta): 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 + velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta #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 + position += velocity if position.x > 496: Global.live = 2 #pass diff --git a/levels/wall2.gd b/levels/wall2.gd index 840ff5b..84ca305 100644 --- a/levels/wall2.gd +++ b/levels/wall2.gd @@ -16,26 +16,11 @@ func _process(delta): 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 + velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta #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 + position += velocity if position.x < 782: Global.live = 2 #pass diff --git a/levels/wall3.gd b/levels/wall3.gd index 9d23489..d32b654 100644 --- a/levels/wall3.gd +++ b/levels/wall3.gd @@ -16,26 +16,11 @@ func _process(delta): 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 + velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta #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 + position += velocity if position.y > 270: Global.live = 2 #pass diff --git a/levels/wall4.gd b/levels/wall4.gd index bd0891c..9133507 100644 --- a/levels/wall4.gd +++ b/levels/wall4.gd @@ -16,26 +16,11 @@ func _process(delta): 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 + velocity = (Vector2.RIGHT.rotated(rotation) * -1000 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -1000 * Global.ym * delta #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 + position += velocity if position.y < 468: Global.live = 2 #pass diff --git a/title.tscn b/title.tscn index 38ac0fc..b417795 100644 --- a/title.tscn +++ b/title.tscn @@ -76,7 +76,7 @@ offset_left = 36.0 offset_top = 653.0 offset_right = 76.0 offset_bottom = 676.0 -text = "R0.0.4-dev 2020-2023 Page Asgardius GNU General Public License 3 +text = "R0.1.0-beta 2020-2023 Page Asgardius GNU General Public License 3 2016-2023 Asgardius Virtualx Project" [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]