mirror of
https://github.com/HarmonyHoney/ROTA.git
synced 2026-07-17 16:46:17 +00:00
Flashing Lights & Sounds from ArcadeCab
Rectangle 0.0 to 1.0 is now fractional range (:
This commit is contained in:
parent
277db960cd
commit
99a8d1e387
10 changed files with 138 additions and 5 deletions
BIN
media/image/details/arcade_back.png
Normal file
BIN
media/image/details/arcade_back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
35
media/image/details/arcade_back.png.import
Normal file
35
media/image/details/arcade_back.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/arcade_back.png-6f8fcf0094df358dc9bb67b6c41e3b01.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://media/image/details/arcade_back.png"
|
||||
dest_files=[ "res://.import/arcade_back.png-6f8fcf0094df358dc9bb67b6c41e3b01.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
media/image/details/arcade_front.png
Normal file
BIN
media/image/details/arcade_front.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
35
media/image/details/arcade_front.png.import
Normal file
35
media/image/details/arcade_front.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/arcade_front.png-46eccf5fe24155bf74b6cd6e35bab313.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://media/image/details/arcade_front.png"
|
||||
dest_files=[ "res://.import/arcade_front.png-46eccf5fe24155bf74b6cd6e35bab313.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
|
@ -1,19 +1,49 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://src/actor/door/DoorBase.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://media/image/details/arcade_cabinet.png" type="Texture" id=2]
|
||||
[ext_resource path="res://media/image/details/arcade_back.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/arcade/Screen.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/image/details/arcade_front.png" type="Texture" id=4]
|
||||
[ext_resource path="res://src/arcade/AttractAudio.gd" type="Script" id=5]
|
||||
[ext_resource path="res://media/audio/sfx/sfx4.wav" type="AudioStream" id=6]
|
||||
[ext_resource path="res://media/audio/sfx/zap0.wav" type="AudioStream" id=7]
|
||||
[ext_resource path="res://media/audio/sfx/jump1.wav" type="AudioStream" id=8]
|
||||
[ext_resource path="res://media/audio/sfx/fallout2.wav" type="AudioStream" id=9]
|
||||
[ext_resource path="res://media/audio/sfx/key.wav" type="AudioStream" id=10]
|
||||
[ext_resource path="res://media/audio/sfx/oneup1.wav" type="AudioStream" id=11]
|
||||
|
||||
[node name="ArcadeCab" instance=ExtResource( 1 )]
|
||||
scene_path = "res://src/arcade/Arcade.tscn"
|
||||
|
||||
[node name="Arrow" parent="." index="0"]
|
||||
col_size = Vector2( 100, 75 )
|
||||
col_show = true
|
||||
col_size = Vector2( 120, 75 )
|
||||
col_pos = Vector2( 0, -25 )
|
||||
image_pos = Vector2( 0, -160 )
|
||||
|
||||
[node name="Image" type="Node2D" parent="." index="1"]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Image" index="0"]
|
||||
[node name="Back" type="Sprite" parent="Image" index="0"]
|
||||
position = Vector2( 4, -30 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Screen" type="Polygon2D" parent="Image" index="1"]
|
||||
position = Vector2( 6.5, -57.5 )
|
||||
polygon = PoolVector2Array( 15.25, 7.625, 15.0588, 9.32172, 14.4949, 10.9334, 13.5865, 12.3791, 12.3791, 13.5865, 10.9334, 14.4949, 9.32172, 15.0588, 7.625, 15.25, -7.625, 15.25, -9.32172, 15.0588, -10.9334, 14.4949, -12.3791, 13.5865, -13.5865, 12.3791, -14.4949, 10.9334, -15.0588, 9.32172, -15.25, 7.625, -15.25, -7.625, -15.0588, -9.32172, -14.4949, -10.9334, -13.5865, -12.3791, -12.3791, -13.5865, -10.9334, -14.4949, -9.32172, -15.0588, -7.625, -15.25, 7.625, -15.25, 9.32172, -15.0588, 10.9334, -14.4949, 12.3791, -13.5865, 13.5865, -12.3791, 14.4949, -10.9334, 15.0588, -9.32172, 15.25, -7.625 )
|
||||
script = ExtResource( 3 )
|
||||
colors = PoolColorArray( 1, 1, 1, 1, 1, 0.372549, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0.156863, 0.466667, 1, 1, 0.796078, 0.235294, 1, 1, 1, 0, 0.843137, 1, 1, 0.686275, 0.686275, 1, 0.662745, 1, 0.662745, 1, 1, 0.992157, 0.596078, 1, 0.768627, 0.768627, 1, 1, 1, 0.568627, 1, 1 )
|
||||
wait_range = Vector2( 0.1, 0.4 )
|
||||
|
||||
[node name="Front" type="Sprite" parent="Image" index="2"]
|
||||
position = Vector2( 4, -30 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="2"]
|
||||
volume_db = -2.0
|
||||
max_distance = 1000.0
|
||||
attenuation = 3.0
|
||||
script = ExtResource( 5 )
|
||||
list = [ ExtResource( 10 ), ExtResource( 9 ), ExtResource( 8 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 7 ), ExtResource( 7 ), ExtResource( 11 ) ]
|
||||
wait = Vector2( 0.1, 0.4 )
|
||||
|
|
|
|||
18
src/arcade/AttractAudio.gd
Normal file
18
src/arcade/AttractAudio.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends AudioStreamPlayer2D
|
||||
|
||||
export(Array, AudioStream) var list : Array = []
|
||||
|
||||
export var wait := Vector2(0.1, 0.3)
|
||||
var clock = 0.0
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
|
||||
func _process(delta):
|
||||
if !playing: clock -= delta
|
||||
|
||||
if clock < 0:
|
||||
clock = rand_range(wait.x, wait.y)
|
||||
stream = list[randi() % list.size()]
|
||||
play()
|
||||
|
||||
12
src/arcade/Screen.gd
Normal file
12
src/arcade/Screen.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node2D
|
||||
|
||||
export var colors : PoolColorArray = []
|
||||
|
||||
export var wait_range := Vector2(0.1, 0.6)
|
||||
var clock := 0.0
|
||||
|
||||
func _process(delta):
|
||||
clock -= delta
|
||||
if clock < 0:
|
||||
clock = rand_range(wait_range.x, wait_range.y)
|
||||
modulate = colors[randi() % colors.size()]
|
||||
|
|
@ -18,8 +18,10 @@ func shape():
|
|||
var rad = [radius.x, radius.y, radius.z, radius.d]
|
||||
|
||||
for i in 4:
|
||||
var lil = min(size.x, size.y)
|
||||
var r = rad[0] if rad[i] == -1 else rad[i]
|
||||
r = clamp(INF if r == -2 else r, 0, min(size.x, size.y))
|
||||
r = INF if r == -2 else r * lil if (r > 0 and r <= 1.0) else r
|
||||
r = clamp(r, 0, lil)
|
||||
|
||||
if points > 1 and r > 0:
|
||||
var v = vec[i] * size - (vec[i] * r)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ func set_open(arg := is_open, is_audio := true):
|
|||
# setup items
|
||||
if is_open:
|
||||
hub_label.visible = !("hub" in Shared.csfn or "start" in Shared.csfn) and "hub" in Shared.last_scene
|
||||
hub_label.text = "Exit Arcade" if Shared.is_arcade else "Exit Stage"
|
||||
|
||||
items = []
|
||||
for i in items_node.get_children():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue