parallax
This commit is contained in:
parent
9754895422
commit
54afc74a16
10 changed files with 189 additions and 25 deletions
|
@ -3,12 +3,26 @@ extends Node2D
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
var galaxy = load("res://levels/galaxy.tscn").instantiate()
|
var galaxy = load("res://levels/galaxy.tscn").instantiate()
|
||||||
|
var wait
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
get_tree().root.add_child.call_deferred(galaxy)
|
get_tree().root.add_child.call_deferred(galaxy)
|
||||||
|
wait = Time.get_ticks_msec()
|
||||||
#pass # Replace with function body.
|
#pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
pass
|
if (Time.get_ticks_msec() - wait) >= 1000 && (Input.is_key_pressed(KEY_R) || 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()
|
||||||
|
#pass
|
||||||
|
|
||||||
|
func _title():
|
||||||
|
# This is like autoloading the scene, only
|
||||||
|
# it happens after already loading the main scene.
|
||||||
|
get_tree().root.remove_child(galaxy)
|
||||||
|
get_tree().change_scene_to_file("res://title.tscn")
|
||||||
|
#get_tree().root.add_child(title)
|
||||||
|
#get_tree().root.remove_child(boot)
|
||||||
|
#boot.queue_free()
|
||||||
|
|
|
@ -3,12 +3,26 @@ extends Node2D
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
var wormhole = load("res://levels/wormhole.tscn").instantiate()
|
var wormhole = load("res://levels/wormhole.tscn").instantiate()
|
||||||
|
var wait
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
get_tree().root.add_child.call_deferred(wormhole)
|
get_tree().root.add_child.call_deferred(wormhole)
|
||||||
|
wait = Time.get_ticks_msec()
|
||||||
#pass # Replace with function body.
|
#pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
pass
|
if (Time.get_ticks_msec() - wait) >= 1000 && (Input.is_key_pressed(KEY_R) || 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()
|
||||||
|
#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()
|
||||||
|
|
|
@ -210,7 +210,7 @@ custom_features=""
|
||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path=""
|
export_path="./The Red Robot Radio.x86_64"
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
encrypt_pck=false
|
encrypt_pck=false
|
||||||
|
|
|
@ -13,7 +13,7 @@ func _process(delta):
|
||||||
var ym = 0
|
var ym = 0
|
||||||
var velocity = Vector2.ZERO
|
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:
|
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) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_X))-Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
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)
|
||||||
else:
|
else:
|
||||||
if Input.is_action_pressed("ui_left"):
|
if Input.is_action_pressed("ui_left"):
|
||||||
xm = -1
|
xm = -1
|
||||||
|
@ -23,7 +23,7 @@ func _process(delta):
|
||||||
ym = -1
|
ym = -1
|
||||||
if Input.is_action_pressed("ui_down"):
|
if Input.is_action_pressed("ui_down"):
|
||||||
ym = 1
|
ym = 1
|
||||||
velocity = (Vector2.RIGHT.rotated(rotation) * -400 * xm)-Vector2.UP.rotated(rotation) * -400 * ym
|
velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta
|
||||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
#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)
|
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||||
position += velocity * delta
|
position += velocity * delta
|
||||||
|
|
30
levels/ast1.gd
Normal file
30
levels/ast1.gd
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# 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():
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
#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
|
30
levels/ast2.gd
Normal file
30
levels/ast2.gd
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# 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():
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
#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
|
30
levels/ast3.gd
Normal file
30
levels/ast3.gd
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# 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():
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
#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,4 +1,4 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://mtl88mcwaqk0"]
|
[gd_scene load_steps=15 format=3 uid="uid://mtl88mcwaqk0"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://levels/galaxy.gd" id="1_3c4wu"]
|
[ext_resource type="Script" path="res://levels/galaxy.gd" id="1_3c4wu"]
|
||||||
[ext_resource type="Texture2D" uid="uid://8lioamk650y7" path="res://sprites/css.png" id="2_3g4h6"]
|
[ext_resource type="Texture2D" uid="uid://8lioamk650y7" path="res://sprites/css.png" id="2_3g4h6"]
|
||||||
|
@ -10,10 +10,32 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://bows52y4q3suo" path="res://sprites/antenna.png" id="8_rmhxj"]
|
[ext_resource type="Texture2D" uid="uid://bows52y4q3suo" path="res://sprites/antenna.png" id="8_rmhxj"]
|
||||||
[ext_resource type="Script" path="res://levels/antenna.gd" id="9_diat7"]
|
[ext_resource type="Script" path="res://levels/antenna.gd" id="9_diat7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="9_favs7"]
|
[ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="9_favs7"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dq06yjgibl0u1" path="res://sprites/asteroid.png" id="11_omn33"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast1.gd" id="12_g6l6s"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast2.gd" id="13_s46s0"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast3.gd" id="14_cu7w4"]
|
||||||
|
|
||||||
[node name="galaxy" type="Node2D"]
|
[node name="galaxy" type="Node2D"]
|
||||||
script = ExtResource("1_3c4wu")
|
script = ExtResource("1_3c4wu")
|
||||||
|
|
||||||
|
[node name="ast1" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(934, 569)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_omn33")
|
||||||
|
script = ExtResource("12_g6l6s")
|
||||||
|
|
||||||
|
[node name="ast2" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(555, 705)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_omn33")
|
||||||
|
script = ExtResource("13_s46s0")
|
||||||
|
|
||||||
|
[node name="ast3" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(1257, 644)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_omn33")
|
||||||
|
script = ExtResource("14_cu7w4")
|
||||||
|
|
||||||
[node name="css1" type="Sprite2D" parent="."]
|
[node name="css1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(852, 455)
|
position = Vector2(852, 455)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
|
@ -105,7 +127,7 @@ texture = ExtResource("7_5wmcj")
|
||||||
script = ExtResource("3_1tarv")
|
script = ExtResource("3_1tarv")
|
||||||
|
|
||||||
[node name="antenna" type="Sprite2D" parent="."]
|
[node name="antenna" type="Sprite2D" parent="."]
|
||||||
position = Vector2(3980, -208)
|
position = Vector2(3953, 251)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("8_rmhxj")
|
texture = ExtResource("8_rmhxj")
|
||||||
script = ExtResource("9_diat7")
|
script = ExtResource("9_diat7")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://b82huqhu88xt6"]
|
[gd_scene load_steps=15 format=3 uid="uid://b82huqhu88xt6"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://levels/wormhole.gd" id="1_n4a5i"]
|
[ext_resource type="Script" path="res://levels/wormhole.gd" id="1_n4a5i"]
|
||||||
[ext_resource type="Texture2D" uid="uid://8lioamk650y7" path="res://sprites/css.png" id="2_y6cio"]
|
[ext_resource type="Texture2D" uid="uid://8lioamk650y7" path="res://sprites/css.png" id="2_y6cio"]
|
||||||
|
@ -10,102 +10,124 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://bows52y4q3suo" path="res://sprites/antenna.png" id="8_7cq8u"]
|
[ext_resource type="Texture2D" uid="uid://bows52y4q3suo" path="res://sprites/antenna.png" id="8_7cq8u"]
|
||||||
[ext_resource type="Script" path="res://levels/antenna.gd" id="9_cr36o"]
|
[ext_resource type="Script" path="res://levels/antenna.gd" id="9_cr36o"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="10_shrek"]
|
[ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="10_shrek"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dq06yjgibl0u1" path="res://sprites/asteroid.png" id="11_bwi0e"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast1.gd" id="12_s1o5o"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast2.gd" id="13_xw0he"]
|
||||||
|
[ext_resource type="Script" path="res://levels/ast3.gd" id="14_xcrsk"]
|
||||||
|
|
||||||
[node name="wormhole" type="Node2D"]
|
[node name="wormhole" type="Node2D"]
|
||||||
script = ExtResource("1_n4a5i")
|
script = ExtResource("1_n4a5i")
|
||||||
|
|
||||||
|
[node name="ast1" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(934, 569)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_bwi0e")
|
||||||
|
script = ExtResource("12_s1o5o")
|
||||||
|
|
||||||
|
[node name="ast2" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(555, 705)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_bwi0e")
|
||||||
|
script = ExtResource("13_xw0he")
|
||||||
|
|
||||||
|
[node name="ast3" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(1257, 644)
|
||||||
|
scale = Vector2(0.3, 0.3)
|
||||||
|
texture = ExtResource("11_bwi0e")
|
||||||
|
script = ExtResource("14_xcrsk")
|
||||||
|
|
||||||
[node name="css1" type="Sprite2D" parent="."]
|
[node name="css1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(852, 455)
|
position = Vector2(911, 603)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("2_y6cio")
|
texture = ExtResource("2_y6cio")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="css2" type="Sprite2D" parent="."]
|
[node name="css2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(908, 688)
|
position = Vector2(1246, 626)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("2_y6cio")
|
texture = ExtResource("2_y6cio")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="css3" type="Sprite2D" parent="."]
|
[node name="css3" type="Sprite2D" parent="."]
|
||||||
position = Vector2(2931, 925)
|
position = Vector2(2131, 1189)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("2_y6cio")
|
texture = ExtResource("2_y6cio")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="sat1" type="Sprite2D" parent="."]
|
[node name="sat1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(994, -488)
|
position = Vector2(1174, -152)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("4_4mf4s")
|
texture = ExtResource("4_4mf4s")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="sat2" type="Sprite2D" parent="."]
|
[node name="sat2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(1177, -4)
|
position = Vector2(1560, 238)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("4_4mf4s")
|
texture = ExtResource("4_4mf4s")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="sat3" type="Sprite2D" parent="."]
|
[node name="sat3" type="Sprite2D" parent="."]
|
||||||
position = Vector2(2721, -234)
|
position = Vector2(2717, 282)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("4_4mf4s")
|
texture = ExtResource("4_4mf4s")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="iss1" type="Sprite2D" parent="."]
|
[node name="iss1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(1517, 236)
|
position = Vector2(2122, 101)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
texture = ExtResource("5_hhxgq")
|
texture = ExtResource("5_hhxgq")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="iss2" type="Sprite2D" parent="."]
|
[node name="iss2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(1991, -175)
|
position = Vector2(2127, -175)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
texture = ExtResource("5_hhxgq")
|
texture = ExtResource("5_hhxgq")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="iss3" type="Sprite2D" parent="."]
|
[node name="iss3" type="Sprite2D" parent="."]
|
||||||
position = Vector2(3236, 4)
|
position = Vector2(3412, -48)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
texture = ExtResource("5_hhxgq")
|
texture = ExtResource("5_hhxgq")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="tc1" type="Sprite2D" parent="."]
|
[node name="tc1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(1633, 928)
|
position = Vector2(2139, 985)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("6_f0a2t")
|
texture = ExtResource("6_f0a2t")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="tc2" type="Sprite2D" parent="."]
|
[node name="tc2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(2258, 1316)
|
position = Vector2(2135, 651)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("6_f0a2t")
|
texture = ExtResource("6_f0a2t")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="tc3" type="Sprite2D" parent="."]
|
[node name="tc3" type="Sprite2D" parent="."]
|
||||||
position = Vector2(3445, 1440)
|
position = Vector2(2121, 1646)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("6_f0a2t")
|
texture = ExtResource("6_f0a2t")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="bus1" type="Sprite2D" parent="."]
|
[node name="bus1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(991, 1389)
|
position = Vector2(2879, 1253)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("7_ymm87")
|
texture = ExtResource("7_ymm87")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="bus2" type="Sprite2D" parent="."]
|
[node name="bus2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(2266, 530)
|
position = Vector2(2113, 357)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("7_ymm87")
|
texture = ExtResource("7_ymm87")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="bus3" type="Sprite2D" parent="."]
|
[node name="bus3" type="Sprite2D" parent="."]
|
||||||
position = Vector2(3960, 656)
|
position = Vector2(3977, 281)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("7_ymm87")
|
texture = ExtResource("7_ymm87")
|
||||||
script = ExtResource("3_4xg6i")
|
script = ExtResource("3_4xg6i")
|
||||||
|
|
||||||
[node name="antenna" type="Sprite2D" parent="."]
|
[node name="antenna" type="Sprite2D" parent="."]
|
||||||
position = Vector2(3980, -208)
|
position = Vector2(3988, -111)
|
||||||
scale = Vector2(0.3, 0.3)
|
scale = Vector2(0.3, 0.3)
|
||||||
texture = ExtResource("8_7cq8u")
|
texture = ExtResource("8_7cq8u")
|
||||||
script = ExtResource("9_cr36o")
|
script = ExtResource("9_cr36o")
|
||||||
|
|
4
title.gd
4
title.gd
|
@ -3,6 +3,7 @@ extends Control
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
var bgsound := AudioStreamPlayer.new()
|
var bgsound := AudioStreamPlayer.new()
|
||||||
|
var wait
|
||||||
#var galaxy = preload("res://backgounds/galaxy.tscn").instantiate()
|
#var galaxy = preload("res://backgounds/galaxy.tscn").instantiate()
|
||||||
#var wormhole = preload("res://backgounds/wormhole.tscn").instantiate()
|
#var wormhole = preload("res://backgounds/wormhole.tscn").instantiate()
|
||||||
|
|
||||||
|
@ -11,6 +12,7 @@ func _ready():
|
||||||
var titlemusic = load("res://music/x-force.mp3")
|
var titlemusic = load("res://music/x-force.mp3")
|
||||||
bgsound.stream = titlemusic
|
bgsound.stream = titlemusic
|
||||||
bgsound.play(0)
|
bgsound.play(0)
|
||||||
|
wait = Time.get_ticks_msec()
|
||||||
#pass # Replace with function body.
|
#pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +22,7 @@ func _process(delta):
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
# Mouse in viewport coordinates.
|
# Mouse in viewport coordinates.
|
||||||
if Time.get_ticks_msec() >= 1000 && (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)):
|
if (Time.get_ticks_msec() - wait) >= 1000 && (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)
|
#print("Mouse Click/Unclick at: ", event.position)
|
||||||
_level()
|
_level()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue