init
This commit is contained in:
commit
18efc36800
161 changed files with 5008 additions and 0 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Normalize EOL for all files that Git considers text files.
|
||||||
|
* text=auto eol=lf
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
17
MalagaJam18.csproj
Normal file
17
MalagaJam18.csproj
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<Project Sdk="Godot.NET.Sdk/4.2.2">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
|
||||||
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
||||||
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="scripts\arduino_control\pulse_generator.gd" />
|
||||||
|
<Content Include="scripts\explosion_player.gd" />
|
||||||
|
<Content Include="scripts\game_flow.gd" />
|
||||||
|
<Content Include="text_typer.tscn" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
19
MalagaJam18.sln
Normal file
19
MalagaJam18.sln
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MalagaJam18", "MalagaJam18.csproj", "{BD8C6378-570F-44CF-8376-0B7BDAE6637B}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||||
|
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||||
|
{BD8C6378-570F-44CF-8376-0B7BDAE6637B}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
27
README.md
Normal file
27
README.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Astromovida
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
**WARNING**: To be able to control this spaceship you need an advanced space control panel, if you do not have this you will not be able to play.
|
||||||
|
|
||||||
|
The captain of the spaceship has fallen unconscious during a space accident, it’s time for you, as a fellow co-pilot and with your great inexperience, to try to prevent this situation from getting worse (it will).
|
||||||
|
|
||||||
|
## The Team
|
||||||
|
|
||||||
|
> Daerune - Art\
|
||||||
|
> ChaosKing - Programming\
|
||||||
|
> Gerard Gascón - Programming & Shaders\
|
||||||
|
> Sastre del Desastre - Music & SFX\
|
||||||
|
> No Coin Arcade - Alternative Controller
|
||||||
|
|
||||||
|
## Game Jam
|
||||||
|
|
||||||
|
MálagaJam Weekend 18 — July 26th - 28th 2024 (48 hours)
|
||||||
|
|
||||||
|
## Theme
|
||||||
|
|
||||||
|
From bad to worse
|
||||||
|
|
||||||
|
## Languages
|
||||||
|
|
||||||
|
Spanish
|
21
addons/sound_manager/LICENSE
Normal file
21
addons/sound_manager/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021-present Nathan Hoad
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
255
addons/sound_manager/SoundManager.cs
Normal file
255
addons/sound_manager/SoundManager.cs
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
using Godot;
|
||||||
|
using Godot.Collections;
|
||||||
|
|
||||||
|
namespace NathanHoad
|
||||||
|
{
|
||||||
|
public partial class SoundManager : Node
|
||||||
|
{
|
||||||
|
private static Node instance;
|
||||||
|
public static Node Instance
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
instance = (Node)Engine.GetSingleton("SoundManager");
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static ProcessModeEnum SoundProcessMode
|
||||||
|
{
|
||||||
|
get => ((Node)Instance.Get("sound_effects")).ProcessMode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
((Node)Instance.Get("sound_effects")).ProcessMode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProcessModeEnum UISoundProcessMode
|
||||||
|
{
|
||||||
|
get => ((Node)Instance.Get("ui_sound_effects")).ProcessMode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
((Node)Instance.Get("ui_sound_effects")).ProcessMode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProcessModeEnum AmbientSoundProcessMode
|
||||||
|
{
|
||||||
|
get => ((Node)Instance.Get("ambient_sounds")).ProcessMode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
((Node)Instance.Get("ambient_sounds")).ProcessMode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProcessModeEnum MusicProcessMode
|
||||||
|
{
|
||||||
|
get => ((Node)Instance.Get("music")).ProcessMode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
((Node)Instance.Get("music")).ProcessMode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region Sounds
|
||||||
|
|
||||||
|
public static float GetSoundVolume()
|
||||||
|
{
|
||||||
|
return (float)Instance.Call("get_sound_volume");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static float GetUISoundVolume()
|
||||||
|
{
|
||||||
|
return (float)Instance.Call("get_ui_sound_volume");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetSoundVolume(float volume)
|
||||||
|
{
|
||||||
|
Instance.Call("set_sound_volume", volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlaySound(AudioStream resource, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_sound", resource, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlaySoundWithPitch(AudioStream resource, float pitch, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_sound_with_pitch", resource, pitch, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void StopSound(AudioStream resource)
|
||||||
|
{
|
||||||
|
Instance.Call("stop_sound", resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayUISound(AudioStream resource, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_ui_sound", resource, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayUISoundWithPitch(AudioStream resource, float pitch, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_ui_sound_with_pitch", resource, pitch, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void StopUISound(AudioStream resource)
|
||||||
|
{
|
||||||
|
Instance.Call("stop_ui_sound", resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetDefaultSoundBus(string bus)
|
||||||
|
{
|
||||||
|
Instance.Call("set_default_sound_bus", bus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetDefaultUISoundBus(string bus)
|
||||||
|
{
|
||||||
|
Instance.Call("set_default_ui_sound_bus", bus);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Ambient sounds
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayAmbientSound(AudioStream resource, float fadeInDuration, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_ambient_sound", resource, fadeInDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void StopAmbientSound(AudioStream resource, float fadeOutDuration)
|
||||||
|
{
|
||||||
|
Instance.Call("stop_ambient_sound", resource, fadeOutDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void StopAllAmbientSounds(float fadeOutDuration)
|
||||||
|
{
|
||||||
|
Instance.Call("stop_all_ambient_sounds", fadeOutDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetDefaultAmbientSoundBus(string bus)
|
||||||
|
{
|
||||||
|
Instance.Call("set_default_ambient_sound_bus", bus);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Music
|
||||||
|
|
||||||
|
public static float GetMusicVolume()
|
||||||
|
{
|
||||||
|
return (float)Instance.Call("get_music_volume");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetMusicVolume(float volume)
|
||||||
|
{
|
||||||
|
Instance.Call("set_music_volume", volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayMusic(AudioStream resource, float crossFadeDuration = 0.0f, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_music", resource, crossFadeDuration, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayMusicFromPosition(AudioStream resource, float position, float crossFadeDuration = 0.0f, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_music_from_position", resource, position, crossFadeDuration, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayMusicAtVolume(AudioStream resource, float volume, float crossFadeDuration = 0.0f, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_music_at_volume", resource, volume, crossFadeDuration, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AudioStreamPlayer PlayMusicFromPositionAtVolume(AudioStream resource, float position, float volume, float crossFadeDuration = 0.0f, string overrideBus = "")
|
||||||
|
{
|
||||||
|
return (AudioStreamPlayer)Instance.Call("play_music_from_position_at_volume", resource, position, volume, crossFadeDuration, overrideBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Array<string> GetMusicTrackHistory()
|
||||||
|
{
|
||||||
|
return (Array<string>)Instance.Call("get_music_track_history");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static string GetLastPlayedMusicTrack()
|
||||||
|
{
|
||||||
|
return (string)Instance.Call("get_last_played_music_track");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static bool IsMusicPlaying(AudioStream resource = null)
|
||||||
|
{
|
||||||
|
return (bool)Instance.Call("is_music_playing", resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static bool IsMusicTrackPlaying(string resource_path)
|
||||||
|
{
|
||||||
|
return (bool)Instance.Call("is_music_track_playing", resource_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Array<AudioStream> GetCurrentlyPlayingMusic()
|
||||||
|
{
|
||||||
|
return (Array<AudioStream>)Instance.Call("get_currently_playing_music");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Array<string> GetCurrentlyPlayingTracks()
|
||||||
|
{
|
||||||
|
return (Array<string>)Instance.Call("get_currently_playing_tracks");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void PauseMusic(AudioStream resource = null)
|
||||||
|
{
|
||||||
|
Instance.Call("pause_music", resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void ResumeMusic(AudioStream resource = null)
|
||||||
|
{
|
||||||
|
Instance.Call("resume_music", resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void StopMusic(float fadeOutDuration = 0.0f)
|
||||||
|
{
|
||||||
|
Instance.Call("stop_music", fadeOutDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetDefaultMusicBus(string bus)
|
||||||
|
{
|
||||||
|
Instance.Call("set_default_music_bus", bus);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
148
addons/sound_manager/abstract_audio_player_pool.gd
Normal file
148
addons/sound_manager/abstract_audio_player_pool.gd
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
@export var default_busses := []
|
||||||
|
@export var default_pool_size := 8
|
||||||
|
|
||||||
|
|
||||||
|
var available_players: Array[AudioStreamPlayer] = []
|
||||||
|
var busy_players: Array[AudioStreamPlayer] = []
|
||||||
|
var bus: String = "Master"
|
||||||
|
|
||||||
|
var _tweens: Dictionary = {}
|
||||||
|
|
||||||
|
|
||||||
|
func _init(possible_busses: PackedStringArray = default_busses, pool_size: int = default_pool_size) -> void:
|
||||||
|
bus = get_possible_bus(possible_busses)
|
||||||
|
|
||||||
|
for i in pool_size:
|
||||||
|
increase_pool()
|
||||||
|
|
||||||
|
func get_possible_bus(possible_busses: PackedStringArray) -> String:
|
||||||
|
for possible_bus in possible_busses:
|
||||||
|
var cases: PackedStringArray = [
|
||||||
|
possible_bus,
|
||||||
|
possible_bus.to_lower(),
|
||||||
|
possible_bus.to_camel_case(),
|
||||||
|
possible_bus.to_pascal_case(),
|
||||||
|
possible_bus.to_snake_case()
|
||||||
|
]
|
||||||
|
for case in cases:
|
||||||
|
if AudioServer.get_bus_index(case) > -1:
|
||||||
|
return case
|
||||||
|
return "Master"
|
||||||
|
|
||||||
|
|
||||||
|
func prepare(resource: AudioStream, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
var player: AudioStreamPlayer
|
||||||
|
|
||||||
|
if resource is AudioStreamRandomizer:
|
||||||
|
player = get_player_with_resource(resource)
|
||||||
|
|
||||||
|
if player == null:
|
||||||
|
player = get_available_player()
|
||||||
|
|
||||||
|
player.stream = resource
|
||||||
|
player.bus = override_bus if override_bus != "" else bus
|
||||||
|
player.volume_db = linear_to_db(1.0)
|
||||||
|
player.pitch_scale = 1
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func get_available_player() -> AudioStreamPlayer:
|
||||||
|
if available_players.size() == 0:
|
||||||
|
increase_pool()
|
||||||
|
var player = available_players.pop_front()
|
||||||
|
busy_players.append(player)
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func get_player_with_resource(resource: AudioStream) -> AudioStreamPlayer:
|
||||||
|
for player in busy_players + available_players:
|
||||||
|
if player.stream == resource:
|
||||||
|
return player
|
||||||
|
return null
|
||||||
|
|
||||||
|
|
||||||
|
func get_busy_player_with_resource(resource: AudioStream) -> AudioStreamPlayer:
|
||||||
|
for player in busy_players:
|
||||||
|
if player.stream.resource_path == resource.resource_path:
|
||||||
|
return player
|
||||||
|
return null
|
||||||
|
|
||||||
|
|
||||||
|
func mark_player_as_available(player: AudioStreamPlayer) -> void:
|
||||||
|
if busy_players.has(player):
|
||||||
|
busy_players.erase(player)
|
||||||
|
|
||||||
|
if available_players.size() >= default_pool_size:
|
||||||
|
player.queue_free()
|
||||||
|
elif not available_players.has(player):
|
||||||
|
available_players.append(player)
|
||||||
|
|
||||||
|
|
||||||
|
func increase_pool() -> void:
|
||||||
|
# See if we can reclaim a rogue busy player
|
||||||
|
for player in busy_players:
|
||||||
|
if not player.playing:
|
||||||
|
mark_player_as_available(player)
|
||||||
|
return
|
||||||
|
|
||||||
|
# Otherwise, add a new player
|
||||||
|
var player := AudioStreamPlayer.new()
|
||||||
|
add_child(player)
|
||||||
|
available_players.append(player)
|
||||||
|
player.bus = bus
|
||||||
|
player.finished.connect(_on_player_finished.bind(player))
|
||||||
|
|
||||||
|
|
||||||
|
func fade_volume(player: AudioStreamPlayer, from_volume: float, to_volume: float, duration: float) -> AudioStreamPlayer:
|
||||||
|
# Remove any tweens that might already be on this player
|
||||||
|
_remove_tween(player)
|
||||||
|
|
||||||
|
# Start a new tween
|
||||||
|
var tween: Tween = get_tree().create_tween().bind_node(self)
|
||||||
|
|
||||||
|
player.volume_db = from_volume
|
||||||
|
if from_volume > to_volume:
|
||||||
|
# Fade out
|
||||||
|
tween.tween_property(player, "volume_db", to_volume, duration).set_trans(Tween.TRANS_CIRC).set_ease(Tween.EASE_IN)
|
||||||
|
else:
|
||||||
|
# Fade in
|
||||||
|
tween.tween_property(player, "volume_db", to_volume, duration).set_trans(Tween.TRANS_QUAD).set_ease(Tween.EASE_OUT)
|
||||||
|
|
||||||
|
_tweens[player] = tween
|
||||||
|
tween.finished.connect(_on_fade_completed.bind(player, tween, from_volume, to_volume, duration))
|
||||||
|
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
#region Helpers
|
||||||
|
|
||||||
|
|
||||||
|
func _remove_tween(player: AudioStreamPlayer) -> void:
|
||||||
|
if _tweens.has(player):
|
||||||
|
var fade: Tween = _tweens.get(player)
|
||||||
|
fade.kill()
|
||||||
|
_tweens.erase(player)
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Signals
|
||||||
|
|
||||||
|
|
||||||
|
func _on_player_finished(player: AudioStreamPlayer) -> void:
|
||||||
|
mark_player_as_available(player)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_fade_completed(player: AudioStreamPlayer, tween: Tween, from_volume: float, to_volume: float, duration: float):
|
||||||
|
_remove_tween(player)
|
||||||
|
|
||||||
|
# If we just faded out then our player is now available
|
||||||
|
if to_volume <= -79.0:
|
||||||
|
player.stop()
|
||||||
|
mark_player_as_available(player)
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
30
addons/sound_manager/ambient_sounds.gd
Normal file
30
addons/sound_manager/ambient_sounds.gd
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
extends "./abstract_audio_player_pool.gd"
|
||||||
|
|
||||||
|
|
||||||
|
func play(resource: AudioStream, fade_in_duration: float, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
var player = get_busy_player_with_resource(resource)
|
||||||
|
|
||||||
|
# If it's already playing then don't play it again
|
||||||
|
if is_instance_valid(player): return player
|
||||||
|
|
||||||
|
player = prepare(resource, override_bus)
|
||||||
|
fade_volume(player, -80.0, 0.0, fade_in_duration)
|
||||||
|
player.call_deferred("play")
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func stop(resource: AudioStream, fade_out_duration: float = 0.0) -> void:
|
||||||
|
if fade_out_duration <= 0.0:
|
||||||
|
fade_out_duration = 0.01
|
||||||
|
|
||||||
|
for player in busy_players:
|
||||||
|
if player.stream == resource:
|
||||||
|
fade_volume(player, player.volume_db, -80, fade_out_duration)
|
||||||
|
|
||||||
|
|
||||||
|
func stop_all(fade_out_duration: float = 0.0) -> void:
|
||||||
|
if fade_out_duration <= 0.0:
|
||||||
|
fade_out_duration = 0.01
|
||||||
|
|
||||||
|
for player in busy_players:
|
||||||
|
fade_volume(player, player.volume_db, -80, fade_out_duration)
|
82
addons/sound_manager/music.gd
Normal file
82
addons/sound_manager/music.gd
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
extends "./abstract_audio_player_pool.gd"
|
||||||
|
|
||||||
|
|
||||||
|
var track_history: PackedStringArray = []
|
||||||
|
|
||||||
|
|
||||||
|
func play(resource: AudioStream, position: float = 0.0, volume: float = 0.0, crossfade_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
stop(crossfade_duration * 2)
|
||||||
|
|
||||||
|
var player = get_busy_player_with_resource(resource)
|
||||||
|
|
||||||
|
# If the player already exists then just make sure the volume is right (it might have just been fading in or out)
|
||||||
|
if player != null:
|
||||||
|
fade_volume(player, player.volume_db, volume, crossfade_duration)
|
||||||
|
return player
|
||||||
|
|
||||||
|
# Otherwise we need to prep another player and handle its introduction
|
||||||
|
player = prepare(resource, override_bus)
|
||||||
|
fade_volume(player, -80.0, volume, crossfade_duration)
|
||||||
|
|
||||||
|
# Remember this track name
|
||||||
|
track_history.insert(0, resource.resource_path)
|
||||||
|
if track_history.size() > 50:
|
||||||
|
track_history.remove_at(50)
|
||||||
|
|
||||||
|
player.call_deferred("play", position)
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func is_playing(resource: AudioStream) -> bool:
|
||||||
|
if resource != null:
|
||||||
|
return get_busy_player_with_resource(resource) != null
|
||||||
|
else:
|
||||||
|
return busy_players.size() > 0
|
||||||
|
|
||||||
|
|
||||||
|
func stop(fade_out_duration: float = 0.0) -> void:
|
||||||
|
for player in busy_players:
|
||||||
|
if fade_out_duration <= 0.0:
|
||||||
|
fade_out_duration = 0.01
|
||||||
|
fade_volume(player, player.volume_db, -80, fade_out_duration)
|
||||||
|
|
||||||
|
|
||||||
|
func pause(resource: AudioStream = null) -> void:
|
||||||
|
if resource != null:
|
||||||
|
var player = get_busy_player_with_resource(resource)
|
||||||
|
if is_instance_valid(player):
|
||||||
|
player.stream_paused = true
|
||||||
|
else:
|
||||||
|
for player in busy_players:
|
||||||
|
player.stream_paused = true
|
||||||
|
|
||||||
|
|
||||||
|
func resume(resource: AudioStream = null) -> void:
|
||||||
|
if resource != null:
|
||||||
|
var player = get_busy_player_with_resource(resource)
|
||||||
|
if is_instance_valid(player):
|
||||||
|
player.stream_paused = false
|
||||||
|
else:
|
||||||
|
for player in busy_players:
|
||||||
|
player.stream_paused = false
|
||||||
|
|
||||||
|
|
||||||
|
func is_track_playing(resource_path: String) -> bool:
|
||||||
|
for player in busy_players:
|
||||||
|
if player.stream.resource_path == resource_path:
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
|
func get_currently_playing() -> Array[AudioStream]:
|
||||||
|
var tracks: Array[AudioStream] = []
|
||||||
|
for player in busy_players:
|
||||||
|
tracks.append(player.stream)
|
||||||
|
return tracks
|
||||||
|
|
||||||
|
|
||||||
|
func get_currently_playing_tracks() -> PackedStringArray:
|
||||||
|
var tracks: PackedStringArray = []
|
||||||
|
for player in busy_players:
|
||||||
|
tracks.append(player.stream.resource_path)
|
||||||
|
return tracks
|
7
addons/sound_manager/plugin.cfg
Normal file
7
addons/sound_manager/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="SoundManager"
|
||||||
|
description="Manage your sounds and music"
|
||||||
|
author="Nathan Hoad"
|
||||||
|
version="2.6.2"
|
||||||
|
script="plugin.gd"
|
14
addons/sound_manager/plugin.gd
Normal file
14
addons/sound_manager/plugin.gd
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
@tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree():
|
||||||
|
add_autoload_singleton("SoundManager", get_plugin_path() + "/sound_manager.gd")
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree():
|
||||||
|
remove_autoload_singleton("SoundManager")
|
||||||
|
|
||||||
|
|
||||||
|
func get_plugin_path() -> String:
|
||||||
|
return get_script().resource_path.get_base_dir()
|
13
addons/sound_manager/sound_effects.gd
Normal file
13
addons/sound_manager/sound_effects.gd
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extends "./abstract_audio_player_pool.gd"
|
||||||
|
|
||||||
|
|
||||||
|
func play(resource: AudioStream, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
var player = prepare(resource, override_bus)
|
||||||
|
player.call_deferred("play")
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func stop(resource: AudioStream) -> void:
|
||||||
|
for player in busy_players:
|
||||||
|
if player.stream == resource:
|
||||||
|
player.call_deferred("stop")
|
227
addons/sound_manager/sound_manager.gd
Normal file
227
addons/sound_manager/sound_manager.gd
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
const SoundEffectsPlayer = preload("./sound_effects.gd")
|
||||||
|
const AmbientSoundsPlayer = preload("./ambient_sounds.gd")
|
||||||
|
const MusicPlayer = preload("./music.gd")
|
||||||
|
|
||||||
|
var sound_effects: SoundEffectsPlayer = SoundEffectsPlayer.new(["Sounds", "SFX"], 8)
|
||||||
|
var ui_sound_effects: SoundEffectsPlayer = SoundEffectsPlayer.new(["UI", "Interface", "Sounds", "SFX"], 8)
|
||||||
|
var ambient_sounds: AmbientSoundsPlayer = AmbientSoundsPlayer.new(["Sounds", "SFX"], 1)
|
||||||
|
var music: MusicPlayer = MusicPlayer.new(["Music"], 2)
|
||||||
|
|
||||||
|
var sound_process_mode: ProcessMode:
|
||||||
|
set(value):
|
||||||
|
sound_effects.process_mode = value
|
||||||
|
get:
|
||||||
|
return sound_effects.process_mode
|
||||||
|
|
||||||
|
var ui_sound_process_mode: ProcessMode:
|
||||||
|
set(value):
|
||||||
|
ui_sound_effects.process_mode = value
|
||||||
|
get:
|
||||||
|
return ui_sound_effects.process_mode
|
||||||
|
|
||||||
|
|
||||||
|
var ambient_sound_process_mode: ProcessMode:
|
||||||
|
set(value):
|
||||||
|
ambient_sounds.process_mode = value
|
||||||
|
get:
|
||||||
|
return ambient_sounds.process_mode
|
||||||
|
|
||||||
|
|
||||||
|
var music_process_mode: ProcessMode:
|
||||||
|
set(value):
|
||||||
|
music.process_mode = value
|
||||||
|
get:
|
||||||
|
return music.process_mode
|
||||||
|
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
Engine.register_singleton("SoundManager", self)
|
||||||
|
|
||||||
|
add_child(sound_effects)
|
||||||
|
add_child(ui_sound_effects)
|
||||||
|
add_child(ambient_sounds)
|
||||||
|
add_child(music)
|
||||||
|
|
||||||
|
self.sound_process_mode = PROCESS_MODE_PAUSABLE
|
||||||
|
self.ui_sound_process_mode = PROCESS_MODE_ALWAYS
|
||||||
|
self.ambient_sound_process_mode = PROCESS_MODE_ALWAYS
|
||||||
|
self.music_process_mode = PROCESS_MODE_ALWAYS
|
||||||
|
|
||||||
|
|
||||||
|
#region Sounds
|
||||||
|
|
||||||
|
|
||||||
|
func get_sound_volume() -> float:
|
||||||
|
return db_to_linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index(sound_effects.bus)))
|
||||||
|
|
||||||
|
|
||||||
|
func set_sound_volume(volume_between_0_and_1: float) -> void:
|
||||||
|
_show_shared_bus_warning()
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(sound_effects.bus), linear_to_db(volume_between_0_and_1))
|
||||||
|
|
||||||
|
|
||||||
|
func play_sound(resource: AudioStream, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return sound_effects.play(resource, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func play_sound_with_pitch(resource: AudioStream, pitch: float = 1.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
var player = sound_effects.play(resource, override_bus)
|
||||||
|
player.pitch_scale = pitch
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func stop_sound(resource: AudioStream) -> void:
|
||||||
|
return sound_effects.stop(resource)
|
||||||
|
|
||||||
|
|
||||||
|
func set_default_sound_bus(bus: String) -> void:
|
||||||
|
sound_effects.bus = bus
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region UI sounds
|
||||||
|
|
||||||
|
|
||||||
|
func get_ui_sound_volume() -> float:
|
||||||
|
return db_to_linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index(ui_sound_effects.bus)))
|
||||||
|
|
||||||
|
|
||||||
|
func set_ui_sound_volume(volume_between_0_and_1: float) -> void:
|
||||||
|
_show_shared_bus_warning()
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(ui_sound_effects.bus), linear_to_db(volume_between_0_and_1))
|
||||||
|
|
||||||
|
|
||||||
|
func play_ui_sound(resource: AudioStream, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return ui_sound_effects.play(resource, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func play_ui_sound_with_pitch(resource: AudioStream, pitch: float = 1.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
var player = ui_sound_effects.play(resource, override_bus)
|
||||||
|
player.pitch_scale = pitch
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func stop_ui_sound(resource: AudioStream) -> void:
|
||||||
|
return ui_sound_effects.stop(resource)
|
||||||
|
|
||||||
|
|
||||||
|
func set_default_ui_sound_bus(bus: String) -> void:
|
||||||
|
ui_sound_effects.bus = bus
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Ambient sound
|
||||||
|
|
||||||
|
|
||||||
|
func get_ambient_sound_volume() -> float:
|
||||||
|
return db_to_linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index(ambient_sounds.bus)))
|
||||||
|
|
||||||
|
|
||||||
|
func set_ambient_sound_volume(volume_between_0_and_1: float) -> void:
|
||||||
|
_show_shared_bus_warning()
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(ambient_sounds.bus), linear_to_db(volume_between_0_and_1))
|
||||||
|
|
||||||
|
|
||||||
|
func play_ambient_sound(resource: AudioStream, fade_in_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return ambient_sounds.play(resource, fade_in_duration, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func stop_ambient_sound(resource: AudioStream, fade_out_duration: float = 0.0) -> void:
|
||||||
|
ambient_sounds.stop(resource, fade_out_duration)
|
||||||
|
|
||||||
|
|
||||||
|
func stop_all_ambient_sounds(fade_out_duration: float = 0.0) -> void:
|
||||||
|
ambient_sounds.stop_all(fade_out_duration)
|
||||||
|
|
||||||
|
|
||||||
|
func set_default_ambient_sound_bus(bus: String) -> void:
|
||||||
|
ambient_sounds.bus = bus
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Music
|
||||||
|
|
||||||
|
func get_music_volume() -> float:
|
||||||
|
return db_to_linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index(music.bus)))
|
||||||
|
|
||||||
|
|
||||||
|
func set_music_volume(volume_between_0_and_1: float) -> void:
|
||||||
|
_show_shared_bus_warning()
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(music.bus), linear_to_db(volume_between_0_and_1))
|
||||||
|
|
||||||
|
|
||||||
|
func play_music(resource: AudioStream, crossfade_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return music.play(resource, 0.0, 0.0, crossfade_duration, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func play_music_from_position(resource: AudioStream, position: float = 0.0, crossfade_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return music.play(resource, position, 0.0, crossfade_duration, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func play_music_at_volume(resource: AudioStream, volume: float = 0.0, crossfade_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return music.play(resource, 0.0, volume, crossfade_duration, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func play_music_from_position_at_volume(resource: AudioStream, position: float = 0.0, volume: float = 0.0, crossfade_duration: float = 0.0, override_bus: String = "") -> AudioStreamPlayer:
|
||||||
|
return music.play(resource, position, volume, crossfade_duration, override_bus)
|
||||||
|
|
||||||
|
|
||||||
|
func get_music_track_history() -> Array:
|
||||||
|
return music.track_history
|
||||||
|
|
||||||
|
|
||||||
|
func get_last_played_music_track() -> String:
|
||||||
|
return music.track_history[0]
|
||||||
|
|
||||||
|
|
||||||
|
func is_music_playing(resource: AudioStream = null) -> bool:
|
||||||
|
return music.is_playing(resource)
|
||||||
|
|
||||||
|
|
||||||
|
func is_music_track_playing(resource_path: String) -> bool:
|
||||||
|
return music.is_track_playing(resource_path)
|
||||||
|
|
||||||
|
|
||||||
|
func get_currently_playing_music() -> Array:
|
||||||
|
return music.get_currently_playing()
|
||||||
|
|
||||||
|
|
||||||
|
func get_currently_playing_music_tracks() -> Array:
|
||||||
|
return music.get_currently_playing_tracks()
|
||||||
|
|
||||||
|
|
||||||
|
func pause_music(resource: AudioStream = null) -> void:
|
||||||
|
music.pause(resource)
|
||||||
|
|
||||||
|
|
||||||
|
func resume_music(resource: AudioStream = null) -> void:
|
||||||
|
music.resume(resource)
|
||||||
|
|
||||||
|
|
||||||
|
func stop_music(fade_out_duration: float = 0.0) -> void:
|
||||||
|
music.stop(fade_out_duration)
|
||||||
|
|
||||||
|
|
||||||
|
func set_default_music_bus(bus: String) -> void:
|
||||||
|
music.bus = bus
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region helpers
|
||||||
|
|
||||||
|
|
||||||
|
func _show_shared_bus_warning() -> void:
|
||||||
|
if "Master" in [music.bus, sound_effects.bus, ui_sound_effects.bus, ambient_sounds.bus]:
|
||||||
|
push_warning("Using the Master sound bus directly isn't recommended.")
|
||||||
|
if music.bus == sound_effects.bus or music.bus == ui_sound_effects.bus:
|
||||||
|
push_warning("Both music and sounds are using the same bus: %s" % music.bus)
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
BIN
audio/ingame/alarm/beep-warning-6387.mp3
Normal file
BIN
audio/ingame/alarm/beep-warning-6387.mp3
Normal file
Binary file not shown.
19
audio/ingame/alarm/beep-warning-6387.mp3.import
Normal file
19
audio/ingame/alarm/beep-warning-6387.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://cqkwp7ohpy4wt"
|
||||||
|
path="res://.godot/imported/beep-warning-6387.mp3-c84940d2cc390207a21dd32ebf897c13.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/alarm/beep-warning-6387.mp3"
|
||||||
|
dest_files=["res://.godot/imported/beep-warning-6387.mp3-c84940d2cc390207a21dd32ebf897c13.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0.0
|
||||||
|
bpm=0.0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
BIN
audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3
Normal file
BIN
audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3
Normal file
Binary file not shown.
19
audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3.import
Normal file
19
audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://gsr48kyou765"
|
||||||
|
path="res://.godot/imported/red-alert_nuclear_buzzer-99741.mp3-7fdb1f3aa3b48aa8b5305b7cb2ba9eab.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3"
|
||||||
|
dest_files=["res://.godot/imported/red-alert_nuclear_buzzer-99741.mp3-7fdb1f3aa3b48aa8b5305b7cb2ba9eab.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
BIN
audio/ingame/dinamo03.wav
Normal file
BIN
audio/ingame/dinamo03.wav
Normal file
Binary file not shown.
24
audio/ingame/dinamo03.wav.import
Normal file
24
audio/ingame/dinamo03.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://ddejj31me7x4m"
|
||||||
|
path="res://.godot/imported/dinamo03.wav-1b48b38958573c59fbeefcd81ba86b44.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/dinamo03.wav"
|
||||||
|
dest_files=["res://.godot/imported/dinamo03.wav-1b48b38958573c59fbeefcd81ba86b44.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=2
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/ingame/explosion/bigboom-42826.mp3
Normal file
BIN
audio/ingame/explosion/bigboom-42826.mp3
Normal file
Binary file not shown.
19
audio/ingame/explosion/bigboom-42826.mp3.import
Normal file
19
audio/ingame/explosion/bigboom-42826.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://d3gfdigg7qmkq"
|
||||||
|
path="res://.godot/imported/bigboom-42826.mp3-205b84f9ced19b91fde87c2f8aafcc3b.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/explosion/bigboom-42826.mp3"
|
||||||
|
dest_files=["res://.godot/imported/bigboom-42826.mp3-205b84f9ced19b91fde87c2f8aafcc3b.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
BIN
audio/ingame/explosion/distant-explosion-47562.mp3
Normal file
BIN
audio/ingame/explosion/distant-explosion-47562.mp3
Normal file
Binary file not shown.
19
audio/ingame/explosion/distant-explosion-47562.mp3.import
Normal file
19
audio/ingame/explosion/distant-explosion-47562.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://cx6c74xlim53n"
|
||||||
|
path="res://.godot/imported/distant-explosion-47562.mp3-bddbb6efff3bde4affdf80a0beff1d29.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/explosion/distant-explosion-47562.mp3"
|
||||||
|
dest_files=["res://.godot/imported/distant-explosion-47562.mp3-bddbb6efff3bde4affdf80a0beff1d29.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
BIN
audio/ingame/explosion/medium-explosion-40472.mp3
Normal file
BIN
audio/ingame/explosion/medium-explosion-40472.mp3
Normal file
Binary file not shown.
19
audio/ingame/explosion/medium-explosion-40472.mp3.import
Normal file
19
audio/ingame/explosion/medium-explosion-40472.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://dgntsonvvvwjn"
|
||||||
|
path="res://.godot/imported/medium-explosion-40472.mp3-691f38b717a2b565d5e248e79174ee79.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/explosion/medium-explosion-40472.mp3"
|
||||||
|
dest_files=["res://.godot/imported/medium-explosion-40472.mp3-691f38b717a2b565d5e248e79174ee79.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
BIN
audio/ingame/voicy01.wav
Normal file
BIN
audio/ingame/voicy01.wav
Normal file
Binary file not shown.
24
audio/ingame/voicy01.wav.import
Normal file
24
audio/ingame/voicy01.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://oie1p0ruj3mm"
|
||||||
|
path="res://.godot/imported/voicy01.wav-459b3bed15537b45feb63554181da3eb.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/voicy01.wav"
|
||||||
|
dest_files=["res://.godot/imported/voicy01.wav-459b3bed15537b45feb63554181da3eb.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/ingame/voicy02.wav
Normal file
BIN
audio/ingame/voicy02.wav
Normal file
Binary file not shown.
24
audio/ingame/voicy02.wav.import
Normal file
24
audio/ingame/voicy02.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://bcmhn2w0xhvog"
|
||||||
|
path="res://.godot/imported/voicy02.wav-7fd90ad96aeab5c6b365d1da46177209.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/ingame/voicy02.wav"
|
||||||
|
dest_files=["res://.godot/imported/voicy02.wav-7fd90ad96aeab5c6b365d1da46177209.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/music.wav
Normal file
BIN
audio/music.wav
Normal file
Binary file not shown.
24
audio/music.wav.import
Normal file
24
audio/music.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://dokkkq3u0tgmr"
|
||||||
|
path="res://.godot/imported/music.wav-f70de144183aec913ba40436d959cfed.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/music.wav"
|
||||||
|
dest_files=["res://.godot/imported/music.wav-f70de144183aec913ba40436d959cfed.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=2
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/sfx/coche_choque.wav
Normal file
BIN
audio/sfx/coche_choque.wav
Normal file
Binary file not shown.
24
audio/sfx/coche_choque.wav.import
Normal file
24
audio/sfx/coche_choque.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://bbk7bwso0hlpp"
|
||||||
|
path="res://.godot/imported/coche_choque.wav-2c26d8d6c2fc6c1587279911b3c86304.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/sfx/coche_choque.wav"
|
||||||
|
dest_files=["res://.godot/imported/coche_choque.wav-2c26d8d6c2fc6c1587279911b3c86304.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/sfx/cucaracha.wav
Normal file
BIN
audio/sfx/cucaracha.wav
Normal file
Binary file not shown.
24
audio/sfx/cucaracha.wav.import
Normal file
24
audio/sfx/cucaracha.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://tpf5bcnaugm8"
|
||||||
|
path="res://.godot/imported/cucaracha.wav-72ef6edded57d1827a0848f2c039dc0e.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/sfx/cucaracha.wav"
|
||||||
|
dest_files=["res://.godot/imported/cucaracha.wav-72ef6edded57d1827a0848f2c039dc0e.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/sfx/le_fishe.wav
Normal file
BIN
audio/sfx/le_fishe.wav
Normal file
Binary file not shown.
24
audio/sfx/le_fishe.wav.import
Normal file
24
audio/sfx/le_fishe.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://bibremy5etxpr"
|
||||||
|
path="res://.godot/imported/le_fishe.wav-7214aaaf7ecc10b20e5e67ce902b29d2.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/sfx/le_fishe.wav"
|
||||||
|
dest_files=["res://.godot/imported/le_fishe.wav-7214aaaf7ecc10b20e5e67ce902b29d2.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
BIN
audio/sfx/metal.wav
Normal file
BIN
audio/sfx/metal.wav
Normal file
Binary file not shown.
24
audio/sfx/metal.wav.import
Normal file
24
audio/sfx/metal.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://bilo0hq0hxfqx"
|
||||||
|
path="res://.godot/imported/metal.wav-0d736a9ee5189ab480f5afe11f05f644.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/sfx/metal.wav"
|
||||||
|
dest_files=["res://.godot/imported/metal.wav-0d736a9ee5189ab480f5afe11f05f644.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
6
events/dialog_event_01.tscn
Normal file
6
events/dialog_event_01.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://df8n0o7xie1pd"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/dialog_event_01.gd" id="1_58hqn"]
|
||||||
|
|
||||||
|
[node name="DialogEvent01" type="Node"]
|
||||||
|
script = ExtResource("1_58hqn")
|
6
events/event_01.tscn
Normal file
6
events/event_01.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://j2321b52c786"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_01.gd" id="1_0bkk8"]
|
||||||
|
|
||||||
|
[node name="Event01" type="Node"]
|
||||||
|
script = ExtResource("1_0bkk8")
|
6
events/event_02.tscn
Normal file
6
events/event_02.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bgd0kleafe3tt"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_02.gd" id="1_rwmf3"]
|
||||||
|
|
||||||
|
[node name="Event02" type="Node"]
|
||||||
|
script = ExtResource("1_rwmf3")
|
6
events/event_03.tscn
Normal file
6
events/event_03.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bp51aimop7oh4"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_03.gd" id="1_4ha5h"]
|
||||||
|
|
||||||
|
[node name="Event03" type="Node"]
|
||||||
|
script = ExtResource("1_4ha5h")
|
6
events/event_04.tscn
Normal file
6
events/event_04.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://d0gb7qrfx8a2y"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_04.gd" id="1_05xcx"]
|
||||||
|
|
||||||
|
[node name="Event04" type="Node"]
|
||||||
|
script = ExtResource("1_05xcx")
|
6
events/event_05.tscn
Normal file
6
events/event_05.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cvnyfyuv2n48k"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_05.gd" id="1_8uise"]
|
||||||
|
|
||||||
|
[node name="Event05" type="Node"]
|
||||||
|
script = ExtResource("1_8uise")
|
6
events/event_06.tscn
Normal file
6
events/event_06.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bghp7h1dikme2"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_06.gd" id="1_jw6mr"]
|
||||||
|
|
||||||
|
[node name="Event06" type="Node"]
|
||||||
|
script = ExtResource("1_jw6mr")
|
6
events/event_07.tscn
Normal file
6
events/event_07.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://dbbsawl4vhdpr"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_07.gd" id="1_6qnir"]
|
||||||
|
|
||||||
|
[node name="Event07" type="Node"]
|
||||||
|
script = ExtResource("1_6qnir")
|
6
events/event_08.tscn
Normal file
6
events/event_08.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://wrd4owimkfca"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_08.gd" id="1_rm2lo"]
|
||||||
|
|
||||||
|
[node name="Event08" type="Node"]
|
||||||
|
script = ExtResource("1_rm2lo")
|
6
events/event_09.tscn
Normal file
6
events/event_09.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://b6uffq6kk6qsu"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_09.gd" id="1_dkbce"]
|
||||||
|
|
||||||
|
[node name="Event09" type="Node"]
|
||||||
|
script = ExtResource("1_dkbce")
|
6
events/event_10.tscn
Normal file
6
events/event_10.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bif5k7krl80mb"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_10.gd" id="1_c6skj"]
|
||||||
|
|
||||||
|
[node name="Event10" type="Node"]
|
||||||
|
script = ExtResource("1_c6skj")
|
6
events/event_11.tscn
Normal file
6
events/event_11.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://b3034uxqmdmvi"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/events/event_11.gd" id="1_mqgus"]
|
||||||
|
|
||||||
|
[node name="Event11" type="Node"]
|
||||||
|
script = ExtResource("1_mqgus")
|
6
events/test_event.tscn
Normal file
6
events/test_event.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://d3pnrkd4g5516"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/event.gd" id="1_c81gq"]
|
||||||
|
|
||||||
|
[node name="Node" type="Node"]
|
||||||
|
script = ExtResource("1_c81gq")
|
65
export_presets.cfg
Normal file
65
export_presets.cfg
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=true
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="../../OneDrive/Escriptori/Build/Astromovidas.exe"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/bptc=true
|
||||||
|
texture_format/s3tc=true
|
||||||
|
texture_format/etc=false
|
||||||
|
texture_format/etc2=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
codesign/enable=false
|
||||||
|
codesign/timestamp=true
|
||||||
|
codesign/timestamp_server_url=""
|
||||||
|
codesign/digest_algorithm=1
|
||||||
|
codesign/description=""
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
application/modify_resources=true
|
||||||
|
application/icon=""
|
||||||
|
application/console_wrapper_icon=""
|
||||||
|
application/icon_interpolation=4
|
||||||
|
application/file_version=""
|
||||||
|
application/product_version=""
|
||||||
|
application/company_name=""
|
||||||
|
application/product_name=""
|
||||||
|
application/file_description=""
|
||||||
|
application/copyright=""
|
||||||
|
application/trademarks=""
|
||||||
|
application/export_angle=0
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||||
|
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||||
|
$settings = New-ScheduledTaskSettingsSet
|
||||||
|
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||||
|
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||||
|
Start-ScheduledTask -TaskName godot_remote_debug
|
||||||
|
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
||||||
|
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||||
|
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||||
|
dotnet/include_scripts_content=false
|
||||||
|
dotnet/include_debug_symbols=true
|
||||||
|
dotnet/embed_build_outputs=false
|
BIN
font/DMSerifDisplay-Regular.ttf
Normal file
BIN
font/DMSerifDisplay-Regular.ttf
Normal file
Binary file not shown.
33
font/DMSerifDisplay-Regular.ttf.import
Normal file
33
font/DMSerifDisplay-Regular.ttf.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://dpsmqkos4x6b5"
|
||||||
|
path="res://.godot/imported/DMSerifDisplay-Regular.ttf-c3f77f34c96ecaf3a2a54addd8073748.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://font/DMSerifDisplay-Regular.ttf"
|
||||||
|
dest_files=["res://.godot/imported/DMSerifDisplay-Regular.ttf-c3f77f34c96ecaf3a2a54addd8073748.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=1
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
1
icon.svg
Normal file
1
icon.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z" fill="#478cbf"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>
|
After Width: | Height: | Size: 949 B |
37
icon.svg.import
Normal file
37
icon.svg.import
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bp6wsawhevdfj"
|
||||||
|
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.svg"
|
||||||
|
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
166
project.godot
Normal file
166
project.godot
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=5
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="MalagaJam18"
|
||||||
|
run/main_scene="res://scenes/titile.tscn"
|
||||||
|
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
|
||||||
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
SoundManager="*res://addons/sound_manager/sound_manager.gd"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|
window/size/viewport_height=1080
|
||||||
|
window/size/mode=3
|
||||||
|
window/size/window_width_override=1152
|
||||||
|
window/size/window_height_override=648
|
||||||
|
window/stretch/mode="canvas_items"
|
||||||
|
|
||||||
|
[dotnet]
|
||||||
|
|
||||||
|
project/assembly_name="MalagaJam18"
|
||||||
|
|
||||||
|
[editor_plugins]
|
||||||
|
|
||||||
|
enabled=PackedStringArray("res://addons/sound_manager/plugin.cfg")
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
BTN_1={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":71,"key_label":0,"unicode":103,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":72,"key_label":0,"unicode":104,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_3={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_4={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":75,"key_label":0,"unicode":107,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
LJ_UP={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
LJ_DOWN={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
LJ_LEFT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
LJ_RIGHT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
RJ_UP={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
RJ_DOWN={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
RJ_LEFT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
RJ_RIGHT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_5={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
DEBUG_Lock_Cursor={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194332,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
DEBUG_Unlock_Cursor={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194333,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_6={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":80,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
environment/defaults/default_clear_color=Color(0.396078, 0.466667, 0.745098, 1)
|
||||||
|
RJ_LEFT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
RJ_RIGHT={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
BTN_5={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
DEBUG_Lock_Cursor={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194332,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
DEBUG_Unlock_Cursor={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194333,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
9
resources/sample_action.tres
Normal file
9
resources/sample_action.tres
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="ActionData" load_steps=2 format=3 uid="uid://dld73wxvntv6w"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/action_data.gd" id="1_1wo7v"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_1wo7v")
|
||||||
|
text = ""
|
||||||
|
actions = PackedStringArray()
|
||||||
|
duration = 0.0
|
84
scenes/crt.tscn
Normal file
84
scenes/crt.tscn
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://fu50vlhoj4tc"]
|
||||||
|
|
||||||
|
[ext_resource type="Shader" path="res://shaders/crt.gdshader" id="1_4lil0"]
|
||||||
|
[ext_resource type="Shader" path="res://shaders/crt_glitch.gdshader" id="1_buck2"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/crt_controller.gd" id="1_iyhmc"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3sjvv"]
|
||||||
|
shader = ExtResource("1_buck2")
|
||||||
|
shader_parameter/overlay = true
|
||||||
|
shader_parameter/scanlines_opacity = 0.4
|
||||||
|
shader_parameter/scanlines_width = 0.25
|
||||||
|
shader_parameter/grille_opacity = 0.1
|
||||||
|
shader_parameter/resolution = Vector2(1920, 1080)
|
||||||
|
shader_parameter/pixelate = false
|
||||||
|
shader_parameter/roll = true
|
||||||
|
shader_parameter/roll_speed = 0.0
|
||||||
|
shader_parameter/roll_size = 0.0
|
||||||
|
shader_parameter/roll_variation = 3.444
|
||||||
|
shader_parameter/distort_intensity = 0.2
|
||||||
|
shader_parameter/noise_opacity = 0.848
|
||||||
|
shader_parameter/noise_speed = 11.0
|
||||||
|
shader_parameter/static_noise_intensity = 1.0
|
||||||
|
shader_parameter/aberration = 0.576
|
||||||
|
shader_parameter/brightness = 1.0
|
||||||
|
shader_parameter/discolor = false
|
||||||
|
shader_parameter/warp_amount = 1.153
|
||||||
|
shader_parameter/clip_warp = false
|
||||||
|
shader_parameter/vignette_intensity = 1.32
|
||||||
|
shader_parameter/vignette_opacity = 0.612
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_276sp"]
|
||||||
|
shader = ExtResource("1_4lil0")
|
||||||
|
shader_parameter/overlay = false
|
||||||
|
shader_parameter/scanlines_opacity = 0.1
|
||||||
|
shader_parameter/scanlines_width = 0.25
|
||||||
|
shader_parameter/grille_opacity = 0.3
|
||||||
|
shader_parameter/resolution = Vector2(640, 480)
|
||||||
|
shader_parameter/pixelate = false
|
||||||
|
shader_parameter/roll = true
|
||||||
|
shader_parameter/roll_speed = 3.0
|
||||||
|
shader_parameter/roll_size = 5.0
|
||||||
|
shader_parameter/roll_variation = 1.8
|
||||||
|
shader_parameter/distort_intensity = 0.01
|
||||||
|
shader_parameter/noise_opacity = 0.4
|
||||||
|
shader_parameter/noise_speed = 5.0
|
||||||
|
shader_parameter/static_noise_intensity = 0.06
|
||||||
|
shader_parameter/aberration = 0.01
|
||||||
|
shader_parameter/brightness = 1.4
|
||||||
|
shader_parameter/discolor = false
|
||||||
|
shader_parameter/warp_amount = 1.153
|
||||||
|
shader_parameter/clip_warp = false
|
||||||
|
shader_parameter/vignette_intensity = 0.4
|
||||||
|
shader_parameter/vignette_opacity = 0.5
|
||||||
|
|
||||||
|
[node name="CRT" type="Control" node_paths=PackedStringArray("normal_filter", "distortion_filter")]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_iyhmc")
|
||||||
|
normal_filter = NodePath("Normal")
|
||||||
|
distortion_filter = NodePath("Distortion")
|
||||||
|
|
||||||
|
[node name="Distortion" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
|
material = SubResource("ShaderMaterial_3sjvv")
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="Normal" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
|
material = SubResource("ShaderMaterial_276sp")
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
64
scenes/end_card.tscn
Normal file
64
scenes/end_card.tscn
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
[gd_scene load_steps=7 format=3 uid="uid://3gej4vd7cwgk"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/end_card.gd" id="1_gj4nw"]
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_d3v7t"]
|
||||||
|
offsets = PackedFloat32Array(0)
|
||||||
|
colors = PackedColorArray(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_6m76t"]
|
||||||
|
gradient = SubResource("Gradient_d3v7t")
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_w7cdy"]
|
||||||
|
font_size = 72
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_ea5bh"]
|
||||||
|
font_size = 48
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_2m5lh"]
|
||||||
|
font_size = 32
|
||||||
|
|
||||||
|
[node name="EndCard" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_gj4nw")
|
||||||
|
|
||||||
|
[node name="BG" type="TextureRect" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 1936.0
|
||||||
|
offset_bottom = 1096.0
|
||||||
|
texture = SubResource("GradientTexture2D_6m76t")
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_top = 16.0
|
||||||
|
offset_right = 1919.0
|
||||||
|
offset_bottom = 918.0
|
||||||
|
text = "Moriste de forma espectacular"
|
||||||
|
label_settings = SubResource("LabelSettings_w7cdy")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="Time" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 433.0
|
||||||
|
offset_top = 523.0
|
||||||
|
offset_right = 1501.0
|
||||||
|
offset_bottom = 590.0
|
||||||
|
text = "Has durado unos segundos"
|
||||||
|
label_settings = SubResource("LabelSettings_ea5bh")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Subtitle" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 431.0
|
||||||
|
offset_top = 609.0
|
||||||
|
offset_right = 1493.0
|
||||||
|
offset_bottom = 654.0
|
||||||
|
text = "Pulsa un botón para intentarlo de nuevo"
|
||||||
|
label_settings = SubResource("LabelSettings_2m5lh")
|
||||||
|
horizontal_alignment = 1
|
61
scenes/event_test.tscn
Normal file
61
scenes/event_test.tscn
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
[gd_scene load_steps=7 format=3 uid="uid://diosd3dqg1151"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b0ky8bjwk3xp4" path="res://scenes/game_manager.tscn" id="1_p3bjn"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/spinner_tester.gd" id="3_bnp66"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_4gvpi"]
|
||||||
|
font_size = 30
|
||||||
|
font_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_ud337"]
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_76fwl"]
|
||||||
|
gradient = SubResource("Gradient_ud337")
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_sswhn"]
|
||||||
|
resource_name = "ev_starter"
|
||||||
|
script/source = "extends Node
|
||||||
|
|
||||||
|
@onready var manager = $\"../GameManager\"
|
||||||
|
var res_ev01 = load(\"res://events/event_01.tscn\")
|
||||||
|
var res_ev02 = load(\"res://events/event_02.tscn\")
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
var ev01 = res_ev01.instantiate()
|
||||||
|
var ev02 = res_ev02.instantiate()
|
||||||
|
await get_tree().create_timer(5).timeout
|
||||||
|
print(\"event 1 start!\")
|
||||||
|
manager.insert_event(ev01)
|
||||||
|
await get_tree().create_timer(10).timeout
|
||||||
|
print(\"event 2 start!\")
|
||||||
|
manager.insert_event(ev02)
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="EventTest" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="GameManager" parent="." instance=ExtResource("1_p3bjn")]
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
offset_left = 1265.0
|
||||||
|
offset_top = 55.0
|
||||||
|
offset_right = 1598.0
|
||||||
|
offset_bottom = 97.0
|
||||||
|
text = "Dead Spinner Indicator"
|
||||||
|
label_settings = SubResource("LabelSettings_4gvpi")
|
||||||
|
|
||||||
|
[node name="dead_spinner" type="TextureRect" parent="."]
|
||||||
|
offset_left = 1387.0
|
||||||
|
offset_top = 136.0
|
||||||
|
offset_right = 1451.0
|
||||||
|
offset_bottom = 200.0
|
||||||
|
texture = SubResource("GradientTexture2D_76fwl")
|
||||||
|
script = ExtResource("3_bnp66")
|
||||||
|
|
||||||
|
[node name="EventStarter" type="Node" parent="."]
|
||||||
|
script = SubResource("GDScript_sswhn")
|
17
scenes/game_manager.tscn
Normal file
17
scenes/game_manager.tscn
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://b0ky8bjwk3xp4"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/game_manager.gd" id="1_g2l3u"]
|
||||||
|
|
||||||
|
[node name="GameManager" type="Node"]
|
||||||
|
script = ExtResource("1_g2l3u")
|
||||||
|
|
||||||
|
[node name="GracePeriod" type="Timer" parent="."]
|
||||||
|
wait_time = 7.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="EventTimer" type="Timer" parent="."]
|
||||||
|
wait_time = 4.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[connection signal="timeout" from="GracePeriod" to="." method="_on_grace_period_timeout"]
|
||||||
|
[connection signal="timeout" from="EventTimer" to="." method="_on_event_timer_timeout"]
|
7
scenes/pulse_generator.tscn
Normal file
7
scenes/pulse_generator.tscn
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://ci0e3v6oslfp0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/arduino_control/pulse_generator.gd" id="1_v2vrn"]
|
||||||
|
|
||||||
|
[node name="PulseGenerator" type="Node"]
|
||||||
|
script = ExtResource("1_v2vrn")
|
||||||
|
pulseInterval = 0.05
|
25
scenes/smoke_particles.tscn
Normal file
25
scenes/smoke_particles.tscn
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://13c4hels5d38"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ctlhowug3qhm3" path="res://sprites/fx/whitePuff00.png" id="1_2qblt"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_7skad"]
|
||||||
|
_data = [Vector2(0, 0.0360453), 0.0, 1.36273, 0, 0, Vector2(1, 0.364058), -0.50206, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_khhnp"]
|
||||||
|
colors = PackedColorArray(0.619608, 0.564706, 0.556863, 0.65098, 1, 1, 1, 0)
|
||||||
|
|
||||||
|
[node name="smoke_particles" type="CPUParticles2D"]
|
||||||
|
amount = 30
|
||||||
|
lifetime = 10.0
|
||||||
|
texture = ExtResource("1_2qblt")
|
||||||
|
spread = 180.0
|
||||||
|
gravity = Vector2(0, -10)
|
||||||
|
initial_velocity_min = 1.0
|
||||||
|
initial_velocity_max = 20.0
|
||||||
|
angle_min = 1.0
|
||||||
|
angle_max = 360.0
|
||||||
|
scale_amount_min = 0.6
|
||||||
|
scale_amount_max = 1.3
|
||||||
|
scale_amount_curve = SubResource("Curve_7skad")
|
||||||
|
color_ramp = SubResource("Gradient_khhnp")
|
617
scenes/spaceship.tscn
Normal file
617
scenes/spaceship.tscn
Normal file
|
@ -0,0 +1,617 @@
|
||||||
|
[gd_scene load_steps=60 format=3 uid="uid://4i2kop2nto56"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b0ky8bjwk3xp4" path="res://scenes/game_manager.tscn" id="1_a6e3b"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://fu50vlhoj4tc" path="res://scenes/crt.tscn" id="3_82t0k"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://gds4ywca08dr" path="res://scenes/text_typing.tscn" id="3_enu1t"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bfuksp220ejmv" path="res://sprites/background.png" id="3_gecr6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://hwdnd10qvxn4" path="res://sprites/fondo general.png" id="3_iqnac"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/shake.gd" id="3_ogixi"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b02f0labhmgac" path="res://sprites/fx/estrellita_cutre.png" id="4_aaugx"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://r1vlkamrdvut" path="res://sprites/ondas.png" id="4_ugm7x"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://gh06fhvhmn35" path="res://sprites/retrato.png" id="5_8rmq8"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/game_flow.gd" id="6_8btdw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://4abm8qv3y12q" path="res://sprites/motor izquierdo.png" id="6_hoqpc"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bmwvo4wau13e8" path="res://sprites/motor derecho.png" id="7_mflr1"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/engines.gd" id="7_mwk5j"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cd7ebcxsui4c3" path="res://sprites/ondas1.png" id="7_plbq2"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d35eui04v3k80" path="res://sprites/ondas2.png" id="8_8nqun"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c3s7ahkssti82" path="res://sprites/luz 4.png" id="8_mlnnv"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/lights.gd" id="9_72l8n"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://3jt08tccjv7p" path="res://sprites/luz 3.png" id="9_bpqdk"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d33s6pef40flk" path="res://sprites/luz 2.png" id="10_5e241"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bn160j1ao7da5" path="res://sprites/luz 1.png" id="11_ftija"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d0fbphqlv1pcp" path="res://sprites/cara tieso.png" id="12_pgcgj"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://hjwhjwfpabnj" path="res://sprites/cara panico.png" id="13_tnoyt"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/light_face.gd" id="14_5samn"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c5p8vhabiwx3d" path="res://sprites/cara feliz.png" id="14_g7lfk"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cymf1kthfn0am" path="res://sprites/altavoz encendido.png" id="15_ymy1l"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/speaker.gd" id="16_53e0o"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://chem1yo0ossu1" path="res://sprites/altavoz apagado.png" id="16_sgsed"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bbk7bwso0hlpp" path="res://audio/sfx/coche_choque.wav" id="17_uxtxy"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://tpf5bcnaugm8" path="res://audio/sfx/cucaracha.wav" id="18_2e634"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bilo0hq0hxfqx" path="res://audio/sfx/metal.wav" id="19_jjs05"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bibremy5etxpr" path="res://audio/sfx/le_fishe.wav" id="20_yv348"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/shadow.gd" id="21_86vaa"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dbq3yme5m8th8" path="res://sprites/retrato2.png" id="28_ax6da"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dtr13fgmo5i3n" path="res://sprites/retrato3.png" id="29_a1guj"]
|
||||||
|
[ext_resource type="Shader" path="res://shaders/vignette.gdshader" id="31_3ivd2"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/arduino_control/pulse_generator.gd" id="31_kyreg"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/vignette.gd" id="32_qlewj"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/effects/smoke.gd" id="36_0c4t4"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cfj7novxcpont" path="res://sprites/burbuja_Blur.png" id="36_7dbgh"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dfwqex0goxj5j" path="res://sprites/mascara.png" id="36_l7cj1"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dokkkq3u0tgmr" path="res://audio/music.wav" id="39_ecyg1"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://ddejj31me7x4m" path="res://audio/ingame/dinamo03.wav" id="40_swbqh"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/explosion_player.gd" id="43_4k1hy"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://d3gfdigg7qmkq" path="res://audio/ingame/explosion/bigboom-42826.mp3" id="44_r4e8v"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cx6c74xlim53n" path="res://audio/ingame/explosion/distant-explosion-47562.mp3" id="45_ojk1h"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dgntsonvvvwjn" path="res://audio/ingame/explosion/medium-explosion-40472.mp3" id="46_nvk6r"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cqkwp7ohpy4wt" path="res://audio/ingame/alarm/beep-warning-6387.mp3" id="47_ra8w3"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://gsr48kyou765" path="res://audio/ingame/alarm/red-alert_nuclear_buzzer-99741.mp3" id="48_3jpdp"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_hsrc7"]
|
||||||
|
resource_name = "game_flow"
|
||||||
|
length = 120.0
|
||||||
|
tracks/0/type = "method"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GameManager/AnimationPlayer")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(2, 7, 13, 16.1, 18.1, 24, 31, 34, 37.1, 42, 48, 49, 53, 56, 59, 62, 67, 68, 73, 79, 80, 82.9, 86, 91, 97, 101, 104.5, 106, 109, 114),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap1"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap2"
|
||||||
|
}, {
|
||||||
|
"args": [2],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap3"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [2],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap4"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap5"
|
||||||
|
}, {
|
||||||
|
"args": [3],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [6],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap6"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [6],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap7"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap8"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [2],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap9"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap10"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [4],
|
||||||
|
"method": &"distort"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"mishap11"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_5s_shake"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"end_game"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
tracks/1/type = "method"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ArduinoShake")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(),
|
||||||
|
"transitions": PackedFloat32Array(),
|
||||||
|
"values": []
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Spawner")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(6, 12.5, 18.3, 24.6, 32.1, 37.5, 45.2, 51.5, 59.5, 69.6, 78.3, 86.1, 95.5, 105.1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"spawn"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_86qm3"]
|
||||||
|
_data = {
|
||||||
|
"game_flow": SubResource("Animation_hsrc7")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_uyck0"]
|
||||||
|
resource_name = "RESET"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Camera2D:intensity")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("../CanvasLayer/Vignette:intensity")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_mq20l"]
|
||||||
|
resource_name = "shake 5s"
|
||||||
|
length = 5.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Camera2D:intensity")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 4.9, 5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 1.0, 0.0]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("../CanvasLayer/Vignette:intensity")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 4.9, 5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 1.5, 0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("../ArduinoShake")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(4.7),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [2],
|
||||||
|
"method": &"shakeController"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
tracks/3/type = "method"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("../sfx")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(1.8, 4.7),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_alarm"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_explosion"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_odc1g"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_uyck0"),
|
||||||
|
"shake 5s": SubResource("Animation_mq20l")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_pxncd"]
|
||||||
|
_data = [Vector2(0, 0.0395778), 0.0, 0.0, 0, 0, Vector2(1, 0.751319), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_sww5j"]
|
||||||
|
interpolation_mode = 2
|
||||||
|
offsets = PackedFloat32Array(0, 0.224638)
|
||||||
|
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_m4rwq"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("4_ugm7x")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("7_plbq2")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("8_8nqun")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 10.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7nj25"]
|
||||||
|
shader = ExtResource("31_3ivd2")
|
||||||
|
shader_parameter/inner_radius = 0.1
|
||||||
|
shader_parameter/outer_radius = 1.0
|
||||||
|
shader_parameter/vignette_strength = 0.0
|
||||||
|
shader_parameter/dither_strength = 0.03
|
||||||
|
shader_parameter/vignette_color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_lmmd8"]
|
||||||
|
max_value = 0.94
|
||||||
|
_data = [Vector2(0, 0.94), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_4x2qo"]
|
||||||
|
max_value = 0.94
|
||||||
|
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.129747, 0.459698), 0.0, 0.0, 0, 0, Vector2(0.211886, 0.330693), 0.0, 0.0, 0, 0, Vector2(0.344937, 0.664358), 0.0, 0.0, 0, 0, Vector2(0.490956, 0.567527), 0.0, 0.0, 0, 0, Vector2(0.741602, 0.935452), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 6
|
||||||
|
|
||||||
|
[node name="Spaceship" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="GameManager" parent="." node_paths=PackedStringArray("text_typer", "dinamo") instance=ExtResource("1_a6e3b")]
|
||||||
|
text_typer = NodePath("../TextTyping")
|
||||||
|
dinamo = NodePath("../Dinamo")
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="GameManager" node_paths=PackedStringArray("crt")]
|
||||||
|
root_node = NodePath("../..")
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_86qm3")
|
||||||
|
}
|
||||||
|
autoplay = "game_flow"
|
||||||
|
script = ExtResource("6_8btdw")
|
||||||
|
crt = NodePath("../../CanvasLayer/CRT")
|
||||||
|
|
||||||
|
[node name="VFX" type="AnimationPlayer" parent="GameManager"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_odc1g")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Sprites" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Space" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("3_gecr6")
|
||||||
|
|
||||||
|
[node name="CPUParticles2D" type="CPUParticles2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
amount = 200
|
||||||
|
lifetime = 20.0
|
||||||
|
preprocess = 100.0
|
||||||
|
texture = ExtResource("4_aaugx")
|
||||||
|
spread = 180.0
|
||||||
|
gravity = Vector2(0, 0)
|
||||||
|
initial_velocity_min = 25.0
|
||||||
|
initial_velocity_max = 50.0
|
||||||
|
angular_velocity_max = 180.0
|
||||||
|
linear_accel_min = 5.0
|
||||||
|
linear_accel_max = 5.0
|
||||||
|
angle_min = -180.0
|
||||||
|
angle_max = 180.0
|
||||||
|
scale_amount_min = 0.25
|
||||||
|
scale_amount_max = 0.5
|
||||||
|
scale_amount_curve = SubResource("Curve_pxncd")
|
||||||
|
color_ramp = SubResource("Gradient_sww5j")
|
||||||
|
|
||||||
|
[node name="Background" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("3_iqnac")
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprites"]
|
||||||
|
sprite_frames = SubResource("SpriteFrames_m4rwq")
|
||||||
|
autoplay = "default"
|
||||||
|
frame_progress = 0.604089
|
||||||
|
offset = Vector2(960, 540)
|
||||||
|
|
||||||
|
[node name="Retrato" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("5_8rmq8")
|
||||||
|
|
||||||
|
[node name="Motores" type="Node2D" parent="Sprites"]
|
||||||
|
script = ExtResource("7_mwk5j")
|
||||||
|
leftPowerSprites = Array[Texture2D]([null, ExtResource("6_hoqpc")])
|
||||||
|
rightPowerSprites = Array[Texture2D]([null, ExtResource("7_mflr1")])
|
||||||
|
transitionDelta = 1.0
|
||||||
|
|
||||||
|
[node name="MotorIzquierdo" type="Sprite2D" parent="Sprites/Motores"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("6_hoqpc")
|
||||||
|
|
||||||
|
[node name="MotorDerecho" type="Sprite2D" parent="Sprites/Motores"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("7_mflr1")
|
||||||
|
|
||||||
|
[node name="Luces" type="Node2D" parent="Sprites" node_paths=PackedStringArray("light1", "light2", "light3", "light4")]
|
||||||
|
script = ExtResource("9_72l8n")
|
||||||
|
light1 = NodePath("Luz1")
|
||||||
|
light2 = NodePath("Luz2")
|
||||||
|
light3 = NodePath("Luz3")
|
||||||
|
light4 = NodePath("Luz4")
|
||||||
|
|
||||||
|
[node name="Luz4" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("8_mlnnv")
|
||||||
|
|
||||||
|
[node name="Luz3" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("9_bpqdk")
|
||||||
|
|
||||||
|
[node name="Luz2" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("10_5e241")
|
||||||
|
|
||||||
|
[node name="Luz1" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("11_ftija")
|
||||||
|
|
||||||
|
[node name="Cara" type="Node2D" parent="Sprites" node_paths=PackedStringArray("game_manager")]
|
||||||
|
script = ExtResource("14_5samn")
|
||||||
|
game_manager = NodePath("../../GameManager")
|
||||||
|
|
||||||
|
[node name="CaraTieso" type="Sprite2D" parent="Sprites/Cara"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("12_pgcgj")
|
||||||
|
|
||||||
|
[node name="CaraPanico" type="Sprite2D" parent="Sprites/Cara"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("13_tnoyt")
|
||||||
|
|
||||||
|
[node name="CaraFeliz" type="Sprite2D" parent="Sprites/Cara"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("14_g7lfk")
|
||||||
|
|
||||||
|
[node name="Altavoz" type="Node2D" parent="Sprites" node_paths=PackedStringArray("enabled_speaker", "disabled_speaker")]
|
||||||
|
script = ExtResource("16_53e0o")
|
||||||
|
sound_sources = Array[AudioStream]([ExtResource("17_uxtxy"), ExtResource("18_2e634"), ExtResource("19_jjs05"), ExtResource("20_yv348")])
|
||||||
|
enabled_speaker = NodePath("AltavozEncendido")
|
||||||
|
disabled_speaker = NodePath("AltavozApagado")
|
||||||
|
|
||||||
|
[node name="AltavozEncendido" type="Sprite2D" parent="Sprites/Altavoz"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("15_ymy1l")
|
||||||
|
|
||||||
|
[node name="AltavozApagado" type="Sprite2D" parent="Sprites/Altavoz"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("16_sgsed")
|
||||||
|
|
||||||
|
[node name="Timer" type="Timer" parent="Sprites/Altavoz"]
|
||||||
|
|
||||||
|
[node name="AudioPlayer" type="AudioStreamPlayer" parent="Sprites/Altavoz"]
|
||||||
|
|
||||||
|
[node name="TextTyping" parent="." node_paths=PackedStringArray("imageField") instance=ExtResource("3_enu1t")]
|
||||||
|
offset_right = 1920.0
|
||||||
|
offset_bottom = 1080.0
|
||||||
|
imageField = NodePath("../Sprites/Retrato")
|
||||||
|
characterPool = Array[Texture2D]([ExtResource("28_ax6da"), ExtResource("29_a1guj"), ExtResource("5_8rmq8")])
|
||||||
|
|
||||||
|
[node name="BurbujaBlur" type="Sprite2D" parent="TextTyping"]
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
position = Vector2(962, 708)
|
||||||
|
texture = ExtResource("36_7dbgh")
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
offset = Vector2(960, 540)
|
||||||
|
ignore_rotation = false
|
||||||
|
position_smoothing_enabled = true
|
||||||
|
position_smoothing_speed = 50.0
|
||||||
|
rotation_smoothing_enabled = true
|
||||||
|
script = ExtResource("3_ogixi")
|
||||||
|
randomStrength = 15.0
|
||||||
|
|
||||||
|
[node name="ArduinoShake" type="Node" parent="." node_paths=PackedStringArray("colorRect")]
|
||||||
|
script = ExtResource("31_kyreg")
|
||||||
|
pulseInterval = 0.05
|
||||||
|
colorRect = NodePath("../CanvasLayer/Flash")
|
||||||
|
|
||||||
|
[node name="Spawner" type="Node2D" parent="." node_paths=PackedStringArray("positions")]
|
||||||
|
script = ExtResource("36_0c4t4")
|
||||||
|
positions = [NodePath("Pos"), NodePath("Pos2"), NodePath("Pos3"), NodePath("Pos4"), NodePath("Pos5"), NodePath("Pos6"), NodePath("Pos7"), NodePath("Pos8"), NodePath("Pos9"), NodePath("Pos10"), NodePath("Pos11"), NodePath("Pos12"), NodePath("Pos13")]
|
||||||
|
|
||||||
|
[node name="Pos" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(276, 975)
|
||||||
|
|
||||||
|
[node name="Pos2" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(466, 705)
|
||||||
|
|
||||||
|
[node name="Pos3" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1517, 584)
|
||||||
|
|
||||||
|
[node name="Pos4" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1441, 819)
|
||||||
|
|
||||||
|
[node name="Pos5" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1844, 524)
|
||||||
|
|
||||||
|
[node name="Pos6" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(647, 311)
|
||||||
|
|
||||||
|
[node name="Pos7" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(307, 267)
|
||||||
|
|
||||||
|
[node name="Pos8" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1199, 423)
|
||||||
|
|
||||||
|
[node name="Pos9" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1070, 879)
|
||||||
|
|
||||||
|
[node name="Pos10" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(591, 932)
|
||||||
|
|
||||||
|
[node name="Pos11" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1831, 972)
|
||||||
|
|
||||||
|
[node name="Pos12" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(952, 423)
|
||||||
|
|
||||||
|
[node name="Pos13" type="Marker2D" parent="Spawner"]
|
||||||
|
position = Vector2(1612, 181)
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="Vignette" type="ColorRect" parent="CanvasLayer"]
|
||||||
|
material = SubResource("ShaderMaterial_7nj25")
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("32_qlewj")
|
||||||
|
|
||||||
|
[node name="MascaraSombra" type="Sprite2D" parent="CanvasLayer" node_paths=PackedStringArray("bubbleMask")]
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("36_l7cj1")
|
||||||
|
script = ExtResource("21_86vaa")
|
||||||
|
powerOnCurve = SubResource("Curve_lmmd8")
|
||||||
|
shutDownCurve = SubResource("Curve_4x2qo")
|
||||||
|
duration = 4.0
|
||||||
|
bubbleMask = NodePath("../../TextTyping/BurbujaBlur")
|
||||||
|
|
||||||
|
[node name="Flash" type="ColorRect" parent="CanvasLayer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(1, 1, 1, 0)
|
||||||
|
|
||||||
|
[node name="CRT" parent="CanvasLayer" instance=ExtResource("3_82t0k")]
|
||||||
|
|
||||||
|
[node name="Music" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource("39_ecyg1")
|
||||||
|
volume_db = 15.0
|
||||||
|
autoplay = true
|
||||||
|
|
||||||
|
[node name="Dinamo" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource("40_swbqh")
|
||||||
|
volume_db = -80.0
|
||||||
|
autoplay = true
|
||||||
|
|
||||||
|
[node name="sfx" type="Node" parent="."]
|
||||||
|
script = ExtResource("43_4k1hy")
|
||||||
|
explosions = Array[AudioStream]([ExtResource("44_r4e8v"), ExtResource("45_ojk1h"), ExtResource("46_nvk6r")])
|
||||||
|
alarms = Array[AudioStream]([ExtResource("47_ra8w3"), ExtResource("48_3jpdp")])
|
||||||
|
|
||||||
|
[connection signal="event_complete" from="GameManager" to="TextTyping" method="_on_event_complete"]
|
||||||
|
[connection signal="event_fail" from="GameManager" to="TextTyping" method="_on_event_fail"]
|
||||||
|
[connection signal="left_engine_off" from="GameManager" to="Sprites/Motores" method="_on_left_engine_off"]
|
||||||
|
[connection signal="left_engine_on" from="GameManager" to="Sprites/Motores" method="_on_left_engine_on"]
|
||||||
|
[connection signal="lights_in" from="GameManager" to="CanvasLayer/MascaraSombra" method="_on_lights_in"]
|
||||||
|
[connection signal="lights_out" from="GameManager" to="Sprites/Cara" method="_on_lights_out"]
|
||||||
|
[connection signal="lights_out" from="GameManager" to="CanvasLayer/MascaraSombra" method="_on_lights_out"]
|
||||||
|
[connection signal="right_engine_off" from="GameManager" to="Sprites/Motores" method="_on_right_engine_off"]
|
||||||
|
[connection signal="right_engine_on" from="GameManager" to="Sprites/Motores" method="_on_right_engine_on"]
|
||||||
|
[connection signal="timeout" from="Sprites/Altavoz/Timer" to="Sprites/Altavoz" method="_on_timer_timeout"]
|
33
scenes/text_typing.tscn
Normal file
33
scenes/text_typing.tscn
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[gd_scene load_steps=5 format=3 uid="uid://gds4ywca08dr"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/text_typing/typer.gd" id="1_4ddj7"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bxs6vawsjx4oc" path="res://sprites/burbuja_conversacion.png" id="2_bbyv7"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bcmhn2w0xhvog" path="res://audio/ingame/voicy02.wav" id="2_l8odf"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://dpsmqkos4x6b5" path="res://font/DMSerifDisplay-Regular.ttf" id="4_gdw61"]
|
||||||
|
|
||||||
|
[node name="TextTyping" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_4ddj7")
|
||||||
|
sound = ExtResource("2_l8odf")
|
||||||
|
|
||||||
|
[node name="BurbujaConversacion" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(960, 706)
|
||||||
|
texture = ExtResource("2_bbyv7")
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 482.0
|
||||||
|
offset_top = 638.0
|
||||||
|
offset_right = 1434.0
|
||||||
|
offset_bottom = 768.0
|
||||||
|
theme_override_colors/default_color = Color(0, 0, 0, 1)
|
||||||
|
theme_override_fonts/normal_font = ExtResource("4_gdw61")
|
||||||
|
theme_override_font_sizes/normal_font_size = 40
|
||||||
|
text = "Holaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||||
|
scroll_active = false
|
||||||
|
visible_characters_behavior = 1
|
142
scenes/titile.tscn
Normal file
142
scenes/titile.tscn
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
[gd_scene load_steps=23 format=3 uid="uid://rk208opb7h0v"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bfuksp220ejmv" path="res://sprites/background.png" id="1_6hpwd"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/title.gd" id="1_wwia3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b02f0labhmgac" path="res://sprites/fx/estrellita_cutre.png" id="2_p3bku"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://hwdnd10qvxn4" path="res://sprites/fondo general.png" id="3_fejje"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://r1vlkamrdvut" path="res://sprites/ondas.png" id="4_2ux8k"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cd7ebcxsui4c3" path="res://sprites/ondas1.png" id="5_sou7u"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d35eui04v3k80" path="res://sprites/ondas2.png" id="6_7re5q"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://gh06fhvhmn35" path="res://sprites/retrato.png" id="7_qgp2e"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://4abm8qv3y12q" path="res://sprites/motor izquierdo.png" id="9_kkpmb"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bmwvo4wau13e8" path="res://sprites/motor derecho.png" id="10_xbh3r"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c3s7ahkssti82" path="res://sprites/luz 4.png" id="12_uwk8x"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://3jt08tccjv7p" path="res://sprites/luz 3.png" id="13_dcmtd"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d33s6pef40flk" path="res://sprites/luz 2.png" id="14_2jdao"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bn160j1ao7da5" path="res://sprites/luz 1.png" id="15_5mu8h"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://def0yc5mp8ocq" path="res://sprites/Logo_Astromovida.png" id="18_rkg3h"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c5p8vhabiwx3d" path="res://sprites/cara feliz.png" id="19_3bawn"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://l7fftjlr2sqo" path="res://sprites/Aporrea_algo_para_empezar.png" id="19_41ppq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://chem1yo0ossu1" path="res://sprites/altavoz apagado.png" id="26_57pr4"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://fu50vlhoj4tc" path="res://scenes/crt.tscn" id="29_2setv"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_pxncd"]
|
||||||
|
_data = [Vector2(0, 0.0395778), 0.0, 0.0, 0, 0, Vector2(1, 0.751319), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_sww5j"]
|
||||||
|
interpolation_mode = 2
|
||||||
|
offsets = PackedFloat32Array(0, 0.224638)
|
||||||
|
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_m4rwq"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("4_2ux8k")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("5_sou7u")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("6_7re5q")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 10.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[node name="Title" type="Node2D"]
|
||||||
|
script = ExtResource("1_wwia3")
|
||||||
|
|
||||||
|
[node name="Sprites" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Space" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("1_6hpwd")
|
||||||
|
|
||||||
|
[node name="CPUParticles2D" type="CPUParticles2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
amount = 200
|
||||||
|
lifetime = 20.0
|
||||||
|
preprocess = 100.0
|
||||||
|
texture = ExtResource("2_p3bku")
|
||||||
|
spread = 180.0
|
||||||
|
gravity = Vector2(0, 0)
|
||||||
|
initial_velocity_min = 25.0
|
||||||
|
initial_velocity_max = 50.0
|
||||||
|
angular_velocity_max = 180.0
|
||||||
|
linear_accel_min = 5.0
|
||||||
|
linear_accel_max = 5.0
|
||||||
|
angle_min = -180.0
|
||||||
|
angle_max = 180.0
|
||||||
|
scale_amount_min = 0.25
|
||||||
|
scale_amount_max = 0.5
|
||||||
|
scale_amount_curve = SubResource("Curve_pxncd")
|
||||||
|
color_ramp = SubResource("Gradient_sww5j")
|
||||||
|
|
||||||
|
[node name="Background" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("3_fejje")
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprites"]
|
||||||
|
sprite_frames = SubResource("SpriteFrames_m4rwq")
|
||||||
|
autoplay = "default"
|
||||||
|
frame_progress = 0.604089
|
||||||
|
offset = Vector2(960, 540)
|
||||||
|
|
||||||
|
[node name="Retrato" type="Sprite2D" parent="Sprites"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("7_qgp2e")
|
||||||
|
|
||||||
|
[node name="Motores" type="Node2D" parent="Sprites"]
|
||||||
|
|
||||||
|
[node name="MotorIzquierdo" type="Sprite2D" parent="Sprites/Motores"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("9_kkpmb")
|
||||||
|
|
||||||
|
[node name="MotorDerecho" type="Sprite2D" parent="Sprites/Motores"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("10_xbh3r")
|
||||||
|
|
||||||
|
[node name="Luces" type="Node2D" parent="Sprites"]
|
||||||
|
|
||||||
|
[node name="Luz4" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("12_uwk8x")
|
||||||
|
|
||||||
|
[node name="Luz3" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("13_dcmtd")
|
||||||
|
|
||||||
|
[node name="Luz2" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("14_2jdao")
|
||||||
|
|
||||||
|
[node name="Luz1" type="Sprite2D" parent="Sprites/Luces"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("15_5mu8h")
|
||||||
|
|
||||||
|
[node name="Cara" type="Node2D" parent="Sprites"]
|
||||||
|
|
||||||
|
[node name="CaraFeliz" type="Sprite2D" parent="Sprites/Cara"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("19_3bawn")
|
||||||
|
|
||||||
|
[node name="Altavoz" type="Node2D" parent="Sprites"]
|
||||||
|
|
||||||
|
[node name="AltavozApagado" type="Sprite2D" parent="Sprites/Altavoz"]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
texture = ExtResource("26_57pr4")
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="CRT" parent="CanvasLayer" instance=ExtResource("29_2setv")]
|
||||||
|
|
||||||
|
[node name="LogoAstromovida" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(962, 416)
|
||||||
|
texture = ExtResource("18_rkg3h")
|
||||||
|
|
||||||
|
[node name="AporreaAlgoParaEmpezar" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(960, 644)
|
||||||
|
texture = ExtResource("19_41ppq")
|
6
scripts/action_data.gd
Normal file
6
scripts/action_data.gd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
class_name ActionData
|
||||||
|
extends Resource
|
||||||
|
|
||||||
|
@export var text: String
|
||||||
|
@export var actions: PackedStringArray
|
||||||
|
@export var duration: float
|
39
scripts/arduino_control/Vibration.cs
Normal file
39
scripts/arduino_control/Vibration.cs
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
using System;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace MalagaJam18;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class Vibration : Node {
|
||||||
|
private static SerialPort _serialPort;
|
||||||
|
private static bool _initialized;
|
||||||
|
|
||||||
|
public static void Init(string port) {
|
||||||
|
GD.Print(port);
|
||||||
|
try {
|
||||||
|
_serialPort = new SerialPort();
|
||||||
|
_serialPort.PortName = port;
|
||||||
|
_serialPort.BaudRate = 9600;
|
||||||
|
_serialPort.Open();
|
||||||
|
_initialized = true;
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
GD.PrintErr(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SendVibration() {
|
||||||
|
if (!_initialized || !_serialPort.IsOpen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_serialPort.WriteLine("#LED1ON");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UnSendVibration() {
|
||||||
|
if (!_initialized || !_serialPort.IsOpen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_serialPort.WriteLine("#LED1OF");
|
||||||
|
}
|
||||||
|
}
|
57
scripts/arduino_control/pulse_generator.gd
Normal file
57
scripts/arduino_control/pulse_generator.gd
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var comPort: String = "COM8"
|
||||||
|
|
||||||
|
var time: float
|
||||||
|
var pulseTime: float
|
||||||
|
|
||||||
|
# min ideal setup interval 0.05 and duration 0.03
|
||||||
|
@export_range(0, 0.5) var pulseInterval: float = 0.2
|
||||||
|
@export_range(0, 0.1) var pulseDuration: float = 0.03
|
||||||
|
|
||||||
|
@export var colorRect: ColorRect
|
||||||
|
|
||||||
|
var pendingPulses: float = 0
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
var arguments = {}
|
||||||
|
for argument in OS.get_cmdline_args():
|
||||||
|
if argument.find("=") > -1:
|
||||||
|
var key_value = argument.split("=")
|
||||||
|
arguments[key_value[0].lstrip("--")] = key_value[1]
|
||||||
|
else:
|
||||||
|
# Options without an argument will be present in the dictionary,
|
||||||
|
# with the value set to an empty string.
|
||||||
|
arguments[argument.lstrip("--")] = ""
|
||||||
|
|
||||||
|
var hasComPort = arguments.has("port")
|
||||||
|
if (hasComPort):
|
||||||
|
comPort = arguments["port"]
|
||||||
|
|
||||||
|
Vibration.Init(comPort)
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if (time > 0):
|
||||||
|
time -= delta
|
||||||
|
if (time <= 0):
|
||||||
|
Vibration.UnSendVibration()
|
||||||
|
|
||||||
|
if (pendingPulses > 0 and pulseTime > 0):
|
||||||
|
pulseTime -= delta
|
||||||
|
if (pulseTime <= 0):
|
||||||
|
_sendPulse(pendingPulses - 1)
|
||||||
|
|
||||||
|
|
||||||
|
func shakeController(ammount: int):
|
||||||
|
_sendPulse(ammount)
|
||||||
|
var tween = get_tree().create_tween()
|
||||||
|
tween.tween_property(colorRect, "color", Color(Color.WHITE, 1), 0.05)
|
||||||
|
tween.tween_property(colorRect, "color", Color(Color.WHITE, 0), 0.05)
|
||||||
|
|
||||||
|
|
||||||
|
func _sendPulse(ammount: int):
|
||||||
|
pendingPulses = ammount - 1
|
||||||
|
time = pulseDuration
|
||||||
|
pulseTime = pulseInterval
|
||||||
|
Vibration.SendVibration()
|
34
scripts/crt_controller.gd
Normal file
34
scripts/crt_controller.gd
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
extends Node
|
||||||
|
class_name CRT
|
||||||
|
|
||||||
|
@export var normal_filter: Control
|
||||||
|
@export var distortion_filter: Control
|
||||||
|
|
||||||
|
var clicksNeeded: int
|
||||||
|
var distortionEnabled: bool
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
normal_filter.visible = true
|
||||||
|
distortion_filter.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _process(_delta):
|
||||||
|
if distortionEnabled and Input.is_action_just_pressed("BTN_6"):
|
||||||
|
clicksNeeded -= 1
|
||||||
|
if clicksNeeded <= 0:
|
||||||
|
disable_distortion()
|
||||||
|
|
||||||
|
|
||||||
|
func enable_distortion(clicks: int):
|
||||||
|
normal_filter.visible = false
|
||||||
|
distortion_filter.visible = true
|
||||||
|
clicksNeeded = clicks
|
||||||
|
distortionEnabled = true
|
||||||
|
|
||||||
|
|
||||||
|
func disable_distortion():
|
||||||
|
normal_filter.visible = true
|
||||||
|
distortion_filter.visible = false
|
||||||
|
distortionEnabled = false
|
51
scripts/effects/engines.gd
Normal file
51
scripts/effects/engines.gd
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
@onready var leftEngine: Sprite2D = $MotorIzquierdo
|
||||||
|
@onready var rightEngine: Sprite2D = $MotorDerecho
|
||||||
|
|
||||||
|
var leftPowerLevel: float
|
||||||
|
var currentLeftPowerLevel: float
|
||||||
|
var rightPowerLevel: float
|
||||||
|
var currentRightPowerLevel: float
|
||||||
|
|
||||||
|
@export var leftPowerSprites: Array[Texture2D]
|
||||||
|
@export var rightPowerSprites: Array[Texture2D]
|
||||||
|
|
||||||
|
@export_range(0, 2) var transitionDelta: float
|
||||||
|
|
||||||
|
|
||||||
|
func _transition(curr: float, goal: float, delta: float) -> float:
|
||||||
|
return curr + (goal - curr) * transitionDelta * delta
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
currentLeftPowerLevel = _transition(currentLeftPowerLevel, leftPowerLevel, delta)
|
||||||
|
currentRightPowerLevel = _transition(currentRightPowerLevel, rightPowerLevel, delta)
|
||||||
|
|
||||||
|
if not leftPowerSprites.is_empty():
|
||||||
|
var index = roundf(currentLeftPowerLevel * leftPowerSprites.size())
|
||||||
|
index = clamp(index, 0, leftPowerSprites.size() - 1)
|
||||||
|
leftEngine.texture = leftPowerSprites[index]
|
||||||
|
if not rightPowerSprites.is_empty():
|
||||||
|
var index = roundf(currentRightPowerLevel * rightPowerSprites.size())
|
||||||
|
index = clamp(index, 0, rightPowerSprites.size() - 1)
|
||||||
|
rightEngine.texture = rightPowerSprites[index]
|
||||||
|
|
||||||
|
|
||||||
|
func _change_left_power_level(level: float):
|
||||||
|
leftPowerLevel = level
|
||||||
|
|
||||||
|
|
||||||
|
func _change_right_power_level(level: float):
|
||||||
|
rightPowerLevel = level
|
||||||
|
|
||||||
|
|
||||||
|
func _on_left_engine_off():
|
||||||
|
_change_left_power_level(0)
|
||||||
|
func _on_left_engine_on():
|
||||||
|
_change_left_power_level(1)
|
||||||
|
func _on_right_engine_off():
|
||||||
|
_change_right_power_level(0)
|
||||||
|
func _on_right_engine_on():
|
||||||
|
_change_right_power_level(1)
|
41
scripts/effects/light_face.gd
Normal file
41
scripts/effects/light_face.gd
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@onready var on: Sprite2D = $CaraFeliz
|
||||||
|
@onready var powerless: Sprite2D = $CaraTieso
|
||||||
|
@onready var off: Sprite2D = $CaraPanico
|
||||||
|
|
||||||
|
|
||||||
|
@export var game_manager: GameManager
|
||||||
|
var lights_out: bool
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if abs(game_manager.spinner_speed) > 0:
|
||||||
|
_on_face()
|
||||||
|
lights_out = false
|
||||||
|
elif not lights_out:
|
||||||
|
_powerless_face()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_lights_out():
|
||||||
|
lights_out = true
|
||||||
|
_off_face()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_face():
|
||||||
|
on.visible = true
|
||||||
|
powerless.visible = false
|
||||||
|
off.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _off_face():
|
||||||
|
on.visible = false
|
||||||
|
powerless.visible = false
|
||||||
|
off.visible = true
|
||||||
|
|
||||||
|
|
||||||
|
func _powerless_face():
|
||||||
|
on.visible = false
|
||||||
|
powerless.visible = true
|
||||||
|
off.visible = false
|
21
scripts/effects/lights.gd
Normal file
21
scripts/effects/lights.gd
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@export var light1: Sprite2D
|
||||||
|
@export var light2: Sprite2D
|
||||||
|
@export var light3: Sprite2D
|
||||||
|
@export var light4: Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
light1.visible = false
|
||||||
|
light2.visible = false
|
||||||
|
light3.visible = false
|
||||||
|
light4.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _process(_delta):
|
||||||
|
light1.visible = Input.is_action_pressed("BTN_1")
|
||||||
|
light2.visible = Input.is_action_pressed("BTN_2")
|
||||||
|
light3.visible = Input.is_action_pressed("BTN_3")
|
||||||
|
light4.visible = Input.is_action_pressed("BTN_4")
|
44
scripts/effects/shadow.gd
Normal file
44
scripts/effects/shadow.gd
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
@export var powerOnCurve: Curve
|
||||||
|
@export var shutDownCurve: Curve
|
||||||
|
var time: float
|
||||||
|
@export var duration: float
|
||||||
|
|
||||||
|
@export var bubbleMask: Sprite2D
|
||||||
|
|
||||||
|
var curve: Curve
|
||||||
|
var animating: bool = false
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if (not animating):
|
||||||
|
return
|
||||||
|
|
||||||
|
time += delta
|
||||||
|
var alpha = curve.sample(clamp(time / duration, 0, 1))
|
||||||
|
modulate = Color(Color.WHITE, alpha)
|
||||||
|
bubbleMask.modulate = Color(Color.WHITE, alpha)
|
||||||
|
if (time >= duration):
|
||||||
|
animating = false
|
||||||
|
|
||||||
|
|
||||||
|
func shut_down():
|
||||||
|
time = 0
|
||||||
|
curve = shutDownCurve
|
||||||
|
animating = true
|
||||||
|
|
||||||
|
|
||||||
|
func power_on():
|
||||||
|
time = 0
|
||||||
|
curve = powerOnCurve
|
||||||
|
animating = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_lights_out():
|
||||||
|
shut_down()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_lights_in():
|
||||||
|
power_on()
|
26
scripts/effects/shake.gd
Normal file
26
scripts/effects/shake.gd
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
extends Camera2D
|
||||||
|
|
||||||
|
@export var randomStrength: float = 30.0
|
||||||
|
@export var randomRotationStrength: float = 5.0
|
||||||
|
@export var shakeFade: float = 5.0
|
||||||
|
|
||||||
|
@export var intensity: float = 0.0
|
||||||
|
|
||||||
|
var rng = RandomNumberGenerator.new()
|
||||||
|
var shake_strength: float = 0.0
|
||||||
|
|
||||||
|
var initialPos: Vector2
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
initialPos = offset
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
offset = initialPos + randomOffset() * intensity
|
||||||
|
rotation = randomRotation() * intensity
|
||||||
|
|
||||||
|
func randomOffset() -> Vector2:
|
||||||
|
return Vector2(rng.randf_range(-randomStrength, randomStrength), rng.randf_range(-randomStrength, randomStrength))
|
||||||
|
|
||||||
|
func randomRotation() -> float:
|
||||||
|
return deg_to_rad(randf_range(-randomRotationStrength, randomRotationStrength))
|
14
scripts/effects/smoke.gd
Normal file
14
scripts/effects/smoke.gd
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@export var positions: Array[Node2D]
|
||||||
|
|
||||||
|
|
||||||
|
func spawn():
|
||||||
|
var pos: Node2D = positions.pick_random()
|
||||||
|
if not pos:
|
||||||
|
return
|
||||||
|
positions.erase(pos)
|
||||||
|
var scene = load("res://scenes/smoke_particles.tscn")
|
||||||
|
var scene_instance = scene.instantiate()
|
||||||
|
add_child(scene_instance)
|
||||||
|
scene_instance.global_position = pos.global_position
|
39
scripts/effects/speaker.gd
Normal file
39
scripts/effects/speaker.gd
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@export var sound_sources: Array[AudioStream]
|
||||||
|
|
||||||
|
@export var enabled_speaker: Sprite2D
|
||||||
|
@export var disabled_speaker: Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
_disable_speaker()
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if (Input.is_action_just_pressed("BTN_5")):
|
||||||
|
_play_random_sound()
|
||||||
|
|
||||||
|
|
||||||
|
func _play_random_sound():
|
||||||
|
var stream = sound_sources.pick_random()
|
||||||
|
var length = stream.get_length()
|
||||||
|
SoundManager.play_sound(stream)
|
||||||
|
|
||||||
|
_enable_speaker()
|
||||||
|
if ($Timer.time_left < length):
|
||||||
|
$Timer.start(length)
|
||||||
|
|
||||||
|
func _enable_speaker():
|
||||||
|
enabled_speaker.visible = true
|
||||||
|
disabled_speaker.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _disable_speaker():
|
||||||
|
enabled_speaker.visible = false
|
||||||
|
disabled_speaker.visible = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_timer_timeout():
|
||||||
|
_disable_speaker()
|
15
scripts/effects/vignette.gd
Normal file
15
scripts/effects/vignette.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends ColorRect
|
||||||
|
|
||||||
|
@export var intensity: float
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
var tween = get_tree().create_tween()
|
||||||
|
tween.tween_method(_set_vignette, 0.0, 1.5, 0.5).set_trans(Tween.TRANS_LINEAR)
|
||||||
|
tween.tween_method(_set_vignette, 1.5, 0.0, 0.5).set_trans(Tween.TRANS_LINEAR).set_delay(0.5)
|
||||||
|
tween.set_loops()
|
||||||
|
|
||||||
|
func _set_vignette(value: float):
|
||||||
|
var mat: ShaderMaterial = material
|
||||||
|
mat.set_shader_parameter("vignette_strength", value * intensity)
|
16
scripts/end_card.gd
Normal file
16
scripts/end_card.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if Input.is_action_just_pressed("BTN_1") or \
|
||||||
|
Input.is_action_just_pressed("BTN_2") or \
|
||||||
|
Input.is_action_just_pressed("BTN_3") or \
|
||||||
|
Input.is_action_just_pressed("BTN_4") or \
|
||||||
|
Input.is_action_just_pressed("BTN_5") or \
|
||||||
|
Input.is_action_just_pressed("BTN_6"):
|
||||||
|
get_tree().change_scene_to_file("res://scenes/titile.tscn")
|
16
scripts/event.gd
Normal file
16
scripts/event.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
signal event_completed
|
||||||
|
signal event_failed
|
||||||
|
|
||||||
|
# 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):
|
||||||
|
if (Input.is_action_just_pressed("ui_accept")):
|
||||||
|
event_completed.emit()
|
||||||
|
if (Input.is_action_just_pressed("ui_cancel")):
|
||||||
|
event_failed.emit()
|
4
scripts/events/dialog_event_01.gd
Normal file
4
scripts/events/dialog_event_01.gd
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var dialogue = "hewwo... hewwo?" # Text to display.
|
||||||
|
var time = 8 # How long it should be on screen.
|
16
scripts/events/event_01.gd
Normal file
16
scripts/events/event_01.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = []
|
||||||
|
var press = ["BTN_1"]
|
||||||
|
var shake = [] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false]
|
||||||
|
var shake_ok = [] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Pulsa el botón de panico. Y mantén la dinamo girando o te quedaras sin energia."
|
||||||
|
var time = 10
|
16
scripts/events/event_02.gd
Normal file
16
scripts/events/event_02.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = ["LJ_UP"]
|
||||||
|
var press = ["BTN_3"]
|
||||||
|
var shake = [] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [false] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false]
|
||||||
|
var shake_ok = [] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Ahora mantén la palanca izquierda subida y pulsa el botón de peligro!"
|
||||||
|
var time = 10
|
15
scripts/events/event_03.gd
Normal file
15
scripts/events/event_03.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var hold = []
|
||||||
|
var press = ["BTN_1", "BTN_2", "BTN_3", "BTN_4"]
|
||||||
|
var shake = ["LJ_UP", "LJ_DOWN", "LJ_LEFT", "LJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false, false, false, false]
|
||||||
|
var shake_ok = [12] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Pulsa los cuatro botones y menea el motor izquierdo!"
|
||||||
|
var time = 12
|
15
scripts/events/event_04.gd
Normal file
15
scripts/events/event_04.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var hold = []
|
||||||
|
var press = []
|
||||||
|
var shake = ["RJ_UP", "RJ_DOWN", "RJ_LEFT", "RJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = []
|
||||||
|
var shake_ok = [20] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Menea tambien el motor derecho!"
|
||||||
|
var time = 10
|
15
scripts/events/event_05.gd
Normal file
15
scripts/events/event_05.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var hold = []
|
||||||
|
var press = ["BTN_3"]
|
||||||
|
var shake = [] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false]
|
||||||
|
var shake_ok = [] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Vale. Ahora pulsa el boton de crisis... el izquierdo creo. No, perdon, prueba con el derecho."
|
||||||
|
var time = 10
|
16
scripts/events/event_06.gd
Normal file
16
scripts/events/event_06.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = ["LJ_UP", "RJ_UP"]
|
||||||
|
var press = ["BTN_2", "BTN_3"]
|
||||||
|
var shake = [] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [false, false] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false, false]
|
||||||
|
var shake_ok = [] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Ahora manten las dos palancas hacia arriba y pulsa los botones de crisis!"
|
||||||
|
var time = 8
|
16
scripts/events/event_07.gd
Normal file
16
scripts/events/event_07.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = ["LJ_LEFT", "RJ_RIGHT"]
|
||||||
|
var press = ["BTN_1"]
|
||||||
|
var shake = [] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [false, false] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false]
|
||||||
|
var shake_ok = [] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Mueve las palancas a la izquierda y derecha, y pulsa el botón de panico!"
|
||||||
|
var time = 10
|
16
scripts/events/event_08.gd
Normal file
16
scripts/events/event_08.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = []
|
||||||
|
var press = []
|
||||||
|
var shake = ["RJ_UP", "RJ_DOWN", "RJ_LEFT", "RJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = []
|
||||||
|
var shake_ok = [999] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Menea el motor derecho, RAPIDO!"
|
||||||
|
var time = 6
|
16
scripts/events/event_09.gd
Normal file
16
scripts/events/event_09.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
var hold = ["LJ_UP"]
|
||||||
|
var press = ["BTN_1"]
|
||||||
|
var shake = ["RJ_UP", "RJ_DOWN", "RJ_LEFT", "RJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = [] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [false, false] # For hold and press true is considered a success.
|
||||||
|
var press_ok = [false]
|
||||||
|
var shake_ok = [12] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Mantén la palanca izquierda arriba, menea la derecha y pulsa el boton de panico!"
|
||||||
|
var time = 10
|
15
scripts/events/event_10.gd
Normal file
15
scripts/events/event_10.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
# Inputs
|
||||||
|
var hold = []
|
||||||
|
var press = []
|
||||||
|
var shake = ["LJ_UP", "LJ_DOWN", "LJ_LEFT", "LJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = ["RJ_UP", "RJ_DOWN", "RJ_LEFT", "RJ_RIGHT"] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = []
|
||||||
|
var shake_ok = [999, 999] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "Dale a los dos motores, se nos estan rompiendo!!"
|
||||||
|
var time = 8
|
15
scripts/events/event_11.gd
Normal file
15
scripts/events/event_11.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
# Inputs
|
||||||
|
var hold = []
|
||||||
|
var press = []
|
||||||
|
var shake = ["LJ_UP", "LJ_DOWN", "LJ_LEFT", "LJ_RIGHT"] # Needs to be all 4 axis of a stick.
|
||||||
|
var shake_b = ["RJ_UP", "RJ_DOWN", "RJ_LEFT", "RJ_RIGHT"] # Fill if a second stick is necessary, uses second pos in shake_ok array.
|
||||||
|
|
||||||
|
# Goals
|
||||||
|
var hold_ok = [] # For hold and press true is considered a success.
|
||||||
|
var press_ok = []
|
||||||
|
var shake_ok = [999, 999] # For shake any value below zero is considered a success.
|
||||||
|
|
||||||
|
#Other
|
||||||
|
var dialogue = "PULSALO TODO MALDITA SEA, TODO!!"
|
||||||
|
var time = 8
|
13
scripts/explosion_player.gd
Normal file
13
scripts/explosion_player.gd
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
@export var explosions: Array[AudioStream]
|
||||||
|
@export var alarms: Array[AudioStream]
|
||||||
|
|
||||||
|
|
||||||
|
func play_explosion():
|
||||||
|
var sound = explosions.pick_random()
|
||||||
|
SoundManager.play_sound(sound)
|
||||||
|
|
||||||
|
func play_alarm():
|
||||||
|
var sound = alarms.pick_random()
|
||||||
|
SoundManager.play_sound(sound)
|
72
scripts/game_flow.gd
Normal file
72
scripts/game_flow.gd
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
@onready var manager = $".."
|
||||||
|
@onready var vfx = $"../VFX"
|
||||||
|
@onready var end_card = load("res://scenes/end_card.tscn")
|
||||||
|
@export var crt: CRT
|
||||||
|
|
||||||
|
func mishap1():
|
||||||
|
var inst = manager.res_ev01.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 1 triggered")
|
||||||
|
|
||||||
|
func mishap2():
|
||||||
|
var inst = manager.res_ev02.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 2 triggered")
|
||||||
|
|
||||||
|
func mishap3():
|
||||||
|
var inst = manager.res_ev03.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 3 triggered")
|
||||||
|
|
||||||
|
func mishap4():
|
||||||
|
var inst = manager.res_ev04.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 4 triggered")
|
||||||
|
|
||||||
|
func mishap5():
|
||||||
|
var inst = manager.res_ev05.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 5 triggered")
|
||||||
|
|
||||||
|
func mishap6():
|
||||||
|
var inst = manager.res_ev06.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 6 triggered")
|
||||||
|
|
||||||
|
func mishap7():
|
||||||
|
var inst = manager.res_ev07.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 7 triggered")
|
||||||
|
|
||||||
|
func mishap8():
|
||||||
|
var inst = manager.res_ev08.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 8 triggered")
|
||||||
|
|
||||||
|
func mishap9():
|
||||||
|
var inst = manager.res_ev09.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 9 triggered")
|
||||||
|
|
||||||
|
func mishap10():
|
||||||
|
var inst = manager.res_ev10.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 10 triggered")
|
||||||
|
|
||||||
|
func mishap11():
|
||||||
|
var inst = manager.res_ev11.instantiate()
|
||||||
|
manager.insert_event(inst)
|
||||||
|
print("mishap 11 triggered")
|
||||||
|
|
||||||
|
func play_5s_shake():
|
||||||
|
if manager.event_running:
|
||||||
|
vfx.play("shake 5s")
|
||||||
|
|
||||||
|
func distort(clicks: int):
|
||||||
|
crt.enable_distortion(clicks)
|
||||||
|
|
||||||
|
func end_game():
|
||||||
|
print("Called end game.")
|
||||||
|
get_tree().change_scene_to_packed(end_card)
|
188
scripts/game_manager.gd
Normal file
188
scripts/game_manager.gd
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
extends Node
|
||||||
|
class_name GameManager
|
||||||
|
|
||||||
|
@onready var grace_period: Timer = $GracePeriod
|
||||||
|
@onready var event_timer: Timer = $EventTimer
|
||||||
|
@onready var vfx = $VFX
|
||||||
|
@onready var res_ev01 = load("res://events/event_01.tscn")
|
||||||
|
@onready var res_ev02 = load("res://events/event_02.tscn")
|
||||||
|
@onready var res_ev03 = load("res://events/event_03.tscn")
|
||||||
|
@onready var res_ev04 = load("res://events/event_04.tscn")
|
||||||
|
@onready var res_ev05 = load("res://events/event_05.tscn")
|
||||||
|
@onready var res_ev06 = load("res://events/event_06.tscn")
|
||||||
|
@onready var res_ev07 = load("res://events/event_07.tscn")
|
||||||
|
@onready var res_ev08 = load("res://events/event_08.tscn")
|
||||||
|
@onready var res_ev09 = load("res://events/event_09.tscn")
|
||||||
|
@onready var res_ev10 = load("res://events/event_10.tscn")
|
||||||
|
@onready var res_ev11 = load("res://events/event_11.tscn")
|
||||||
|
@export var spinner_deadzone: float = 15 # Bad placeholder value, PLEASE TEST & FINETUNE!
|
||||||
|
@export var text_typer: TextTyper
|
||||||
|
|
||||||
|
@export var dinamo: AudioStreamPlayer
|
||||||
|
|
||||||
|
var current_event: Node = null
|
||||||
|
var event_running: bool = false
|
||||||
|
var spinner_mechanic: bool = true
|
||||||
|
var dead_spinner: bool = false
|
||||||
|
var no_energy: bool = false
|
||||||
|
var spinner_speed: float = 0
|
||||||
|
var time_since_last_motion: float = 0
|
||||||
|
|
||||||
|
signal event_complete
|
||||||
|
signal event_fail
|
||||||
|
signal lights_out
|
||||||
|
signal lights_in
|
||||||
|
signal left_engine_on
|
||||||
|
signal left_engine_off
|
||||||
|
signal right_engine_on
|
||||||
|
signal right_engine_off
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
time_since_last_motion += delta
|
||||||
|
if (abs(spinner_speed) > 0 and time_since_last_motion >= .2):
|
||||||
|
spinner_speed = 0
|
||||||
|
#print(spinner_speed)
|
||||||
|
if event_running:
|
||||||
|
event_process()
|
||||||
|
verify_event()
|
||||||
|
if (abs(spinner_speed) < spinner_deadzone and !dead_spinner):
|
||||||
|
grace_period.start()
|
||||||
|
if dinamo:
|
||||||
|
dinamo.volume_db = -80
|
||||||
|
dead_spinner = true
|
||||||
|
if (abs(spinner_speed) >= spinner_deadzone and dead_spinner):
|
||||||
|
grace_period.stop()
|
||||||
|
dead_spinner = false
|
||||||
|
if dinamo:
|
||||||
|
dinamo.volume_db = -10
|
||||||
|
if (no_energy):
|
||||||
|
lights_in.emit()
|
||||||
|
no_energy = false
|
||||||
|
feedbacks()
|
||||||
|
# DEBUG STUFF - REMOVE FOR RELEASE
|
||||||
|
if Input.is_action_just_pressed("DEBUG_Lock_Cursor"):
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
if Input.is_action_just_pressed("DEBUG_Unlock_Cursor"):
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if event is InputEventMouseMotion:
|
||||||
|
spinner_speed = event.get_relative().x
|
||||||
|
#print(spinner_speed)
|
||||||
|
time_since_last_motion = 0
|
||||||
|
|
||||||
|
func feedbacks():
|
||||||
|
if Input.is_action_just_pressed("LJ_UP") or Input.is_action_just_pressed("LJ_DOWN") \
|
||||||
|
or Input.is_action_just_pressed("LJ_LEFT") or Input.is_action_just_pressed("LJ_RIGHT"):
|
||||||
|
left_engine_on.emit()
|
||||||
|
print("left engine on")
|
||||||
|
if Input.is_action_just_pressed("RJ_UP") or Input.is_action_just_pressed("RJ_DOWN") \
|
||||||
|
or Input.is_action_just_pressed("RJ_LEFT") or Input.is_action_just_pressed("RJ_RIGHT"):
|
||||||
|
right_engine_on.emit()
|
||||||
|
print("right engine on")
|
||||||
|
if Input.is_action_just_released("LJ_UP") or Input.is_action_just_released("LJ_DOWN") \
|
||||||
|
or Input.is_action_just_released("LJ_LEFT") or Input.is_action_just_released("LJ_RIGHT"):
|
||||||
|
left_engine_off.emit()
|
||||||
|
print("left engine off")
|
||||||
|
if Input.is_action_just_released("RJ_UP") or Input.is_action_just_released("RJ_DOWN") \
|
||||||
|
or Input.is_action_just_released("RJ_LEFT") or Input.is_action_just_released("RJ_RIGHT"):
|
||||||
|
right_engine_off.emit()
|
||||||
|
print("right engine off")
|
||||||
|
|
||||||
|
# Change the current event to "n_event".
|
||||||
|
func insert_event(n_event: Node):
|
||||||
|
current_event = n_event
|
||||||
|
event_timer.wait_time = current_event.time
|
||||||
|
event_running = true
|
||||||
|
event_timer.start()
|
||||||
|
print("time: " + str(event_timer.time_left))
|
||||||
|
print(n_event.hold)
|
||||||
|
print(n_event.press)
|
||||||
|
print(n_event.shake)
|
||||||
|
|
||||||
|
if text_typer:
|
||||||
|
text_typer.animate_text_in(n_event.dialogue)
|
||||||
|
|
||||||
|
func check_if_held():
|
||||||
|
if current_event.hold.is_empty():
|
||||||
|
return true
|
||||||
|
var hold_ok_target = current_event.hold_ok.size()
|
||||||
|
var hold_ok_current = 0
|
||||||
|
for check in current_event.hold_ok:
|
||||||
|
if check == true:
|
||||||
|
hold_ok_current += 1
|
||||||
|
if hold_ok_current == hold_ok_target:
|
||||||
|
return true
|
||||||
|
else:
|
||||||
|
return false
|
||||||
|
|
||||||
|
func verify_event():
|
||||||
|
# Goals and progress.
|
||||||
|
var press_ok_target = current_event.press_ok.size()
|
||||||
|
var hold_ok_target = current_event.hold_ok.size()
|
||||||
|
var shake_ok_target = current_event.shake_ok.size()
|
||||||
|
var press_ok_current = 0
|
||||||
|
var hold_ok_current = 0
|
||||||
|
var shake_ok_current = 0
|
||||||
|
# Verify arrays only if they're used.
|
||||||
|
if !current_event.press_ok.is_empty():
|
||||||
|
for check in current_event.press_ok:
|
||||||
|
if check == true:
|
||||||
|
press_ok_current += 1
|
||||||
|
if !current_event.hold_ok.is_empty():
|
||||||
|
for check in current_event.hold_ok:
|
||||||
|
if check == true:
|
||||||
|
hold_ok_current += 1
|
||||||
|
if !current_event.shake_ok.is_empty():
|
||||||
|
for check in current_event.shake_ok:
|
||||||
|
if check <= 0:
|
||||||
|
shake_ok_current += 1
|
||||||
|
|
||||||
|
if press_ok_current == press_ok_target and hold_ok_current == hold_ok_target\
|
||||||
|
and shake_ok_current == shake_ok_target:
|
||||||
|
print("Success!")
|
||||||
|
event_complete.emit()
|
||||||
|
event_timer.stop()
|
||||||
|
vfx.stop()
|
||||||
|
vfx.play("RESET")
|
||||||
|
event_running = false
|
||||||
|
|
||||||
|
func event_process():
|
||||||
|
if !current_event.press.is_empty() and check_if_held():
|
||||||
|
var i = 0
|
||||||
|
for action in current_event.press:
|
||||||
|
if Input.is_action_just_pressed(action):
|
||||||
|
print(action + " was pressed")
|
||||||
|
current_event.press_ok[i] = true
|
||||||
|
i += 1
|
||||||
|
if !current_event.hold.is_empty():
|
||||||
|
var i = 0
|
||||||
|
for action in current_event.hold:
|
||||||
|
if Input.is_action_pressed(action):
|
||||||
|
current_event.hold_ok[i] = true
|
||||||
|
else:
|
||||||
|
current_event.hold_ok[i] = false
|
||||||
|
i += 1
|
||||||
|
if !current_event.shake.is_empty() and check_if_held():
|
||||||
|
for action in current_event.shake:
|
||||||
|
if Input.is_action_just_pressed(action):
|
||||||
|
current_event.shake_ok[0] -= 1
|
||||||
|
if !current_event.shake_b.is_empty() and check_if_held():
|
||||||
|
for action in current_event.shake_b:
|
||||||
|
if Input.is_action_just_pressed(action):
|
||||||
|
current_event.shake_ok[1] -= 1
|
||||||
|
|
||||||
|
func _on_grace_period_timeout():
|
||||||
|
print("Lights out!")
|
||||||
|
lights_out.emit()
|
||||||
|
no_energy = true
|
||||||
|
|
||||||
|
func _on_event_timer_timeout():
|
||||||
|
print("Failure!")
|
||||||
|
event_fail.emit()
|
||||||
|
vfx.stop()
|
||||||
|
vfx.play("RESET")
|
||||||
|
event_running = false
|
24
scripts/input_tester.gd
Normal file
24
scripts/input_tester.gd
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
extends TextureRect
|
||||||
|
|
||||||
|
@onready var manager = $"../GameManager"
|
||||||
|
@export var press: bool = false
|
||||||
|
@export var hold: bool = false
|
||||||
|
@export var shake: bool = false
|
||||||
|
@export var checkpos: int = 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):
|
||||||
|
if press:
|
||||||
|
if manager.current_event.press_ok[checkpos] == true:
|
||||||
|
visible = false
|
||||||
|
if hold:
|
||||||
|
if manager.current_event.hold_ok[checkpos] == true:
|
||||||
|
visible = false
|
||||||
|
else:
|
||||||
|
visible = true
|
||||||
|
if shake:
|
||||||
|
if manager.current_event.shake_ok[checkpos] <= 0:
|
||||||
|
visible = false
|
12
scripts/spinner_tester.gd
Normal file
12
scripts/spinner_tester.gd
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
extends TextureRect
|
||||||
|
|
||||||
|
@onready var manager = $"../GameManager"
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if manager.dead_spinner:
|
||||||
|
visible = true
|
||||||
|
else:
|
||||||
|
visible = false
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue