intro background

This commit is contained in:
Page Asgardius 2023-09-14 09:47:04 -07:00
parent cb75d54591
commit 315d6d3408
14 changed files with 125 additions and 41 deletions

Binary file not shown.

16
exit.gd Normal file
View file

@ -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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -27,13 +27,13 @@ func _process(delta):
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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

View file

@ -21,13 +21,13 @@ func _process(delta):
#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"):
if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A):
xm = -1
if Input.is_action_pressed("ui_right"):
if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D):
xm = 1
if Input.is_action_pressed("ui_up"):
if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W):
ym = -1
if Input.is_action_pressed("ui_down"):
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

16
nebula.gd Normal file
View file

@ -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.

16
start.gd Normal file
View file

@ -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

View file

@ -1,8 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://p010jtursgo2"]
[gd_scene load_steps=8 format=3 uid="uid://p010jtursgo2"]
[ext_resource type="Script" path="res://title.gd" id="1_fbo7u"]
[ext_resource type="Script" path="res://Game name.gd" id="2_bbb0f"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (360p).ogv" id="2_bhkux"]
[ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"]
[ext_resource type="Script" path="res://fps.gd" id="3_tsoef"]
[ext_resource type="Script" path="res://start.gd" id="4_cc41w"]
[ext_resource type="Script" path="res://exit.gd" id="5_scoec"]
[node name="title" type="Control"]
layout_mode = 3
@ -13,6 +17,21 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_fbo7u")
[node name="nebula" type="VideoStreamPlayer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
scale = Vector2(2, 1.96)
stream = ExtResource("2_bhkux")
autoplay = true
script = ExtResource("3_bn1r3")
[node name="fps" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
script = ExtResource("3_tsoef")
[node name="Game name" type="Label" parent="."]
layout_mode = 0
offset_left = 108.0
@ -23,7 +42,24 @@ scale = Vector2(6.38131, 6.11486)
text = "The Red Robot Radio"
script = ExtResource("2_bbb0f")
[node name="fps" type="Label" parent="."]
offset_right = 40.0
offset_bottom = 23.0
script = ExtResource("3_tsoef")
[node name="start" type="Label" parent="."]
layout_mode = 0
offset_left = 131.0
offset_top = 92.0
offset_right = 501.0
offset_bottom = 118.0
scale = Vector2(2.61468, 1.57466)
text = "Click anywhere or press any face button to start"
script = ExtResource("4_cc41w")
[node name="exit" type="Label" parent="."]
layout_mode = 0
offset_left = 165.0
offset_top = 602.0
offset_right = 535.0
offset_bottom = 628.0
scale = Vector2(2.61468, 1.57466)
text = "Press escape or any shoulder button to exit"
script = ExtResource("5_scoec")
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]