2022-01-17 19:23:18 +00:00
using System.Collections ;
using System.Collections.Generic ;
2023-10-29 19:44:47 +00:00
using System.Threading.Tasks ;
using Cysharp.Threading.Tasks ;
2022-06-12 19:32:00 +00:00
2022-01-17 19:23:18 +00:00
using UnityEngine ;
2023-12-26 05:22:51 +00:00
using UnityEngine.Networking ;
2022-01-17 19:23:18 +00:00
2022-03-14 14:21:05 +00:00
using HeavenStudio.Util ;
2022-06-06 16:54:49 +00:00
using HeavenStudio.Editor.Track ;
2022-03-14 14:21:05 +00:00
using HeavenStudio.Games ;
2023-06-10 19:13:29 +00:00
using Jukebox ;
2022-01-17 19:23:18 +00:00
2024-01-19 00:56:26 +00:00
using SatorImaging.UnitySourceGenerator ;
2022-04-12 16:14:46 +00:00
using System ;
2022-06-12 19:32:00 +00:00
using System.IO ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
using System.Linq ;
2024-04-07 04:54:06 +00:00
using BurstLinq ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
using UnityEngine.Assertions.Must ;
using Newtonsoft.Json.Linq ;
2022-04-12 16:14:46 +00:00
2022-03-14 14:21:05 +00:00
namespace HeavenStudio
2022-01-17 19:23:18 +00:00
{
2024-01-19 04:39:20 +00:00
[UnitySourceGenerator(typeof(MinigameLoaderGenerator), OverwriteIfFileExists = true)]
2024-01-19 00:56:26 +00:00
public partial class Minigames
2022-01-17 19:23:18 +00:00
{
2023-10-29 19:44:47 +00:00
public enum RecommendedControlStyle
{
Any ,
Pad ,
Touch ,
Baton ,
}
2023-09-11 22:28:04 +00:00
2023-06-10 19:13:29 +00:00
public static void InitPreprocessor ( )
{
RiqBeatmap . OnUpdateBeatmap + = PreProcessBeatmap ;
2023-12-26 05:22:51 +00:00
RiqFileHandler . AudioConverter = JukeboxAudioConverter ;
2023-06-10 19:13:29 +00:00
}
2023-12-26 05:22:51 +00:00
readonly public static Dictionary < string , object > propertiesModel = new ( )
{
// mapper set properties? (future: use this to flash the button)
{ "propertiesmodified" , false } ,
////// CATEGORY 1: SONG INFO
// general chart info
{ "remixtitle" , "New Remix" } , // chart name
{ "remixauthor" , "Your Name" } , // charter's name
{ "remixdesc" , "Remix Description" } , // chart description
{ "remixlevel" , 1 } , // chart difficulty (maybe offer a suggestion but still have the mapper determine it)
{ "remixtempo" , 120f } , // avg. chart tempo
{ "remixtags" , "" } , // chart tags
{ "icontype" , 0 } , // chart icon (presets, custom - future)
{ "iconres" , new EntityTypes . Resource ( EntityTypes . Resource . ResourceType . Image , "Images/Select/" , "Icon" ) } , // custom icon location (future)
{ "challengetype" , 0 } , // perfect challenge type
2024-01-22 01:38:56 +00:00
{ "accessiblewarning" , false } , // epilepsy warning
2023-12-26 05:22:51 +00:00
{ "playstyle" , RecommendedControlStyle . Any } , // recommended control style
// chart song info
{ "idolgenre" , "Song Genre" } , // song genre
{ "idolsong" , "Song Name" } , // song name
{ "idolcredit" , "Artist" } , // song artist
////// CATEGORY 2: PROLOGUE AND EPILOGUE
// chart prologue
{ "prologuetype" , 0 } , // prologue card animation (future)
{ "prologuecaption" , "Remix" } , // prologue card sub-title (future)
// chart results screen messages
{ "resultcaption" , "Rhythm League Notes" } , // result screen header
{ "resultcommon_hi" , "Good rhythm." } , // generic "Superb" message (one-liner)
{ "resultcommon_ok" , "Eh. Passable." } , // generic "OK" message (one-liner)
{ "resultcommon_ng" , "Try harder next time." } , // generic "Try Again" message (one-liner)
{ "resultcat0_hi" , "You show strong fundamentals." } , // "Superb" message for input category 0 "normal" (two-liner)
{ "resultcat0_ng" , "Work on your fundamentals." } , // "Try Again" message for input category 0 "normal" (two-liner)
{ "resultcat1_hi" , "You kept the beat well." } , // "Superb" message for input category 1 "keep" (two-liner)
{ "resultcat1_ng" , "You had trouble keeping the beat." } , // "Try Again" message for input category 1 "keep" (two-liner)
{ "resultcat2_hi" , "You had great aim." } , // "Superb" message for input category 2 "aim" (two-liner)
{ "resultcat2_ng" , "Your aim was a little shaky." } , // "Try Again" message for input category 2 "aim" (two-liner)
{ "resultcat3_hi" , "You followed the example well." } , // "Superb" message for input category 3 "repeat" (two-liner)
{ "resultcat3_ng" , "Next time, follow the example better." } , // "Try Again" message for input category 3 "repeat" (two-liner)
2024-01-15 15:54:08 +00:00
{ "epilogue_hi" , "Superb" } , // epilogue "Superb" message
{ "epilogue_ok" , "OK" } , // epilogue "OK" message
{ "epilogue_ng" , "Try Again" } , // epilogue "Try Again" message
2023-12-26 05:22:51 +00:00
{ "epilogue_hi_res" , new EntityTypes . Resource ( EntityTypes . Resource . ResourceType . Image , "Images/Epilogue/" , "Hi" ) } , // epilogue "Superb" image resource path
{ "epilogue_ok_res" , new EntityTypes . Resource ( EntityTypes . Resource . ResourceType . Image , "Images/Epilogue/" , "Ok" ) } , // epilogue "OK" image resource path
{ "epilogue_ng_res" , new EntityTypes . Resource ( EntityTypes . Resource . ResourceType . Image , "Images/Epilogue/" , "Ng" ) } , // epilogue "Try Again" image resource path
} ;
readonly static Dictionary < string , object > tempoChangeModel = new ( )
2023-06-11 16:12:25 +00:00
{
{ "tempo" , 120f } ,
{ "swing" , 0f } ,
2024-04-07 04:54:06 +00:00
{ "swingDivision" , 1f } ,
2023-06-11 16:12:25 +00:00
{ "timeSignature" , new Vector2 ( 4 , 4 ) } ,
} ;
2023-12-26 05:22:51 +00:00
readonly static Dictionary < string , object > volumeChangeModel = new ( )
2023-06-11 16:12:25 +00:00
{
{ "volume" , 1f } ,
{ "fade" , Util . EasingFunction . Ease . Instant } ,
} ;
2023-12-26 05:22:51 +00:00
readonly static Dictionary < string , object > sectionMarkModel = new ( )
2023-06-11 16:12:25 +00:00
{
{ "sectionName" , "" } ,
{ "startPerfect" , false } ,
2023-12-26 05:22:51 +00:00
{ "weight" , 1f } ,
{ "category" , 0 } ,
2023-06-11 16:12:25 +00:00
} ;
static void PreProcessSpecialEntity ( RiqEntity e , Dictionary < string , object > model )
{
foreach ( var t in model )
{
string propertyName = t . Key ;
Type type = t . Value . GetType ( ) ;
if ( ! e . dynamicData . ContainsKey ( propertyName ) )
{
e . CreateProperty ( propertyName , t . Value ) ;
}
Type pType = e [ propertyName ] . GetType ( ) ;
if ( pType ! = type )
{
try
{
2023-06-14 01:21:13 +00:00
if ( type . IsEnum )
2023-06-11 16:12:25 +00:00
{
2023-06-14 01:21:13 +00:00
if ( pType = = typeof ( string ) )
e . dynamicData [ propertyName ] = ( int ) Enum . Parse ( type , ( string ) e [ propertyName ] ) ;
2023-06-11 16:12:25 +00:00
else
2023-06-14 01:21:13 +00:00
e . dynamicData [ propertyName ] = ( int ) e [ propertyName ] ;
2023-06-11 16:12:25 +00:00
}
else if ( pType = = typeof ( Newtonsoft . Json . Linq . JObject ) )
e [ propertyName ] = e [ propertyName ] . ToObject ( type ) ;
else
e [ propertyName ] = Convert . ChangeType ( e [ propertyName ] , type ) ;
}
catch
{
Debug . LogWarning ( $"Could not convert {propertyName} to {type}! Using default value..." ) ;
// use default value
e . CreateProperty ( propertyName , t . Value ) ;
}
}
}
}
2023-12-26 05:22:51 +00:00
public static string JukeboxAudioConverter ( string filePath , AudioType audioType , string specificType )
{
2024-01-11 01:43:25 +00:00
string wavCachePath = Path . Combine ( Application . temporaryCachePath , "savewav" ) ;
2024-01-11 01:38:48 +00:00
if ( Directory . Exists ( wavCachePath ) )
2023-12-26 05:22:51 +00:00
{
2024-01-11 01:38:48 +00:00
Directory . Delete ( wavCachePath , true ) ;
}
if ( ! Directory . Exists ( wavCachePath ) )
{
Directory . CreateDirectory ( wavCachePath ) ;
2023-12-26 05:22:51 +00:00
}
if ( audioType = = AudioType . MPEG )
{
Debug . Log ( $"mp3 loaded, Converting {filePath} to wav..." ) ;
// convert mp3 to wav
// import the mp3 as an audioclip
string url = "file://" + filePath ;
using ( var www = UnityWebRequestMultimedia . GetAudioClip ( url , audioType ) )
{
www . SendWebRequest ( ) ;
while ( ! www . isDone ) { }
if ( www . result = = UnityWebRequest . Result . ConnectionError )
{
Debug . LogError ( $"Could not load audio file {filePath}! Error: {www.error}" ) ;
return filePath ;
}
AudioClip clip = DownloadHandlerAudioClip . GetContent ( www ) ;
string fileName = Path . GetFileNameWithoutExtension ( filePath ) ;
2024-01-11 01:43:25 +00:00
SavWav . Save ( fileName , clip , true ) ;
filePath = Path . Combine ( wavCachePath , $"{fileName}.wav" ) ;
2023-12-26 05:22:51 +00:00
clip = null ;
}
}
return filePath ;
}
2023-06-10 19:13:29 +00:00
/// <summary>
/// processes an riq beatmap after it is loaded
/// </summary>
public static RiqBeatmapData ? PreProcessBeatmap ( string version , RiqBeatmapData data )
{
Debug . Log ( "Preprocessing beatmap..." ) ;
2024-05-08 19:26:43 +00:00
Minigame game ;
GameAction action ;
Type type , pType ;
2023-12-26 05:22:51 +00:00
if ( EventCaller . instance ! = null )
2023-06-10 19:13:29 +00:00
{
2024-01-08 06:38:05 +00:00
string [ ] split ;
2023-12-26 05:22:51 +00:00
foreach ( var e in data . entities )
2023-06-10 19:13:29 +00:00
{
2024-01-08 06:38:05 +00:00
split = e . datamodel . Split ( '/' ) ;
var gameName = split [ 0 ] ;
var actionName = split [ 1 ] ;
2023-12-26 05:22:51 +00:00
game = EventCaller . instance . GetMinigame ( gameName ) ;
if ( game = = null )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
Debug . LogWarning ( $"Unknown game {gameName} found in remix.json! Adding game..." ) ;
2024-05-08 19:26:43 +00:00
game = new Minigame ( gameName , gameName . DisplayName ( ) + " \n<color=#eb5454>[inferred from remix.json]</color>" , "" , false , false , new List < GameAction > ( ) , inferred : true ) ;
2024-01-08 06:38:05 +00:00
EventCaller . instance . minigames . Add ( gameName , game ) ;
2023-12-26 05:22:51 +00:00
if ( Editor . Editor . instance ! = null )
Editor . Editor . instance . AddIcon ( game ) ;
2023-06-10 19:13:29 +00:00
}
2023-12-26 05:22:51 +00:00
action = EventCaller . instance . GetGameAction ( game , actionName ) ;
if ( action = = null )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
Debug . LogWarning ( $"Unknown action {gameName}/{actionName} found in remix.json! Adding action..." ) ;
2024-05-08 19:26:43 +00:00
var parameters = new List < Param > ( ) ;
2023-12-26 05:22:51 +00:00
foreach ( var item in e . dynamicData )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
Debug . Log ( $"k: {item.Key}, v: {item.Value}" ) ;
if ( item . Key = = "track" )
continue ;
if ( item . Value = = null )
continue ;
var value = item . Value ;
if ( value . GetType ( ) = = typeof ( long ) )
value = new EntityTypes . Integer ( int . MinValue , int . MaxValue , ( int ) value ) ;
else if ( value . GetType ( ) = = typeof ( double ) )
value = new EntityTypes . Float ( float . NegativeInfinity , float . PositiveInfinity , ( float ) value ) ;
2024-05-08 19:26:43 +00:00
parameters . Add ( new Param ( item . Key , value , item . Key . DisplayName ( ) , "[inferred from remix.json]" ) ) ;
2023-06-10 19:13:29 +00:00
}
2024-05-08 19:26:43 +00:00
action = new GameAction ( actionName , actionName . DisplayName ( ) , "Events" , e . length , true , parameters ) ;
2023-12-26 05:22:51 +00:00
game . actions . Add ( action ) ;
}
//check each param of the action
if ( action . parameters ! = null )
{
foreach ( var param in action . parameters )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
type = param . parameter . GetType ( ) ;
//add property if it doesn't exist
if ( ! e . dynamicData . ContainsKey ( param . propertyName ) )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
Debug . LogWarning ( $"Property {param.propertyName} does not exist in the entity's dynamic data! Adding..." ) ;
2024-05-08 19:26:43 +00:00
if ( param . parameter is EntityTypes . Integer intParam )
e . dynamicData . Add ( param . propertyName , intParam . val ) ;
2024-05-12 06:00:32 +00:00
else if ( param . parameter is EntityTypes . Float floatParam )
2024-05-08 19:26:43 +00:00
e . dynamicData . Add ( param . propertyName , floatParam . val ) ;
2024-05-12 06:00:32 +00:00
else if ( param . parameter is EntityTypes . Dropdown ddParam )
2024-05-08 19:26:43 +00:00
e . dynamicData . Add ( param . propertyName , new EntityTypes . DropdownObj ( ddParam ) ) ;
2024-05-12 06:00:32 +00:00
else if ( param . parameter is EntityTypes . Note noteParam )
2024-05-08 19:26:43 +00:00
e . dynamicData . Add ( param . propertyName , noteParam . val ) ;
2023-06-14 01:21:13 +00:00
else if ( type . IsEnum )
2023-12-26 05:22:51 +00:00
e . dynamicData . Add ( param . propertyName , ( int ) param . parameter ) ;
2023-06-10 19:13:29 +00:00
else
2023-12-26 05:22:51 +00:00
e . dynamicData . Add ( param . propertyName , Convert . ChangeType ( param . parameter , type ) ) ;
continue ;
2023-06-10 19:13:29 +00:00
}
2023-12-26 05:22:51 +00:00
pType = e [ param . propertyName ] . GetType ( ) ;
if ( pType ! = type )
2023-06-10 19:13:29 +00:00
{
2023-12-26 05:22:51 +00:00
try
{
2024-03-22 01:37:41 +00:00
if ( type = = typeof ( EntityTypes . Integer ) | | type = = typeof ( EntityTypes . Note ) )
2023-12-26 05:22:51 +00:00
e . dynamicData [ param . propertyName ] = ( int ) e [ param . propertyName ] ;
else if ( type = = typeof ( EntityTypes . Float ) )
e . dynamicData [ param . propertyName ] = ( float ) e [ param . propertyName ] ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
else if ( type = = typeof ( EntityTypes . Button ) )
e . dynamicData [ param . propertyName ] = ( string ) e [ param . propertyName ] ;
else if ( type = = typeof ( EntityTypes . Dropdown ) ) {
2024-05-12 05:15:47 +00:00
JValue value = e [ param . propertyName ] . value ;
JArray values = e [ param . propertyName ] . Values ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
e . dynamicData [ param . propertyName ] = new EntityTypes . DropdownObj ( ( int ) value , values . Select ( x = > ( string ) x ) . ToList ( ) ) ;
}
2024-04-08 02:18:51 +00:00
else if ( type = = typeof ( EntityTypes . NoteSampleDropdown ) )
{
e . dynamicData [ param . propertyName ] = ( int ) e [ param . propertyName ] ;
}
2023-12-26 05:22:51 +00:00
else if ( type = = typeof ( EntityTypes . Resource ) )
e . dynamicData [ param . propertyName ] = ( EntityTypes . Resource ) e [ param . propertyName ] ;
else if ( type . IsEnum )
{
if ( pType = = typeof ( string ) )
e . dynamicData [ param . propertyName ] = ( int ) Enum . Parse ( type , ( string ) e [ param . propertyName ] ) ;
else
e . dynamicData [ param . propertyName ] = ( int ) e [ param . propertyName ] ;
}
else if ( pType = = typeof ( Newtonsoft . Json . Linq . JObject ) )
e . dynamicData [ param . propertyName ] = e [ param . propertyName ] . ToObject ( type ) ;
else
e . dynamicData [ param . propertyName ] = Convert . ChangeType ( e [ param . propertyName ] , type ) ;
}
catch
{
Debug . LogWarning ( $"Could not convert {param.propertyName} to {type}! Using default value..." ) ;
// GlobalGameManager.ShowErrorMessage("Warning", $"Could not convert {e.datamodel}/{param.propertyName} to {type}! This will be loaded using the default value, so chart may be unstable.");
// use default value
if ( type = = typeof ( EntityTypes . Integer ) )
e . dynamicData [ param . propertyName ] = ( ( EntityTypes . Integer ) param . parameter ) . val ;
else if ( type = = typeof ( EntityTypes . Float ) )
e . dynamicData [ param . propertyName ] = ( ( EntityTypes . Float ) param . parameter ) . val ;
2024-05-12 05:15:47 +00:00
// else if (type == typeof(EntityTypes.Dropdown))
// e.dynamicData[param.propertyName] = new EntityTypes.DropdownObj();
else if ( type = = typeof ( EntityTypes . Note ) )
e . dynamicData [ param . propertyName ] = ( ( EntityTypes . Note ) param . parameter ) . val ;
2023-12-26 05:22:51 +00:00
else if ( type . IsEnum & & param . propertyName ! = "ease" )
e . dynamicData [ param . propertyName ] = ( int ) param . parameter ;
else
e . dynamicData [ param . propertyName ] = Convert . ChangeType ( param . parameter , type ) ;
}
2023-06-10 19:13:29 +00:00
}
}
}
}
}
foreach ( var tempo in data . tempoChanges )
{
2023-06-11 16:12:25 +00:00
PreProcessSpecialEntity ( tempo , tempoChangeModel ) ;
2023-06-10 19:13:29 +00:00
}
2023-06-11 19:52:14 +00:00
if ( data . tempoChanges [ 0 ] [ "tempo" ] < = 0 )
{
data . tempoChanges [ 0 ] [ "tempo" ] = 120 ;
}
2023-06-10 19:13:29 +00:00
foreach ( var vol in data . volumeChanges )
{
2023-06-11 16:12:25 +00:00
PreProcessSpecialEntity ( vol , volumeChangeModel ) ;
2023-06-10 19:13:29 +00:00
}
foreach ( var section in data . beatmapSections )
{
2023-06-11 16:12:25 +00:00
PreProcessSpecialEntity ( section , sectionMarkModel ) ;
2023-06-10 19:13:29 +00:00
}
//go thru each property of the model beatmap and add any missing keyvalue pair
foreach ( var prop in propertiesModel )
{
2023-12-26 05:22:51 +00:00
var mType = propertiesModel [ prop . Key ] . GetType ( ) ;
2023-06-10 19:13:29 +00:00
if ( ! data . properties . ContainsKey ( prop . Key ) )
{
data . properties . Add ( prop . Key , prop . Value ) ;
}
2023-12-26 05:22:51 +00:00
else
{
// convert enums to the intended enum type
if ( mType . IsEnum )
{
if ( data . properties [ prop . Key ] . GetType ( ) = = typeof ( string ) )
data . properties [ prop . Key ] = Enum . Parse ( mType , ( string ) data . properties [ prop . Key ] ) ;
2024-01-06 03:51:27 +00:00
else
data . properties [ prop . Key ] = Enum . ToObject ( mType , data . properties [ prop . Key ] ) ;
2023-12-26 05:22:51 +00:00
}
// convert all JObjects to their respective types
else if ( data . properties [ prop . Key ] . GetType ( ) = = typeof ( Newtonsoft . Json . Linq . JObject ) )
{
data . properties [ prop . Key ] = ( data . properties [ prop . Key ] as Newtonsoft . Json . Linq . JObject ) . ToObject ( mType ) ;
}
}
2023-06-10 19:13:29 +00:00
}
return data ;
}
2022-01-17 19:23:18 +00:00
public class Minigame
{
2023-09-11 22:28:04 +00:00
2022-01-17 19:23:18 +00:00
public string name ;
public string displayName ;
public string color ;
2023-10-29 19:44:47 +00:00
public string splitColorL ;
public string splitColorR ;
2023-05-21 17:35:00 +00:00
public bool hidden ;
2022-02-03 03:58:08 +00:00
public bool fxOnly ;
2022-01-17 19:23:18 +00:00
public List < GameAction > actions = new List < GameAction > ( ) ;
2024-03-29 02:35:07 +00:00
public uint? chronologicalSortKey ;
2024-04-05 01:28:01 +00:00
// Yin: basically i figure this should just be whatever index number the minigame is
2024-03-29 02:35:07 +00:00
// in its game of origin. So, basically, like, if we're talking Rhythm Heaven DS, Built to
// Scale would be 1, then Fillbots would be 2, and so on. If it's an endless game, add 100.
// If it's a rhythm toy, add 200. If it's a 2-Player endless game, add 300. If it's a credits
// game... IDK, I guess just set it to 99. It works. If the game isn't a RH original then just
// put the date in YYYYMMDD format. Oh, and if it's a practice game set it to 0.
2022-01-17 19:23:18 +00:00
2022-06-12 19:32:00 +00:00
public List < string > tags ;
public string defaultLocale = "en" ;
2024-02-11 05:24:52 +00:00
public string wantAssetBundle = null ;
2022-06-12 19:32:00 +00:00
public List < string > supportedLocales ;
2023-04-02 17:15:19 +00:00
public bool inferred ;
2022-06-12 19:32:00 +00:00
2024-04-10 05:05:47 +00:00
public bool UsesAssetBundle = > ( wantAssetBundle is not null or "" ) & & ( ! badBundle ) ;
public bool HasLocales = > supportedLocales . Count > 0 ;
2024-05-13 20:16:36 +00:00
public bool AssetsLoaded = > ( ! badBundle ) & & ( ( HasLocales & & audioLoaded & & currentLoadedLocale = = defaultLocale ) | | ( ! HasLocales ) ) & & ( LoadedPrefab ! = null ) & & resourcesLoaded & & loadComplete ;
2024-02-11 05:24:52 +00:00
public bool AlreadyLoading = > alreadyLoading ;
2024-04-10 05:05:47 +00:00
2023-01-12 01:42:12 +00:00
public bool SequencesPreloaded = > soundSequences ! = null ;
2023-04-02 17:15:19 +00:00
public string LoadableName = > inferred ? "noGame" : name ;
2023-10-29 19:44:47 +00:00
public GameObject LoadedPrefab = > loadedPrefab ;
2022-06-12 19:32:00 +00:00
private string currentLoadedLocale = "" ;
2024-04-10 05:05:47 +00:00
private AssetBundle bundleResources = null ;
private bool resourcesLoaded = false ;
private bool resourcesPreloaded = false ;
private AssetBundle bundleAudio = null ;
private bool audioLoaded = false ;
private bool audioPreloaded = false ;
2023-10-29 19:44:47 +00:00
private GameObject loadedPrefab = null ;
2024-04-10 05:05:47 +00:00
private bool badBundle = false ;
// eventually implement secondary assetbundles for localization instead of one "common" and one "locale"
2024-02-11 05:24:52 +00:00
bool loadComplete = false ;
2022-06-12 19:32:00 +00:00
2023-01-12 01:42:12 +00:00
private SoundSequence . SequenceKeyValue [ ] soundSequences = null ;
public SoundSequence . SequenceKeyValue [ ] LoadedSoundSequences
{
get = > soundSequences ;
set = > soundSequences = value ;
}
2024-03-29 02:35:07 +00:00
public Minigame ( string name , string displayName , string color , bool hidden , bool fxOnly , List < GameAction > actions , List < string > tags = null , string wantAssetBundle = null , string defaultLocale = "en" , List < string > supportedLocales = null , bool inferred = false , uint? chronologicalSortKey = null )
2022-01-17 19:23:18 +00:00
{
this . name = name ;
this . displayName = displayName ;
this . color = color ;
this . actions = actions ;
2023-05-21 17:35:00 +00:00
this . hidden = hidden ;
2022-02-03 03:58:08 +00:00
this . fxOnly = fxOnly ;
2022-06-12 19:32:00 +00:00
this . tags = tags ? ? new List < string > ( ) ;
2024-02-11 05:24:52 +00:00
this . wantAssetBundle = wantAssetBundle ;
2022-06-12 19:32:00 +00:00
this . defaultLocale = defaultLocale ;
this . supportedLocales = supportedLocales ? ? new List < string > ( ) ;
2023-04-02 17:15:19 +00:00
this . inferred = inferred ;
2023-10-29 19:44:47 +00:00
this . splitColorL = null ;
this . splitColorR = null ;
2024-03-29 02:35:07 +00:00
this . chronologicalSortKey = chronologicalSortKey ;
2023-10-29 19:44:47 +00:00
}
2024-03-29 02:35:07 +00:00
public Minigame ( string name , string displayName , string color , string splitColorL , string splitColorR , bool hidden , bool fxOnly , List < GameAction > actions , List < string > tags = null , string wantAssetBundle = null , string defaultLocale = "en" , List < string > supportedLocales = null , bool inferred = false , uint? chronologicalSortKey = null )
2023-10-29 19:44:47 +00:00
{
this . name = name ;
this . displayName = displayName ;
this . color = color ;
this . actions = actions ;
this . hidden = hidden ;
this . fxOnly = fxOnly ;
this . tags = tags ? ? new List < string > ( ) ;
2024-02-11 05:24:52 +00:00
this . wantAssetBundle = wantAssetBundle ;
2023-10-29 19:44:47 +00:00
this . defaultLocale = defaultLocale ;
this . supportedLocales = supportedLocales ? ? new List < string > ( ) ;
this . inferred = inferred ;
this . splitColorL = splitColorL ;
this . splitColorR = splitColorR ;
2024-03-29 02:35:07 +00:00
this . chronologicalSortKey = chronologicalSortKey ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
bool alreadyLoading = false ;
public async UniTaskVoid LoadAssetsAsync ( )
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
if ( alreadyLoading | | AssetsLoaded | | ! UsesAssetBundle ) return ;
loadComplete = false ;
alreadyLoading = true ;
await UniTask . WhenAll ( LoadResourcesAssetBundleAsync ( ) , LoadAudioAssetBundleAsync ( ) ) ;
if ( badBundle )
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
Debug . LogWarning ( $"Bad bundle for {name}" ) ;
alreadyLoading = false ;
loadComplete = true ;
return ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
await UniTask . WhenAll ( LoadGamePrefabAsync ( ) , PrepareResources ( ) , PrepareAudio ( ) ) ;
SoundByte . PreloadGameAudioClips ( this ) ;
alreadyLoading = false ;
loadComplete = true ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
public AssetBundle GetAudioAssetBundle ( )
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
if ( bundleAudio ! = null & & ! audioLoaded )
2023-12-26 05:22:51 +00:00
{
2024-04-10 05:05:47 +00:00
bundleAudio . Unload ( true ) ;
bundleAudio = null ;
audioLoaded = false ;
audioPreloaded = false ;
2023-12-26 05:22:51 +00:00
}
2024-04-10 05:05:47 +00:00
if ( ! HasLocales ) return null ;
if ( ! UsesAssetBundle ) return null ;
if ( bundleAudio = = null | | currentLoadedLocale ! = defaultLocale ) //TEMPORARY: use the game's default locale until we add localization support
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
if ( audioLoaded ) return bundleAudio ;
2022-06-12 19:32:00 +00:00
// TODO: try/catch for missing assetbundles
2024-04-10 05:05:47 +00:00
currentLoadedLocale = defaultLocale ;
bundleAudio = AssetBundle . LoadFromFile ( Path . GetFullPath ( Path . Combine ( Application . streamingAssetsPath , wantAssetBundle , "locale." + defaultLocale ) ) ) ;
audioLoaded = true ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
return bundleAudio ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
public AssetBundle GetResourcesAssetBundle ( )
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
if ( badBundle ) return null ;
string path = Path . GetFullPath ( Path . Combine ( Application . streamingAssetsPath , wantAssetBundle , "common" ) ) ;
if ( bundleResources ! = null & & ! resourcesLoaded )
{
bundleResources . Unload ( true ) ;
bundleResources = null ;
resourcesLoaded = false ;
resourcesPreloaded = false ;
}
if ( ! File . Exists ( path ) )
{
badBundle = true ;
return null ;
}
if ( resourcesLoaded ) return bundleResources ;
if ( ! UsesAssetBundle ) return null ;
if ( bundleResources = = null )
{
bundleResources = AssetBundle . LoadFromFile ( path ) ;
resourcesLoaded = true ;
}
return bundleResources ;
2023-10-29 19:44:47 +00:00
}
2022-06-12 19:32:00 +00:00
2024-04-10 05:05:47 +00:00
public async UniTask LoadResourcesAssetBundleAsync ( )
2023-10-29 19:44:47 +00:00
{
2024-04-10 05:05:47 +00:00
if ( badBundle ) return ;
string path = Path . GetFullPath ( Path . Combine ( Application . streamingAssetsPath , wantAssetBundle , "common" ) ) ;
if ( bundleResources ! = null & & ! resourcesLoaded )
2023-12-26 05:22:51 +00:00
{
2024-04-10 05:05:47 +00:00
await bundleResources . UnloadAsync ( true ) ;
bundleResources = null ;
resourcesLoaded = false ;
resourcesPreloaded = false ;
2023-12-26 05:22:51 +00:00
}
2024-04-10 05:05:47 +00:00
// ignore all AB checks if path doesn't exist
if ( ! File . Exists ( path ) )
{
badBundle = true ;
return ;
}
if ( resourcesPreloaded | | resourcesLoaded ) return ;
resourcesPreloaded = true ;
if ( ! UsesAssetBundle ) return ;
if ( bundleResources ! = null ) return ;
AssetBundle bundle = await AssetBundle . LoadFromFileAsync ( path ) . ToUniTask ( timing : PlayerLoopTiming . PreLateUpdate ) ;
bundleResources = bundle ;
resourcesLoaded = true ;
2022-06-12 19:32:00 +00:00
}
2024-04-10 05:05:47 +00:00
public async UniTask LoadAudioAssetBundleAsync ( )
2022-06-12 19:32:00 +00:00
{
2024-04-10 05:05:47 +00:00
if ( bundleAudio ! = null & & ! audioLoaded )
2023-12-26 05:22:51 +00:00
{
2024-04-10 05:05:47 +00:00
await bundleAudio . UnloadAsync ( true ) ;
bundleAudio = null ;
audioLoaded = false ;
audioPreloaded = false ;
2023-12-26 05:22:51 +00:00
}
2024-04-10 05:05:47 +00:00
if ( ! HasLocales ) return ;
if ( audioPreloaded ) return ;
audioPreloaded = true ;
if ( ! UsesAssetBundle ) return ;
if ( audioLoaded & & bundleAudio ! = null & & currentLoadedLocale = = defaultLocale ) return ;
2022-06-12 19:32:00 +00:00
2024-04-10 05:05:47 +00:00
AssetBundle bundle = await AssetBundle . LoadFromFileAsync ( Path . GetFullPath ( Path . Combine ( Application . streamingAssetsPath , wantAssetBundle , "locale." + defaultLocale ) ) ) . ToUniTask ( timing : PlayerLoopTiming . PreLateUpdate ) ;
if ( audioLoaded & & bundleAudio ! = null & & currentLoadedLocale = = defaultLocale ) return ;
2022-06-12 19:32:00 +00:00
2024-04-10 05:05:47 +00:00
bundleAudio = bundle ;
2022-06-12 19:32:00 +00:00
currentLoadedLocale = defaultLocale ;
2024-04-10 05:05:47 +00:00
audioLoaded = true ;
2022-01-17 19:23:18 +00:00
}
2023-10-29 19:44:47 +00:00
public async UniTask LoadGamePrefabAsync ( )
{
2024-04-10 05:05:47 +00:00
if ( ! UsesAssetBundle ) return ;
if ( ! resourcesLoaded ) return ;
if ( bundleResources = = null ) return ;
if ( badBundle ) return ;
2023-10-29 19:44:47 +00:00
2024-04-10 05:05:47 +00:00
AssetBundleRequest request = bundleResources . LoadAssetAsync < GameObject > ( name ) ;
2024-02-11 05:24:52 +00:00
request . completed + = ( op ) = > OnPrefabLoaded ( op as AssetBundleRequest ) ;
await request ;
loadedPrefab = request . asset as GameObject ;
}
2023-10-29 19:44:47 +00:00
2024-02-11 05:24:52 +00:00
void OnPrefabLoaded ( AssetBundleRequest request )
{
GameObject prefab = request . asset as GameObject ;
// // load sound sequences here for now
// // this is taxing and is still done synchronously
// // move sequences to their own assets so that we don't have to look up a component
if ( prefab . TryGetComponent < Games . Minigame > ( out Games . Minigame minigame ) )
2023-10-29 19:44:47 +00:00
{
soundSequences = minigame . SoundSequences ;
}
2024-02-11 05:24:52 +00:00
loadedPrefab = prefab ;
2024-01-24 05:17:35 +00:00
}
2024-04-10 05:05:47 +00:00
public async UniTask PrepareResources ( )
2023-10-29 19:44:47 +00:00
{
2024-04-10 05:05:47 +00:00
if ( ! resourcesLoaded ) return ;
if ( bundleResources = = null ) return ;
2023-10-29 19:44:47 +00:00
2024-04-10 05:05:47 +00:00
var assets = bundleResources . LoadAllAssetsAsync ( ) ;
2023-10-29 19:44:47 +00:00
await assets ;
}
2024-04-10 05:05:47 +00:00
public async UniTask PrepareAudio ( )
2023-10-29 19:44:47 +00:00
{
2024-04-10 05:05:47 +00:00
if ( ! audioLoaded ) return ;
if ( bundleAudio = = null ) return ;
2023-10-29 19:44:47 +00:00
2024-04-10 05:05:47 +00:00
var assets = bundleAudio . LoadAllAssetsAsync ( ) ;
2023-10-29 19:44:47 +00:00
await assets ;
}
public async UniTask UnloadAllAssets ( )
{
2024-04-10 05:05:47 +00:00
if ( ! UsesAssetBundle ) return ;
2023-10-29 19:44:47 +00:00
if ( loadedPrefab ! = null )
{
loadedPrefab = null ;
}
2024-04-10 05:05:47 +00:00
if ( bundleResources ! = null )
2023-10-29 19:44:47 +00:00
{
2024-04-10 05:05:47 +00:00
await bundleResources . UnloadAsync ( true ) ;
bundleResources = null ;
resourcesLoaded = false ;
resourcesPreloaded = false ;
2023-10-29 19:44:47 +00:00
}
2024-04-10 05:05:47 +00:00
if ( bundleAudio ! = null )
2023-10-29 19:44:47 +00:00
{
2024-04-10 05:05:47 +00:00
await bundleAudio . UnloadAsync ( true ) ;
bundleAudio = null ;
audioLoaded = false ;
audioPreloaded = false ;
2023-10-29 19:44:47 +00:00
}
2024-02-11 05:24:52 +00:00
SoundByte . UnloadAudioClips ( name ) ;
loadComplete = false ;
2023-10-29 19:44:47 +00:00
}
2022-01-17 19:23:18 +00:00
}
public class GameAction
{
public string actionName ;
2022-08-20 23:03:51 +00:00
public string displayName ;
2024-05-08 19:26:43 +00:00
public string tabName ;
2022-08-21 03:13:52 +00:00
public EventCallback function = delegate { } ;
public float defaultLength = 1 ;
2024-05-10 01:06:13 +00:00
public int defaultVersion = 0 ;
2022-08-21 03:13:52 +00:00
public bool resizable = false ;
public List < Param > parameters = null ;
public bool hidden = false ;
2023-01-19 02:31:08 +00:00
public int priority = 0 ;
2022-08-21 03:13:52 +00:00
public EventCallback inactiveFunction = delegate { } ;
public EventCallback preFunction = delegate { } ;
2023-02-18 22:12:49 +00:00
public float preFunctionLength = 2.0f ;
2022-01-17 19:23:18 +00:00
2022-03-02 21:59:35 +00:00
/// <summary>
/// <para>Creates a block that can be used in the editor. The block's function and attributes are defined in the parentheses.</para>
/// <para>Note: Every parameter after the second one is an optional parameter. You can change optional parameters by adding (name): (value) after the second parameter.</para>
/// </summary>
2022-08-20 23:03:51 +00:00
/// <param name="actionName">Entity model name</param>
/// <param name="displayName">Name of the block used in the UI</param>
2022-03-02 21:59:35 +00:00
/// <param name="defaultLength">How long the block appears in the editor</param>
/// <param name="resizable">Allows the user to resize the block</param>
/// <param name="parameters">Extra parameters for this block that change how it functions.</param>
2022-08-20 23:03:51 +00:00
/// <param name="function"><para>What the block does when read during playback</para>
/// <para>Only does this if the game that it is associated with is loaded.</para></param>
2022-03-02 21:59:35 +00:00
/// <param name="inactiveFunction">What the block does when read while the game it's associated with isn't loaded.</param>
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
/// <param name="preFunction">What the block does when the GameManager seeks to this cue for pre-scheduling.</param>
2022-08-20 23:03:51 +00:00
/// <param name="hidden">Prevents the block from being shown in the game list. Block will still function normally if it is in the timeline.</param>
2023-01-19 02:31:08 +00:00
/// <param name="priority">Priority of this event. Higher priority events will be run first.</param>
2024-05-10 01:06:13 +00:00
public GameAction ( string actionName , string displayName , string tabName , float defaultLength = 1 , bool resizable = false , List < Param > parameters = null , EventCallback function = null , EventCallback inactiveFunction = null , EventCallback preFunction = null , bool hidden = false , int priority = 0 , float preFunctionLength = 2.0f , int defaultVersion = 0 )
2022-01-17 19:23:18 +00:00
{
this . actionName = actionName ;
2024-05-08 19:26:43 +00:00
this . displayName = string . IsNullOrEmpty ( displayName ) ? actionName : displayName ;
this . tabName = string . IsNullOrEmpty ( tabName ) ? "Events" : tabName ;
2022-01-17 19:23:18 +00:00
this . defaultLength = defaultLength ;
this . resizable = resizable ;
2022-02-03 22:20:26 +00:00
this . parameters = parameters ;
2022-03-01 08:17:06 +00:00
this . hidden = hidden ;
2022-08-20 23:03:51 +00:00
this . function = function ? ? delegate { } ;
this . inactiveFunction = inactiveFunction ? ? delegate { } ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
this . preFunction = preFunction ? ? delegate { } ;
2023-01-19 02:31:08 +00:00
this . priority = priority ;
2023-02-18 22:12:49 +00:00
this . preFunctionLength = preFunctionLength ;
2024-05-10 01:06:13 +00:00
this . defaultVersion = defaultVersion ;
2022-08-20 23:03:51 +00:00
}
/// <summary>
/// <para>Shorthand constructor for a GameAction with only required data</para>
/// </summary>
/// <param name="actionName">Entity model name</param>
/// <param name="displayName">Name of the block used in the UI</param>
2024-05-08 19:26:43 +00:00
/// <param name="tabName">Name of the tab to be under when spawning events</param>
public GameAction ( string actionName , string displayName , string tabName = "" )
2022-08-20 23:03:51 +00:00
{
this . actionName = actionName ;
2024-05-08 19:26:43 +00:00
this . displayName = string . IsNullOrEmpty ( displayName ) ? actionName : displayName ;
this . tabName = tabName = = string . Empty ? "Events" : tabName ; // keep it null if it's null
2022-02-03 22:20:26 +00:00
}
}
[System.Serializable]
public class Param
{
public string propertyName ;
public object parameter ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
public string caption ;
2022-03-01 21:11:19 +00:00
public string tooltip ;
2023-08-16 11:00:27 +00:00
public List < CollapseParam > collapseParams ;
2022-02-03 22:20:26 +00:00
2022-03-02 21:59:35 +00:00
/// <summary>
/// A parameter that changes the function of a GameAction.
/// </summary>
2022-08-20 23:03:51 +00:00
/// <param name="propertyName">The name of the variable that's being changed.</param>
2022-03-02 21:59:35 +00:00
/// <param name="parameter">The value of the parameter</param>
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
/// <param name="caption">The name shown in the editor. Can be anything you want.</param>
public Param ( string propertyName , object parameter , string caption , string tooltip = "" , List < CollapseParam > collapseParams = null )
2022-02-03 22:20:26 +00:00
{
this . propertyName = propertyName ;
this . parameter = parameter ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
this . caption = caption ;
2022-03-01 21:11:19 +00:00
this . tooltip = tooltip ;
2023-08-16 11:00:27 +00:00
this . collapseParams = collapseParams ;
}
public class CollapseParam
{
2023-10-27 20:19:11 +00:00
public Func < object , RiqEntity , bool > CollapseOn ;
2023-08-16 11:00:27 +00:00
public string [ ] collapseables ;
/// <summary>
/// Class that decides how other parameters will be collapsed
/// </summary>
/// <param name="collapseOn">What values should make it collapse/uncollapse?</param>
/// <param name="collapseables">IDs of the parameters to collapse</param>
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
public CollapseParam ( Func < object , RiqEntity , bool > collapseOn , params string [ ] collapseables )
2023-08-16 11:00:27 +00:00
{
CollapseOn = collapseOn ;
this . collapseables = collapseables ;
}
2022-01-17 19:23:18 +00:00
}
}
public delegate void EventCallback ( ) ;
2023-06-10 19:13:29 +00:00
public delegate void ParamChangeCallback ( string paramName , object paramValue , RiqEntity entity ) ;
2022-01-17 19:23:18 +00:00
public static void Init ( EventCaller eventCaller )
{
2024-01-08 06:38:05 +00:00
List < Minigame > defaultGames = new ( )
2022-01-17 19:23:18 +00:00
{
2022-02-03 03:58:08 +00:00
new Minigame ( "gameManager" , "Game Manager" , "" , false , true , new List < GameAction > ( )
2022-01-17 19:23:18 +00:00
{
2024-05-08 19:26:43 +00:00
new GameAction ( "switchGame" , "Switch Game" , null , 0.5f , false ,
2023-09-11 22:28:04 +00:00
function : delegate { var e = eventCaller . currentEntity ; GameManager . instance . SwitchGame ( eventCaller . currentSwitchGame , eventCaller . currentEntity . beat , e [ "toggle" ] ) ; } ,
2023-04-07 15:15:19 +00:00
parameters : new List < Param > ( )
{
2024-04-08 18:44:05 +00:00
new Param ( "toggle" , true , "Black Flash" , "Toggle if there should be a black flash before the game is switched. You should only disable this if you know what you're doing." )
2023-04-07 15:15:19 +00:00
} ,
inactiveFunction : delegate { var e = eventCaller . currentEntity ; GameManager . instance . SwitchGame ( eventCaller . currentSwitchGame , eventCaller . currentEntity . beat , e [ "toggle" ] ) ; }
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "end" , "End Remix" , "" ,
2023-09-11 22:28:04 +00:00
function : delegate {
Debug . Log ( "end" ) ;
2022-08-20 23:03:51 +00:00
if ( Timeline . instance ! = null )
2023-10-29 19:44:47 +00:00
Timeline . instance ? . Stop ( Timeline . instance . PlaybackBeat ) ;
2022-08-20 23:03:51 +00:00
else
2023-12-26 05:22:51 +00:00
GameManager . instance . Stop ( eventCaller . currentEntity . beat ) ;
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "skill star" , "Skill Star" , "" , 1f , true )
2023-03-11 04:51:22 +00:00
{
//temp for testing
function = delegate {
var e = eventCaller . currentEntity ;
2023-11-23 21:31:23 +00:00
Common . SkillStarManager . instance . DoStarIn ( e . beat , e . length ) ;
2023-03-11 04:51:22 +00:00
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "toggle inputs" , "Toggle Inputs" , "" , 0.5f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "toggle" , true , "Allow Inputs" , "Toggle if the player is able to input. Any missed cues while this is disabled will not be counted as a miss and will not break a perfect." )
2022-08-20 23:03:51 +00:00
} ,
delegate
{
2022-08-21 23:46:45 +00:00
GameManager . instance . ToggleInputs ( eventCaller . currentEntity [ "toggle" ] ) ;
2022-08-20 23:03:51 +00:00
}
) ,
2022-01-17 19:23:18 +00:00
} ) ,
2022-07-28 23:07:19 +00:00
2022-02-03 03:58:08 +00:00
new Minigame ( "countIn" , "Count-Ins" , "" , false , true , new List < GameAction > ( )
{
2024-05-08 19:26:43 +00:00
new GameAction ( "count-in" , "Count-In" , "Built" , 4f , true ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new List < Param > ( )
{
new Param ( "alt" , false , "Alt" , "Set the type of sounds to use for the count-in." ) ,
new Param ( "go" , false , "Go!" , "Toggle to end the count-in with \"Go!\"" ) ,
} ,
preFunction : delegate {
var e = eventCaller . currentEntity ;
SoundEffects . CountIn ( e . beat , e . length , e [ "alt" ] , e [ "go" ] ) ;
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "4 beat count-in" , "4 Beat Count-In" , "Built" , 4f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "type" , SoundEffects . CountInType . Normal , "Type" , "Set the type of sounds to use for the count-in." )
2022-08-20 23:03:51 +00:00
} ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
delegate {
var e = eventCaller . currentEntity ;
SoundEffects . FourBeatCountIn ( e . beat , e . length / 4f , e [ "type" ] ) ;
}
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "8 beat count-in" , "8 Beat Count-In" , "Built" , 8f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "type" , SoundEffects . CountInType . Normal , "Type" , "Set the type of sounds to use for the count-in." )
2022-08-20 23:03:51 +00:00
} ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
delegate {
var e = eventCaller . currentEntity ;
SoundEffects . EightBeatCountIn ( e . beat , e . length / 8f , e [ "type" ] ) ;
}
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "count" , "Count" , "Single" , 1f , false ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "type" , SoundEffects . CountNumbers . One , "Type" , "Set the number to say." ) ,
new Param ( "toggle" , false , "Alt" , "Toggle if the alternate version of this voice line should be used." )
2022-08-20 23:03:51 +00:00
} ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
delegate {
var e = eventCaller . currentEntity ;
SoundEffects . Count ( e [ "type" ] , e [ "toggle" ] ) ;
}
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "cowbell" , "Cowbell" , "Single" ,
2022-08-20 23:03:51 +00:00
function : delegate { SoundEffects . Cowbell ( ) ; }
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "ready!" , "Ready!" , "Single" , 2f , true ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
function : delegate { var e = eventCaller . currentEntity ; SoundEffects . Ready ( e . beat , ( e . length / 2f ) ) ; }
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "and" , "And" , "Single" , 0.5f ,
2022-08-20 23:03:51 +00:00
function : delegate { SoundEffects . And ( ) ; }
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "go!" , "Go!" , "Single" , 1f , false ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "toggle" , false , "Alt" , "Toggle if the alternate version of this voice line should be used." )
2022-08-20 23:03:51 +00:00
} ,
2022-08-21 23:46:45 +00:00
function : delegate { SoundEffects . Go ( eventCaller . currentEntity [ "toggle" ] ) ; }
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
// // These are still here for backwards-compatibility but are hidden in the editor
// new GameAction("4 beat count-in (alt)", "", 4f, function: delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length, 1); }, hidden: true),
// new GameAction("4 beat count-in (cowbell)", "", 4f, function: delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length, 2); }, hidden: true),
// new GameAction("8 beat count-in (alt)", "", 8f, function: delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length, 1); }, hidden: true),
// new GameAction("8 beat count-in (cowbell)", "", 8f, function: delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length, 2); }, hidden: true),
// new GameAction("one", "", function: delegate { SoundEffects.Count(0, false); }, hidden: true),
// new GameAction("two", "", function: delegate { SoundEffects.Count(1, false); }, hidden: true),
// new GameAction("three", "", function: delegate { SoundEffects.Count(2, false); }, hidden: true),
// new GameAction("four", "", function: delegate { SoundEffects.Count(3, false); }, hidden: true),
// new GameAction("one (alt)", "", function: delegate { SoundEffects.Count(0, true); }, hidden: true),
// new GameAction("two (alt)", "", function: delegate { SoundEffects.Count(1, true); }, hidden: true),
// new GameAction("three (alt)", "", function: delegate { SoundEffects.Count(2, true); }, hidden: true),
// new GameAction("four (alt)", "", function: delegate { SoundEffects.Count(3, true); }, hidden: true),
// new GameAction("go! (alt)", "", function: delegate { SoundEffects.Go(true); }, hidden: true),
2022-02-03 03:58:08 +00:00
} ) ,
2022-07-28 23:07:19 +00:00
2022-06-04 03:15:05 +00:00
new Minigame ( "vfx" , "Visual Effects" , "" , false , true , new List < GameAction > ( )
{
2024-05-08 19:26:43 +00:00
new GameAction ( "flash" , "Flash/Fade" , "VFX" , 1f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "colorA" , Color . white , "Start Color" , "Set the color at the start of the event." ) ,
new Param ( "colorB" , Color . white , "End Color" , "Set the color at the end of the event." ) ,
new Param ( "valA" , new EntityTypes . Float ( 0 , 1 , 1 ) , "Start Opacity" , "Set the opacity at the start of the event." ) ,
new Param ( "valB" , new EntityTypes . Float ( 0 , 1 , 0 ) , "End Opacity" , "Set the opacity at the end of the event." ) ,
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "colorA" , "valA" } )
} )
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "filter" , "Filter" , "VFX" , 1f , true ,
2023-01-27 03:42:16 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "filter" , Games . Global . Filter . FilterType . grayscale , "Type" , "Set the type of filter to use." ) ,
2023-11-20 19:54:48 +00:00
// old
/ * new Param ( "inten" , new EntityTypes . Float ( 0 , 100 , 100 ) , "Intensity" ) ,
2023-01-27 03:42:16 +00:00
new Param ( "fadein" , new EntityTypes . Float ( 0 , 100 , 0 ) , "Fade In" ) ,
2023-11-20 19:54:48 +00:00
new Param ( "fadeout" , new EntityTypes . Float ( 0 , 100 , 0 ) , "Fade Out" ) * /
// new
2024-01-15 02:04:10 +00:00
new Param ( "slot" , new EntityTypes . Integer ( 1 , 10 , 1 ) , "Slot" , "Set the slot for the filter. Higher slots are applied first. There can only be one filter per slot." ) ,
new Param ( "start" , new EntityTypes . Float ( 0 , 1 , 1 ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new Param ( "end" , new EntityTypes . Float ( 0 , 1 , 1 ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "start" } )
} ) ,
2023-01-27 03:42:16 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "move camera" , "Move Camera" , "Camera" , 1f , true , new List < Param > ( )
2022-08-20 23:03:51 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "valA" , new EntityTypes . Float ( - 50 , 50 , 0 ) , "Right / Left" , "Set the position on the X axis." ) ,
new Param ( "valB" , new EntityTypes . Float ( - 50 , 50 , 0 ) , "Up / Down" , "Set the position on the Y axis." ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new Param ( "valC" , new EntityTypes . Float ( - 250 , 250 , 10 ) , "In / Out" , "Set the position on the Z axis." ) ,
2024-01-15 02:04:10 +00:00
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." ) ,
new Param ( "axis" , GameCamera . CameraAxis . All , "Axis" , "Set if only a specific axis should be modified." )
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "rotate camera" , "Rotate Camera" , "Camera" , 1f , true , new List < Param > ( )
2022-08-20 23:03:51 +00:00
{
2024-05-08 19:26:43 +00:00
new Param ( "valA" , new EntityTypes . Float ( - 360 , 360 , 0 ) , "Pitch" , "Set the up/down rotation." ) ,
new Param ( "valB" , new EntityTypes . Float ( - 360 , 360 , 0 ) , "Yaw" , "Set the left/right rotation." ) ,
new Param ( "valC" , new EntityTypes . Float ( - 360 , 360 , 0 ) , "Roll" , "Set the clockwise/counterclockwise rotation." ) ,
2024-01-15 02:04:10 +00:00
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." ) ,
new Param ( "axis" , GameCamera . CameraAxis . All , "Axis" , "Set if only a specific axis should be modified." )
2023-09-11 22:28:04 +00:00
}
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "pan view" , "Pan Viewport" , "Camera" , 1f , true , new List < Param > ( )
2023-11-25 16:05:20 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "valA" , new EntityTypes . Float ( - 50 , 50 , 0 ) , "Right / Left" , "Set the position on the X axis." ) ,
new Param ( "valB" , new EntityTypes . Float ( - 50 , 50 , 0 ) , "Up / Down" , "Set the position on the Y axis." ) ,
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." ) ,
new Param ( "axis" , StaticCamera . ViewAxis . All , "Axis" , "Set if only a specific axis should be modified." )
2023-11-25 16:05:20 +00:00
}
2024-01-15 02:04:10 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "rotate view" , "Rotate Viewport" , "Camera" , 1f , true , new List < Param > ( )
2023-07-17 15:56:57 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "valA" , new EntityTypes . Float ( - 360 , 360 , 0 ) , "Rotation" , "Set the clockwise/counterclockwise rotation." ) ,
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." ) ,
2023-07-17 15:56:57 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "scale view" , "Scale Viewport" , "Camera" , 1f , true , new List < Param > ( )
2023-03-11 04:51:22 +00:00
{
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new Param ( "valA" , new EntityTypes . Float ( - 50f , 50 , 1 ) , "Width" , "Set the width of the viewport." ) ,
new Param ( "valB" , new EntityTypes . Float ( - 50f , 50 , 1 ) , "Height" , "Set the height of the viewport." ) ,
2024-01-15 02:04:10 +00:00
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." ) ,
new Param ( "axis" , StaticCamera . ViewAxis . All , "Axis" , "Set if only a specific axis should be modified." )
2023-03-11 04:51:22 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new ( "stretch camera" , "Stretch Camera" , "Camera" )
2024-01-15 02:04:10 +00:00
{
resizable = true ,
parameters = new ( )
2023-03-11 04:51:22 +00:00
{
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new ( "x1" , new EntityTypes . Float ( - 50f , 50f , 1f ) , "Start Width" , "Set the width at the start of the event." ) ,
new ( "x2" , new EntityTypes . Float ( - 50f , 50f , 1f ) , "End Width" , "Set the width at the end of the event." ) ,
new ( "y1" , new EntityTypes . Float ( - 50f , 50f , 1f ) , "Start Height" , "Set the height at the start of the event." ) ,
new ( "y2" , new EntityTypes . Float ( - 50f , 50f , 1f ) , "End Height" , "Set the height at the end of the event." ) ,
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "x1" , "y1" } )
} ) ,
new Param ( "axis" , GameCamera . CameraAxis . All , "Axis" , "Set if only a specific axis should be modified." )
2023-03-11 04:51:22 +00:00
}
2024-01-15 02:04:10 +00:00
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "fitScreen" , "Force Game Stretching To Window" , "Camera" )
2024-01-15 02:04:10 +00:00
{
defaultLength = 0.5f ,
parameters = new ( )
2023-03-11 04:51:22 +00:00
{
2024-01-15 02:04:10 +00:00
new ( "enable" , true , "Enabled" , "Toggle if the game should be forced to stretch to the window size, removing the letterbox." )
2023-03-11 04:51:22 +00:00
}
2024-01-15 02:04:10 +00:00
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "screen shake" , "Screen Shake" , "Camera" , 1f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "easedA" , new EntityTypes . Float ( 0 , 10 , 0 ) , "Start Horizontal Intensity" , "Set the horizontal intensity of the screen shake at the start of the event." ) ,
new Param ( "valA" , new EntityTypes . Float ( 0 , 10 , 0 ) , "End Horizontal Intensity" , "Set the horizontal intensity of the screen shake at the end of the event." ) ,
new Param ( "easedB" , new EntityTypes . Float ( 0 , 10 , 0.5f ) , "Start Vertical Intensity" , "Set the vertical intensity of the screen shake at the start of the event." ) ,
new Param ( "valB" , new EntityTypes . Float ( 0 , 10 , 0.5f ) , "End Vertical Intensity" , "Set the vertical intensity of the screen shake at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "easedA" , "easedB" } )
} ) ,
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "display textbox" , "Display Textbox" , "Text" , 1f , true , new List < Param > ( )
2022-08-20 23:03:51 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "text1" , "" , "Text" , "Set the text to display in the textbox. Rich text is supported." ) ,
new Param ( "type" , Games . Global . Textbox . TextboxAnchor . TopMiddle , "Anchor" , "Set where to anchor the textbox." ) ,
new Param ( "valA" , new EntityTypes . Float ( 0.25f , 4 , 1 ) , "Width" , "Set the width of the textbox." ) ,
new Param ( "valB" , new EntityTypes . Float ( 0.5f , 8 , 1 ) , "Height" , "Set the height of the textbox." )
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "display open captions" , "Display Open Captions" , "Text" , 1f , true ,
2023-09-11 22:28:04 +00:00
new List < Param > ( )
2022-08-20 23:03:51 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "text1" , "" , "Text" , "Set the text to display in the captions. Rich text is supported." ) ,
new Param ( "type" , Games . Global . Textbox . TextboxAnchor . BottomMiddle , "Anchor" , "Set where to anchor the captions." ) ,
new Param ( "valA" , new EntityTypes . Float ( 0.25f , 4 , 1 ) , "Width" , "Set the width of the captions." ) ,
new Param ( "valB" , new EntityTypes . Float ( 0.5f , 8 , 1 ) , "Height" , "Set the height of the captions." )
2023-09-11 22:28:04 +00:00
}
2022-08-20 23:03:51 +00:00
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "display closed captions" , "Display Closed Captions" , "Text" , 1f , true ,
2023-09-11 22:28:04 +00:00
new List < Param > ( )
2022-08-20 23:03:51 +00:00
{
2024-01-15 02:04:10 +00:00
new Param ( "text1" , "" , "Text" , "Set the text to display in the captions. Rich text is supported." ) ,
new Param ( "type" , Games . Global . Textbox . ClosedCaptionsAnchor . Top , "Anchor" , "Set where to anchor the captions." ) ,
new Param ( "valA" , new EntityTypes . Float ( 0.5f , 4 , 1 ) , "Height" , "Set the height of the captions." )
2022-08-20 23:03:51 +00:00
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "display song artist" , "Display Song Info" , "Text" , 1f , true ,
2022-08-20 23:03:51 +00:00
new List < Param > ( )
{
2024-01-15 02:04:10 +00:00
new Param ( "text1" , "" , "Title" , "Set the text to display in the upper label. Rich text is supported." ) ,
new Param ( "text2" , "" , "Artist" , "Set the text to display in the lower label. Rich text is supported." ) ,
new Param ( "instantOn" , false , "Instant Show" , "Toggle if the slide-in animation should be skipped." ) ,
new Param ( "instantOff" , false , "Instant Hide" , "Toggle if the slide-out animation should be skipped." ) ,
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "camera background color" , "Camera Background Color" , "Camera" , 1 , true , new List < Param > ( )
2024-01-15 02:04:10 +00:00
{
new Param ( "color" , Color . black , "Start Color" , "Set the color at the start of the event." ) ,
new Param ( "color2" , Color . black , "End Color" , "Set the color at the end of the event." ) ,
new Param ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." )
2022-08-20 23:03:51 +00:00
}
) ,
2023-11-23 21:31:23 +00:00
// Post Processing VFX
2024-05-08 19:26:43 +00:00
new GameAction ( "vignette" , "Vignette" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-04-17 22:01:46 +00:00
new ( "intenStart" , new EntityTypes . Float ( 0f , 20f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 20f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "colorStart" , Color . black , "Start Color" , "Set the color at the start of the event." ) ,
new ( "colorEnd" , Color . black , "End Color" , "Set the color at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-04-17 22:01:46 +00:00
new ( "xLocStart" , new EntityTypes . Float ( 0.0f , 1f , 0.5f ) , "Start X Location" , "Set the X location at the start of the event." ) ,
new ( "xLocEnd" , new EntityTypes . Float ( 0.0f , 1f , 0.5f ) , "End X Location" , "Set the X location at the end of the event." ) ,
new ( "yLocStart" , new EntityTypes . Float ( 0.0f , 1f , 0.5f ) , "Start Y Location" , "Set the Y location at the start of the event." ) ,
new ( "yLocEnd" , new EntityTypes . Float ( 0.0f , 1f , 0.5f ) , "End Y Location" , "Set the Y location at the end of the event." ) ,
2024-01-15 02:04:10 +00:00
new ( "smoothStart" , new EntityTypes . Float ( 0.01f , 1f , 0.2f ) , "Start Smoothness" , "Set the smoothness at the start of the event." ) ,
new ( "smoothEnd" , new EntityTypes . Float ( 0.01f , 1f , 0.2f ) , "End Smoothness" , "Set the smoothness at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "roundStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start Roundness" , "Set the roundness at the start of the event." ) ,
new ( "roundEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End Roundness" , "Set the roundness at the end of the event." ) ,
new ( "rounded" , false , "Rounded" , "Toggle if the vignette should be equal on all sides." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
2024-04-17 22:01:46 +00:00
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "colorStart" , "smoothStart" , "roundStart" , "xLocStart" , "yLocStart" } )
2023-11-23 21:31:23 +00:00
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "cabb" , "Chromatic Aberration" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "bloom" , "Bloom" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "intenStart" , new EntityTypes . Float ( 0f , 100f , 0f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 100f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "colorStart" , Color . white , "Start Tint" , "Set the tint at the start of the event." ) ,
new ( "colorEnd" , Color . white , "End Tint" , "Set the tint at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "thresholdStart" , new EntityTypes . Float ( 0f , 100f , 1f ) , "Start Threshold" , "Set the threshold at the start of the event." ) ,
new ( "thresholdEnd" , new EntityTypes . Float ( 0f , 100f , 1f ) , "End Threshold" , "Set the threshold at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "softKneeStart" , new EntityTypes . Float ( 0f , 1f , 0.5f ) , "Start Soft Knee" , "Set the soft knee at the start of the event." ) ,
new ( "softKneeEnd" , new EntityTypes . Float ( 0f , 1f , 0.5f ) , "End Soft Knee" , "Set the soft knee at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "anaStart" , new EntityTypes . Float ( - 1f , 1f , 0f ) , "Start Anamorphic Ratio" , "Set the anamorphic ratio at the start of the event." ) ,
new ( "anaEnd" , new EntityTypes . Float ( - 1f , 1f , 0f ) , "End Anamorphic Ratio" , "Set the anamorphic ratio at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "colorStart" , "thresholdStart" , "softKneeStart" , "anaStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "lensD" , "Lens Distortion" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "intenStart" , new EntityTypes . Float ( - 100f , 100f , 0f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( - 100f , 100f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "xStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start X Multiplier" , "Set the X multiplier at the start of the event." ) ,
new ( "xEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End X Multiplier" , "Set the X multiplier at the end of the event." ) ,
new ( "yStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start Y Multiplier" , "Set the Y multiplier at the start of the event." ) ,
new ( "yEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End Y Multiplier" , "Set the Y multiplier at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "xStart" , "yStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "grain" , "Grain" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "sizeStart" , new EntityTypes . Float ( 0.3f , 3f , 1f ) , "Start Size" , "Set the size at the start of the event." ) ,
new ( "sizeEnd" , new EntityTypes . Float ( 0.3f , 3f , 1f ) , "End Size" , "Set the size at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "colored" , true , "Colored" , "Toggle if the grain will be colored." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "sizeStart" } )
} ) ,
}
} ,
2024-03-11 21:21:51 +00:00
2024-05-08 19:26:43 +00:00
new GameAction ( "colorGrading" , "Color Grading" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "tempStart" , new EntityTypes . Float ( - 100f , 100f ) , "Start Temperature" , "Set the temperature at the start of the event." ) ,
new ( "tempEnd" , new EntityTypes . Float ( - 100f , 100f ) , "End Temperature" , "Set the temperature at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "tintStart" , new EntityTypes . Float ( - 100f , 100f ) , "Start Tint" , "Set the tint at the start of the event." ) ,
new ( "tintEnd" , new EntityTypes . Float ( - 100f , 100f ) , "End Tint" , "Set the tint at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "colorStart" , Color . white , "Start Color Filter" , "Set the color filter at the start of the event." ) ,
new ( "colorEnd" , Color . white , "End Color Filter" , "Set the color filter at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "hueShiftStart" , new EntityTypes . Float ( - 180f , 180f ) , "Start Hue Shift" , "Set the hue shift at the start of the event." ) ,
new ( "hueShiftEnd" , new EntityTypes . Float ( - 180f , 180f ) , "End Hue Shift" , "Set the hue shift at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "satStart" , new EntityTypes . Float ( - 100f , 100f ) , "Start Saturation" , "Set the saturation at the start of the event." ) ,
new ( "satEnd" , new EntityTypes . Float ( - 100f , 100f ) , "End Saturation" , "Set the saturation at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "brightStart" , new EntityTypes . Float ( - 100f , 100f ) , "Start Brightness" , "Set the brightness at the start of the event." ) ,
new ( "brightEnd" , new EntityTypes . Float ( - 100f , 100f ) , "End Brightness" , "Set the brightness at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "conStart" , new EntityTypes . Float ( - 100f , 100f ) , "Start Contrast" , "Set the contrast at the start of the event." ) ,
new ( "conEnd" , new EntityTypes . Float ( - 100f , 100f ) , "End Contrast" , "Set the contrast at the end of the event." ) ,
2023-11-23 21:31:23 +00:00
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "tempStart" , "tintStart" , "colorStart" , "hueShiftStart" , "satStart" , "brightStart" , "conStart" } )
} ) ,
}
} ,
2024-03-11 21:21:51 +00:00
2024-05-08 19:26:43 +00:00
new GameAction ( "gaussBlur" , "Gaussian Blur" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
new ( "intenStart" , new EntityTypes . Float ( 0f , 5f , 0f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 5f , 1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
2024-04-09 14:47:19 +00:00
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" } )
2024-03-11 21:21:51 +00:00
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "pixelQuad" , "Pixelize" , "VFX" )
{
resizable = true ,
parameters = new ( )
{
new ( "pixelSizeStart" , new EntityTypes . Float ( 0.00f , 1f , 0.00f ) , "Start Pixel Size" , "Set the pixel size at the start of the event." ) ,
new ( "pixelSizeEnd" , new EntityTypes . Float ( 0.00f , 1f , 0.5f ) , "End Pixel Size" , "Set the pixel size at the end of the event." ) ,
new ( "ratioStart" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "Start Pixel Ratio" , "Set the pixel ratio at the start of the event." ) ,
2024-04-28 02:45:33 +00:00
new ( "ratioEnd" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "End Pixel Ratio" , "Set the pixel ratio at the end of the event." ) ,
new ( "xScaleStart" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "Start X Scale" , "Set the X scale of the pixels at the start of the event." ) ,
new ( "xScaleEnd" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "End X Scale" , "Set the X scale of the pixels at the end of the event." ) ,
new ( "yScaleStart" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "Start Y Scale" , "Set the Y scale of the pixels at the start of the event." ) ,
new ( "yScaleEnd" , new EntityTypes . Float ( 0.2f , 5f , 1f ) , "End Y Scale" , "Set the Y scale of the pixels at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "pixelSizeStart" , "ratioStart" , "xScaleStart" , "yScaleStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "retroTv" , "Retro TV" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Distortion" , "Set the distortion at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 0.2f ) , "End Distortion" , "Set the distortion at the end of the event." ) ,
new ( "rgbStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start RGB Blend" , "Set the RGB blend at the start of the event." ) ,
new ( "rgbEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End RGB Blend" , "Set the RGB blend at the end of the event." ) ,
2024-04-17 22:01:46 +00:00
new ( "bottomStart" , new EntityTypes . Float ( 0f , 1f , 0.02f ) , "Start Bottom Collapse" , "Set the bottom collapse at the start of the event." ) ,
2024-03-11 21:21:51 +00:00
new ( "bottomEnd" , new EntityTypes . Float ( 0f , 1f , 0.02f ) , "End Bottom Collapse" , "Set the bottom collapse at the end of the event." ) ,
2024-04-17 22:01:46 +00:00
new ( "noiseStart" , new EntityTypes . Float ( 0f , 1f , 0.3f ) , "Start Noise" , "Set the noise at the start of the event." ) ,
2024-08-29 18:45:21 +00:00
new ( "noiseEnd" , new EntityTypes . Float ( 0f , 1f , 0.3f ) , "End Noise" , "Set the noise at the end of the event." ) ,
new ( "HSonVHS" , false , "VHS Effects" , "Toggle if VHS effects are enabled." , new ( )
{
new Param . CollapseParam ( ( x , _ ) = > ( bool ) x , new string [ ] { "bleedIntStart" , "bleedIntEnd" , "bleedIteration" , "vhsGrainStart" , "vhsGrainEnd" ,
"grainScaleStart" , "grainScaleEnd" , "stripeDenStart" , "stripeDenEnd" , "stripeOpacStart" , "stripeOpacEnd" , "edgeIntStart" , "edgeIntEnd" , "edgeDistStart" , "edgeDistEnd"
} )
}
) ,
new ( "bleedIntStart" , new EntityTypes . Float ( 0f , 1f , 0.5f ) , "Start Bleed" , "Set the color bleeding at the start of the event." ) ,
new ( "bleedIntEnd" , new EntityTypes . Float ( 0f , 1f , 0.5f ) , "End Bleed" , "Set the color bleeding at the end of the event." ) ,
new ( "bleedIteration" , new EntityTypes . Integer ( 2 , 8 , 2 ) , "Bleed Iterations" , "Sets the amount of iterations of color bleeding." ) ,
new ( "vhsGrainStart" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "Start Grain" , "Sets the intensity of the grain at the start of the event. Grain looks different than the Grain block." ) ,
new ( "vhsGrainEnd" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "End Grain" , "Sets the intensity of the grain at the end of the event. Grain looks different than the Grain block." ) ,
new ( "grainScaleStart" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "Start Grain Scale" , "Sets the size of the grain at the start of the event.Grain looks different than the Grain block." ) ,
new ( "grainScaleEnd" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "End Grain Scale" , "Sets the size of the grain at the end of the event.Grain looks different than the Grain block." ) ,
new ( "stripeDenStart" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "Start Stripe Density" , "Set the stripe density at the start of the event." ) ,
new ( "stripeDenEnd" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "End Stripe Density" , "Set the stripe density at the end of the event." ) ,
new ( "stripeOpacStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start Stripe Opacity" , "Set the stripe opacity at the start of the event." ) ,
new ( "stripeOpacEnd" , new EntityTypes . Float ( 0f , 1f , 1f ) , "End Stripe Opacity" , "Set the stripe opacity at the end of the event." ) ,
new ( "edgeIntStart" , new EntityTypes . Float ( 0f , 2f , 0.5f ) , "Start Edge Sharpness" , "Set the edge sharpness at the start of the event." ) ,
new ( "edgeIntEnd" , new EntityTypes . Float ( 0f , 2f , 0.5f ) , "End Edge Sharpness" , "Set the edge sharpness at the end of the event." ) ,
new ( "edgeDistStart" , new EntityTypes . Float ( 0f , 0.005f , 0.002f ) , "Start Edge Distance" , "Set the edge sharpness at the start of the event." ) ,
new ( "edgeDistEnd" , new EntityTypes . Float ( 0f , 0.005f , 0.002f ) , "End Edge Distance" , "Set the edge sharpness at the end of the event." ) ,
2024-03-11 21:21:51 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
2024-08-29 18:45:21 +00:00
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "rgbStart" , "bottomStart" , "noiseStart" ,
"bleedIntStart" , "vhsGrainStart" , "grainScaleStart" , "stripeDenStart" , "stripeOpacStart" , "edgeIntStart" , "edgeDistStart" } )
2024-03-11 21:21:51 +00:00
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "scanJitter" , "Scan Line Jitter" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "analogNoise" , "Analog Noise" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Speed" , "Set the speed at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 0.5f ) , "End Speed" , "Set the speed at the end of the event." ) ,
new ( "fadingStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Fading" , "Set the fading at the start of the event." ) ,
new ( "fadingEnd" , new EntityTypes . Float ( 0f , 1f , 0.1f ) , "End Fading" , "Set the fading at the end of the event." ) ,
new ( "thresholdStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Threshold" , "Set the threshold at the start of the event." ) ,
new ( "thresholdEnd" , new EntityTypes . Float ( 0f , 1f , 0.8f ) , "End Threshold" , "Set the threshold at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "fadingStart" , "thresholdStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "screenJump" , "Screen Jump" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
new ( "intenStart" , new EntityTypes . Float ( 0f , 1f , 0f ) , "Start Intensity" , "Set the intensity at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0f , 1f , 0.01f ) , "End Intensity" , "Set the intensity at the end of the event." ) ,
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "sobelNeon" , "Neon" , "VFX" )
2024-03-11 21:21:51 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-04-17 22:01:46 +00:00
new ( "intenStart" , new EntityTypes . Float ( 0.0f , 1f , 0.0f ) , "Start Intensity" , "Set the edge fade at the start of the event." ) ,
new ( "intenEnd" , new EntityTypes . Float ( 0.0f , 1f , 1f ) , "End Intensity" , "Set the edge fade at the end of the event." ) ,
2024-03-11 21:21:51 +00:00
2024-04-17 22:01:46 +00:00
new ( "edgeWidthStart" , new EntityTypes . Float ( 0.00f , 5f , 0.0f ) , "Start Edge Width" , "Set the edge width at the start of the event." ) ,
new ( "edgeWidthEnd" , new EntityTypes . Float ( 0.00f , 5f , 2f ) , "End Edge Width" , "Set the edge width at the end of the event." ) ,
2024-03-11 21:21:51 +00:00
2024-04-17 22:01:46 +00:00
new ( "bgFadeStart" , new EntityTypes . Float ( 0f , 1f , 1f ) , "Start Background Presence" , "Set the background presence at the start of the event." ) ,
2024-03-11 21:21:51 +00:00
new ( "bgFadeEnd" , new EntityTypes . Float ( 0f , 1f , 0f ) , "End Background Presence" , "Set the background presence at the end of the event." ) ,
2024-04-17 22:01:46 +00:00
new ( "brightnessStart" , new EntityTypes . Float ( 0f , 2f , 1f ) , "Start Brightness" , "Set the brightness at the start of the event." ) ,
2024-03-11 21:21:51 +00:00
new ( "brightnessEnd" , new EntityTypes . Float ( 0f , 2f , 1f ) , "End Brightness" , "Set the brightness at the end of the event." ) ,
2024-04-17 22:01:46 +00:00
2024-03-11 21:21:51 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "intenStart" , "edgeWidthStart" , "bgFadeStart" , "brightnessStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "screenTiling" , "Tile Screen" , "VFX" )
2023-11-23 21:31:23 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-04-08 18:44:05 +00:00
new ( "xStart" , new EntityTypes . Float ( 1 , 100 , 1 ) , "Start Horizontal Tiles" , "Set the number of horizontal tiles at the start of the event." ) ,
new ( "xEnd" , new EntityTypes . Float ( 1 , 100 , 1 ) , "End Horizontal Tiles" , "Set the number of horizontal tiles at the end of the event." ) ,
new ( "yStart" , new EntityTypes . Float ( 1 , 100 , 1 ) , "Start Vertical Tiles" , "Set the number of vertical tiles at the start of the event." ) ,
new ( "yEnd" , new EntityTypes . Float ( 1 , 100 , 1 ) , "End Vertical Tiles" , "Set the number of vertical tiles at the end of the event." ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new ( "axis" , StaticCamera . ViewAxis . All , "Axis" , "Set if only a specific axis should be modified." ) ,
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-24 22:49:59 +00:00
{
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "xStart" , "yStart" } )
} ) ,
}
} ,
2024-05-08 19:26:43 +00:00
new GameAction ( "scrollTiles" , "Scroll Tiles" , "VFX" )
2023-11-24 22:49:59 +00:00
{
resizable = true ,
parameters = new ( )
{
2024-01-15 02:04:10 +00:00
new ( "xScrollStart" , new EntityTypes . Float ( - 100 , 100 , 0 ) , "Start Horizontal Scroll" , "Set the horizontal scroll at the start of the event." ) ,
new ( "xScrollEnd" , new EntityTypes . Float ( - 100 , 100 , 0 ) , "End Horizontal Scroll" , "Set the horizontal scroll at the end of the event." ) ,
new ( "yScrollStart" , new EntityTypes . Float ( - 100 , 100 , 0 ) , "Start Vertical Scroll" , "Set the vertical scroll at the start of the event." ) ,
new ( "yScrollEnd" , new EntityTypes . Float ( - 100 , 100 , 0 ) , "End Vertical Scroll" , "Set the vertical scroll at the end of the event." ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new ( "axis" , StaticCamera . ViewAxis . All , "Axis" , "Set if only a specific axis should be modified." ) ,
2024-01-15 02:04:10 +00:00
new ( "ease" , Util . EasingFunction . Ease . Linear , "Ease" , "Set the easing of the action." , new ( )
2023-11-23 21:31:23 +00:00
{
2023-11-24 22:49:59 +00:00
new ( ( x , y ) = > ( Util . EasingFunction . Ease ) x ! = Util . EasingFunction . Ease . Instant , new string [ ] { "xScrollStart" , "yScrollStart" } )
2023-11-23 21:31:23 +00:00
} ) ,
}
2024-03-11 21:21:51 +00:00
} ,
2022-06-04 03:15:05 +00:00
} ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new Minigame ( "advanced" , "Advanced" , "" , false , true , new List < GameAction > ( )
{
2024-05-08 19:26:43 +00:00
new GameAction ( "play animation" , "Play Animation" , "Play" , 0.5f , false ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new List < Param > ( )
{
new Param ( "getAnimators" , new EntityTypes . Button ( "No Game" , e = > {
var gm = GameManager . instance ;
Minigame game = gm . GetGameInfo ( gm . currentGame ) ;
if ( game ! = null ) {
2024-02-26 17:46:30 +00:00
Animator [ ] animators = gm . minigameObj . transform . GetComponentsInChildren < Animator > ( ) ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
// not in an update loop so it's fine :3
( ( EntityTypes . DropdownObj ) e [ "animator" ] ) . SetValues ( animators . Select ( anim = > {
2024-02-26 17:46:30 +00:00
Transform obj = anim . transform ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
List < string > path = new ( ) { obj . name } ;
2024-02-26 17:46:30 +00:00
for ( int i = 0 ; i < 10 ; i + + ) // not a while loop because i don't trust myself
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
{
2024-02-26 17:46:30 +00:00
if ( obj . parent . name = = game . name | | obj . parent = = null ) break ;
obj = obj . parent ;
path . Insert ( 0 , obj . name ) ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
}
return string . Join ( '/' , path ) ;
} ) . ToList ( ) ) ;
}
return game ? . displayName ? ? "No Game" ;
} ) , "Get Animators" , "Get all the animators in the current minigame scene. (Make sure to have the minigame you want loaded!)" , new ( ) {
new ( ( x , _ ) = > ( string ) x ! = "No Game" , "animator" , "getAnimations" )
} ) ,
new Param ( "animator" , new EntityTypes . Dropdown ( ) , "Animator" , "Specify which animator in the scene to play an animation on." ) ,
new Param ( "getAnimations" , new EntityTypes . Button ( "" , e = > {
var gm = GameManager . instance ;
Minigame game = gm . GetGameInfo ( gm . currentGame ) ;
string animPath = ( ( EntityTypes . DropdownObj ) e [ "animator" ] ) . CurrentValue ;
Animator animator = null ;
if ( ! string . IsNullOrEmpty ( animPath ) ) {
var animObj = gm . minigameObj . transform . Find ( animPath ) ;
if ( animObj ! = null & & animObj . TryGetComponent ( out animator ) & & animator ! = null ) {
List < string > animationClips = new ( ) ;
foreach ( var clip in animator . runtimeAnimatorController . animationClips ) {
if ( clip ! = null ) {
animationClips . Add ( clip . name ) ;
}
}
( ( EntityTypes . DropdownObj ) e [ "animation" ] ) . SetValues ( animationClips ) ;
}
}
return animator ! = null ? animator . name : "" ;
} ) , "Get Animations" , "Get all the animations in the selected animator." , new ( ) {
new ( ( x , _ ) = > ( string ) x ! = "" , "animation" , "scale" )
} ) ,
new Param ( "animation" , new EntityTypes . Dropdown ( ) , "Animation" , "Specify the name of the animation to play." ) ,
new Param ( "scale" , new EntityTypes . Float ( 0 , 5 , 0.5f ) , "Animation Scale" , "The time scale of the animation. Higher values are faster." ) ,
} ,
delegate {
var e = eventCaller . currentEntity ;
GameManager . instance . PlayAnimationArbitrary ( e [ "animator" ] . CurrentValue , e [ "animation" ] . CurrentValue , e [ "scale" ] ) ;
}
) ,
2024-05-08 19:26:43 +00:00
new GameAction ( "play sfx" , "Play SFX" , "Play" , 0.5f , true ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new List < Param > ( )
{
new Param ( "game" , new EntityTypes . Dropdown ( ) , "Which Game" , "Specify the game's sfx to play. An empty input will play global sfx." ) ,
new Param ( "getSfx" , new EntityTypes . Button ( "" , e = > {
string gameName = ( ( EntityTypes . DropdownObj ) e [ "game" ] ) . CurrentValue ;
List < string > clips ;
if ( eventCaller . minigames . TryGetValue ( gameName , out Minigame game ) & & game ! = null ) {
2024-04-10 05:05:47 +00:00
IEnumerable < AudioClip > audioClips = game . GetResourcesAssetBundle ( ) . LoadAllAssets < AudioClip > ( ) ;
var localAssBun = game . GetAudioAssetBundle ( ) ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
if ( localAssBun ! = null ) {
audioClips = audioClips . Concat ( localAssBun . LoadAllAssets < AudioClip > ( ) ) ;
}
clips = audioClips . Select ( x = > x . name ) . ToList ( ) ;
} else {
// this is probably the best way to do it?
clips = new ( ) { "applause" , "metronome" , "miss" , "nearMiss" , "perfectMiss" , "skillStar" } ;
}
clips . Sort ( ( s1 , s2 ) = > s1 . CompareTo ( s2 ) ) ;
EntityTypes . DropdownObj sfxDD = e [ "sfxName" ] ;
sfxDD . SetValues ( clips ) ;
return clips . Count > 0 ? ( game ! = null ? game . displayName : "Common" ) : "Empty!" ;
} ) , "Get SFX" , "Get all the sfx in the selected minigame." ) ,
new Param ( "sfxName" , new EntityTypes . Dropdown ( ) , "SFX Name" , "The name of the sfx to play." ) ,
new Param ( "useSemitones" , false , "Use Semitones" , "Toggle to use semitones instead of straight pitch." , new ( ) {
2024-02-26 17:46:30 +00:00
new ( ( x , e ) = > ( bool ) x , "semitones" , "cents" ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new ( ( x , e ) = > ! ( bool ) x , "pitch" ) ,
} ) ,
2024-03-22 01:37:41 +00:00
new Param ( "semitones" , new EntityTypes . Integer ( - EntityTypes . Note . maxSemitones , EntityTypes . Note . maxSemitones , 0 ) , "Semitones" , "The semitones of the sfx." ) ,
2024-02-26 17:46:30 +00:00
new Param ( "cents" , new EntityTypes . Integer ( - 100 , 100 , 0 ) , "Cents" , "The cents of the sfx." ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new Param ( "pitch" , new EntityTypes . Float ( 0 , 5 , 1 ) , "Pitch" , "The pitch of the sfx." ) ,
2024-05-08 19:26:43 +00:00
new Param ( "volume" , new EntityTypes . Float ( 0 , 5 , 1 ) , "Volume" , "The volume of the sfx." ) ,
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
new Param ( "offset" , new EntityTypes . Integer ( - 500 , 500 ) , "Offset (ms)" , "The offset of the sfx in milliseconds." ) ,
new Param ( "loop" , false , "Loop" , "Loop the sfx for the length of the block." ) ,
} ,
preFunction : delegate {
var e = eventCaller . currentEntity ;
2024-02-26 17:46:30 +00:00
float pitch = e [ "pitch" ] ;
if ( e [ "useSemitones" ] ) pitch = SoundByte . GetPitchFromCents ( ( e [ "semitones" ] * 100 ) + e [ "cents" ] , false ) ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
GameManager . PlaySFXArbitrary ( e . beat , e . length , e [ "game" ] . CurrentValue , e [ "sfxName" ] . CurrentValue , pitch , e [ "volume" ] , e [ "loop" ] , e [ "offset" ] ) ;
}
) ,
} ) ,
2022-01-17 19:23:18 +00:00
} ;
2022-06-04 03:15:05 +00:00
2024-01-08 06:38:05 +00:00
foreach ( var game in defaultGames )
{
eventCaller . minigames . Add ( game . name , game ) ;
}
2024-01-19 00:56:26 +00:00
LoadMinigames ( eventCaller ) ;
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
// im so sorry
eventCaller . minigames [ "advanced" ] . actions
. Find ( a = > a . actionName = = "play sfx" ) . parameters [ 0 ] . parameter = new EntityTypes . Dropdown ( 0 , new string [ ] { "common" } . Concat ( eventCaller . minigames . Keys . Skip ( defaultGames . Count ) ) . ToArray ( ) ) ;
2022-01-17 19:23:18 +00:00
}
}
Advanced Blocks (#720)
* play sfx and play animation blocks
i also changed prescheduleFunction to preFunction, and removed the unused preFunction argument in GameAction
i can revert this if need be but it just seemed vestigial
* count in rework + preloading, multisound addition
multisound was using an array that was converted to a list..?
very silly when you consider it's a list first so sometimes it's list -> array -> list lol
new Count-In and Play SFX block preloads sfx now!! epic.
* prefab-ify event properties, Button EntityType
* things are very nearly working!
however i just hit an insane hurdle. how do i modify a dropdown while still being able to access the index/int value of that param directly. UGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
* okay it's WORKING now
i just need to do some better dropdown stuff
* ITS WORKING ITS WORKING ITS WORKING
arbitrary animations, now accessible to those without prefab knowledge! and it's piss easy to use!!
* about to make a struct + class, tooltip improvements
gonna make the struct define it, then the class will actually be the dropdown
this is gonna make things so so so so much easier to comprehend
* finishing up, probably one more commit after this
* split up Dropdown into Dropdown and DropdownObj, which basically fixed all of my problems lol
* fixed a count bug
* added param tooltip toggle
* grah it's ALMOST DONE
* it's 99.9% finished.
just some touch ups, i don't think i even know of any bugs
* alright, looks like that's all the bugs gone
* EVERYTHING IS FINISHED!!
2024-02-26 01:46:23 +00:00
}