2022-08-26 08:29:26 +00:00
//notes:
2023-02-07 17:17:40 +00:00
// BEFORE NEW PROPS
// - minenice will also use this to test out randomly named parameters so coding has to rest until the new props update [DONE]
// - see fan club for separate prefabs (cadets) [DONE]
// - temporarily take sounds from rhre, wait until someone records the full code, including misses, or record it myself (unlikely) [IN PROGRESS]
// AFTER NEW PROPS
// - testmod marching orders using speed
2022-09-06 06:41:13 +00:00
// - see space soccer, mr upbeat, tunnel for keep-the-beat codes
// - figure how to do custom bg changes when the upscaled textures are finished (see karate man, launch party once it releases)
// - will use a textbox without going through the visual options but i wonder how..?? (see first contact if ever textboxes are implemented in said minigame)
2022-08-27 04:40:49 +00:00
// AFTER FEATURE COMPLETION
2022-09-06 06:41:13 +00:00
// - delete all notes once the minigame is considered feature-complete
2022-08-26 08:29:26 +00:00
2022-08-24 02:22:20 +00:00
using HeavenStudio.Util ;
using System ;
using System.Collections.Generic ;
2023-02-07 17:17:40 +00:00
using UnityEditor ;
2022-08-24 02:22:20 +00:00
using UnityEngine ;
namespace HeavenStudio.Games.Loaders
{
using static Minigames ;
2022-08-27 04:40:49 +00:00
public static class AgbMarcherLoader
2022-08-24 02:22:20 +00:00
{
public static Minigame AddGame ( EventCaller eventCaller ) {
2022-08-24 12:47:41 +00:00
return new Minigame ( "marchingOrders" , "Marching Orders \n<color=#eb5454>[WIP]</color>" , "00A43B" , false , false , new List < GameAction > ( )
2022-08-24 02:22:20 +00:00
{
2022-09-04 05:55:12 +00:00
new GameAction ( "bop" , "Bop" )
2022-09-10 12:56:26 +00:00
{
2023-02-07 17:17:40 +00:00
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . BopAction ( e . beat , e . length ) ; } ,
2022-09-04 05:55:12 +00:00
defaultLength = 1f ,
2022-09-10 12:56:26 +00:00
resizable = true
} ,
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
new GameAction ( "marching" , "Cadets March" )
{
2023-02-07 17:17:40 +00:00
preFunction = delegate {
var e = eventCaller . currentEntity ;
MarchingOrders . PreMarch ( e . beat , e . length ) ;
} ,
2022-09-06 06:41:13 +00:00
defaultLength = 4f ,
2023-02-07 17:17:40 +00:00
resizable = true ,
2022-09-10 12:56:26 +00:00
} ,
2023-02-07 17:17:40 +00:00
2022-09-04 05:55:12 +00:00
new GameAction ( "attention" , "Attention..." )
2022-09-10 12:56:26 +00:00
{
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . SargeAttention ( e . beat ) ; } ,
2023-02-07 17:17:40 +00:00
defaultLength = 2f ,
preFunction = delegate { var e = eventCaller . currentEntity ; MarchingOrders . AttentionSound ( e . beat ) ; }
2022-09-04 05:55:12 +00:00
} ,
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
new GameAction ( "march" , "March!" )
{
2023-02-07 17:17:40 +00:00
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . SargeMarch ( e . beat , e [ "toggle" ] ) ; } ,
2022-09-10 12:56:26 +00:00
defaultLength = 2f ,
2023-02-07 17:17:40 +00:00
parameters = new List < Param >
{
new Param ( "toggle" , false , "Disable Voice" , "Disable the Drill Sergeant's call" )
} ,
inactiveFunction = delegate { var e = eventCaller . currentEntity ; MarchingOrders . MarchSound ( e . beat , e [ "toggle" ] ) ; }
2022-09-10 12:56:26 +00:00
} ,
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
new GameAction ( "halt" , "Halt!" )
{
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . SargeHalt ( e . beat ) ; } ,
defaultLength = 2f ,
2022-09-06 06:41:13 +00:00
inactiveFunction = delegate { var e = eventCaller . currentEntity ; MarchingOrders . HaltSound ( e . beat ) ; }
2022-09-04 05:55:12 +00:00
} ,
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
new GameAction ( "face turn" , "Direction to Turn" )
2022-09-08 12:38:45 +00:00
{
2023-02-07 17:17:40 +00:00
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . SargeFaceTurn ( e . beat , e [ "type" ] , e [ "type2" ] , false ) ; } ,
2022-09-10 12:56:26 +00:00
defaultLength = 4f ,
parameters = new List < Param > ( )
2022-09-08 12:38:45 +00:00
{
2023-02-07 17:17:40 +00:00
new Param ( "type" , MarchingOrders . DirectionFaceTurn . Right , "Direction" , "The direction the sergeant wants the cadets to face" ) ,
new Param ( "type2" , MarchingOrders . FaceTurnLength . Normal , "Length" , "The duration of the turning event" ) ,
//new Param("toggle", false, "Point", "Do the pointing animation instead of just the head turn")
2022-09-08 12:38:45 +00:00
}
} ,
2023-02-07 17:17:40 +00:00
/ * new GameAction ( "background" , "Set the Background" ) colors aren ' t implemented yet
{
function = delegate { var e = eventCaller . currentEntity ; MarchingOrders . instance . BackgroundColorSet ( e . beat , e [ "type" ] , e [ "type2" ] , e [ "colorDefault" ] , e [ "colorPipe" ] , e [ "colorFloor" ] , e [ "colorFill" ] ) ; } ,
defaultLength = 0.5f ,
parameters = new List < Param > ( )
{
new Param ( "type" , MarchingOrders . BackgroundColor . Blue , "Color" , "The game Background Color" ) ,
new Param ( "type2" , MarchingOrders . BackgroundType . SingleColor , "Color Type" , "The way the color is applied to the background" ) ,
new Param ( "colorDefault" , new Color ( ) , "Wall Color" , "Sets the color of the wall" ) ,
new Param ( "colorPipe" , new Color ( ) , "Pipes Color" , "Sets the color of the pipes" ) ,
new Param ( "colorFloor" , new Color ( ) , "Floor Color" , "Sets the color of the floor and conveyer belt" ) ,
new Param ( "colorFill" , new Color ( ) , "Fill Color" , "Sets the fill color" )
}
} , * /
} , // this cause problems with the background
new List < string > ( ) { "agb" , "normal" } ,
"agbmarcher" , "en" ,
new List < string > ( ) { "en" , "jp" }
) ;
2022-08-24 02:22:20 +00:00
}
}
}
namespace HeavenStudio.Games
{
2023-02-07 17:17:40 +00:00
using Scripts_MarchingOrders ;
2022-08-24 02:22:20 +00:00
public class MarchingOrders : Minigame
{
2023-02-07 17:17:40 +00:00
public static MarchingOrders instance ;
[Header("Sarge")]
2022-08-28 00:45:55 +00:00
public Animator Sarge ;
2022-09-12 15:25:57 +00:00
public Animator Steam ;
2023-02-07 17:17:40 +00:00
[Header("Cadets")]
2022-08-28 00:45:55 +00:00
public Animator Cadet1 ;
public Animator Cadet2 ;
public Animator Cadet3 ;
2022-09-10 12:56:26 +00:00
public Animator CadetPlayer ;
public Animator CadetHead1 ;
public Animator CadetHead2 ;
public Animator CadetHead3 ;
public Animator CadetHeadPlayer ;
2023-02-07 17:17:40 +00:00
[Header("Background")]
public GameObject BGMain1 ;
public SpriteRenderer Background ;
public SpriteRenderer Pipes ;
public SpriteRenderer Floor ;
public SpriteRenderer Wall ;
public SpriteRenderer Conveyor ;
[Header("Color Map")]
public static Color pipesColor ;
public static Color floorColor ;
public static Color wallColor ;
public static Color fillColor ;
[Header("Game Events")]
2022-09-10 12:56:26 +00:00
public GameEvent bop = new GameEvent ( ) ;
public GameEvent noBop = new GameEvent ( ) ;
public GameEvent marching = new GameEvent ( ) ;
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
private int marchOtherCount ;
private int marchPlayerCount ;
private int turnLength ;
2023-02-07 17:17:40 +00:00
private int background ;
private float steamTime ;
private string fastTurn ;
static float wantMarch = float . MaxValue ;
static float wantMarchLength = 0f ;
2022-08-27 04:40:49 +00:00
public enum DirectionFaceTurn
2022-09-10 12:56:26 +00:00
{
2022-08-24 12:47:41 +00:00
Right ,
Left ,
2022-08-27 04:40:49 +00:00
}
public enum FaceTurnLength
2022-09-10 12:56:26 +00:00
{
2022-08-24 12:47:41 +00:00
Normal ,
Fast ,
2022-08-27 04:40:49 +00:00
}
2023-02-07 17:17:40 +00:00
public enum BackgroundColor
{
Blue ,
Yellow ,
Custom ,
}
public enum BackgroundType
{
SingleColor ,
DifferentColor
}
2022-08-24 02:22:20 +00:00
// Start is called before the first frame update
void Awake ( )
{
2022-08-26 08:29:26 +00:00
instance = this ;
2022-08-24 02:22:20 +00:00
}
2023-02-07 17:17:40 +00:00
public void LeftSuccess ( PlayerActionEvent caller , float state )
{
if ( state < = - 1f | | state > = 1f )
{
Jukebox . PlayOneShot ( "nearNiss" ) ;
}
else
Jukebox . PlayOneShotGame ( "marchingOrders/turnActionPlayer" ) ;
CadetHeadPlayer . DoScaledAnimationAsync ( "FaceL" , 0.5f ) ;
}
public void GenericMiss ( PlayerActionEvent caller )
{
Jukebox . PlayOneShot ( "miss" ) ;
Sarge . DoScaledAnimationAsync ( "Anger" , 0.5f ) ;
Steam . DoScaledAnimationAsync ( "Steam" , 0.5f ) ;
}
public void LeftEmpty ( PlayerActionEvent caller ) { }
public void RightSuccess ( PlayerActionEvent caller , float state )
{
if ( state < = - 1f | | state > = 1f )
{
Jukebox . PlayOneShot ( "nearNiss" ) ;
}
else
Jukebox . PlayOneShotGame ( "marchingOrders/turnActionPlayer" ) ;
CadetHeadPlayer . DoScaledAnimationAsync ( "FaceR" , 0.5f ) ;
}
public void RightEmpty ( PlayerActionEvent caller ) { }
public void MarchHit ( PlayerActionEvent caller , float state )
{
if ( state < = - 1f | | state > = 1f )
{
Jukebox . PlayOneShot ( "nearNiss" ) ;
}
else
Jukebox . PlayOneShotGame ( "marchingOrders/stepPlayer" , volume : 0.25f ) ;
marchPlayerCount + + ;
CadetPlayer . DoScaledAnimationAsync ( marchPlayerCount % 2 ! = 0 ? "MarchR" : "MarchL" , 0.5f ) ;
}
public void MarchEmpty ( PlayerActionEvent caller ) { }
public void HaltHit ( PlayerActionEvent caller , float state )
{
if ( state < = - 1f | | state > = 1f )
{
Jukebox . PlayOneShot ( "nearNiss" ) ;
}
else
Jukebox . PlayOneShotGame ( "marchingOrders/stepPlayer" , volume : 0.25f ) ;
CadetPlayer . DoScaledAnimationAsync ( "Halt" , 0.5f ) ;
}
public void HaltEmpty ( PlayerActionEvent caller ) { }
2022-08-24 02:22:20 +00:00
// Update is called once per frame
void Update ( )
{
2022-09-10 12:56:26 +00:00
var cond = Conductor . instance ;
2023-02-07 17:17:40 +00:00
var currBeat = cond . songPositionInBeats ;
if ( cond . songPositionInBeatsAsDouble > = wantMarch )
2022-08-29 14:07:32 +00:00
{
2023-02-07 17:17:40 +00:00
PrepareMarch ( wantMarch , wantMarchLength , true ) ;
wantMarch = float . MaxValue ;
}
if ( cond . ReportBeat ( ref bop . lastReportedBeat , bop . startBeat % 1 , true ) )
{
if ( currBeat > = bop . startBeat & & currBeat < bop . startBeat + bop . length )
2022-08-29 14:07:32 +00:00
{
2023-02-07 17:17:40 +00:00
Cadet1 . DoScaledAnimationAsync ( "Bop" , 0.5f ) ;
Cadet2 . DoScaledAnimationAsync ( "Bop" , 0.5f ) ;
Cadet3 . DoScaledAnimationAsync ( "Bop" , 0.5f ) ;
CadetPlayer . DoScaledAnimationAsync ( "Bop" , 0.5f ) ;
2022-08-29 14:07:32 +00:00
}
}
2023-02-07 17:17:40 +00:00
if ( ! IsExpectingInputNow ( InputType . STANDARD_DOWN ) )
2022-09-06 06:41:13 +00:00
{
2023-02-07 17:17:40 +00:00
if ( PlayerInput . Pressed ( ) )
2022-09-06 06:41:13 +00:00
{
2023-02-07 17:17:40 +00:00
Jukebox . PlayOneShot ( "miss" ) ;
Sarge . DoScaledAnimationAsync ( "Anger" , 0.5f ) ;
Steam . DoScaledAnimationAsync ( "Steam" , 0.5f ) ;
marchPlayerCount + + ;
var marchPlayerAnim = ( marchPlayerCount % 2 ! = 0 ? "MarchR" : "MarchL" ) ;
2022-09-08 09:13:21 +00:00
2023-02-07 17:17:40 +00:00
CadetPlayer . DoScaledAnimationAsync ( marchPlayerAnim , 0.5f ) ;
2022-09-06 06:41:13 +00:00
}
}
2023-02-07 17:17:40 +00:00
if ( ! IsExpectingInputNow ( InputType . STANDARD_ALT_DOWN ) )
2022-08-28 12:53:13 +00:00
{
2023-02-07 17:17:40 +00:00
if ( PlayerInput . AltPressed ( ) )
{
Jukebox . PlayOneShot ( "miss" ) ;
Sarge . DoScaledAnimationAsync ( "Anger" , 0.5f ) ;
Steam . DoScaledAnimationAsync ( "Steam" , 0.5f ) ;
2022-09-12 15:25:57 +00:00
2023-02-07 17:17:40 +00:00
CadetPlayer . DoScaledAnimationAsync ( "Halt" , 0.5f ) ;
}
}
if ( ! IsExpectingInputNow ( InputType . DIRECTION_LEFT_DOWN ) )
{
if ( PlayerInput . Pressed ( true ) & & PlayerInput . GetSpecificDirection ( PlayerInput . LEFT ) )
{
Jukebox . PlayOneShot ( "miss" ) ;
Sarge . DoScaledAnimationAsync ( "Anger" , 0.5f ) ;
Steam . DoScaledAnimationAsync ( "Steam" , 0.5f ) ;
CadetHeadPlayer . DoScaledAnimationAsync ( "FaceL" , 0.5f ) ;
}
}
if ( ! IsExpectingInputNow ( InputType . DIRECTION_RIGHT_DOWN ) )
{
if ( PlayerInput . Pressed ( true ) & & PlayerInput . GetSpecificDirection ( PlayerInput . RIGHT ) )
{
Jukebox . PlayOneShot ( "miss" ) ;
Sarge . DoScaledAnimationAsync ( "Anger" , 0.5f ) ;
Steam . DoScaledAnimationAsync ( "Steam" , 0.5f ) ;
CadetHeadPlayer . DoScaledAnimationAsync ( "FaceR" , 0.5f ) ;
}
2022-08-28 12:53:13 +00:00
}
2022-08-24 02:22:20 +00:00
}
2023-02-07 17:17:40 +00:00
public void BopAction ( float beat , float length )
2022-08-28 05:38:49 +00:00
{
2022-08-29 14:07:32 +00:00
bop . length = length ;
bop . startBeat = beat ;
2022-08-28 05:38:49 +00:00
}
2023-02-07 17:17:40 +00:00
public static void PreMarch ( float beat , float length )
2022-08-27 04:40:49 +00:00
{
2023-02-07 17:17:40 +00:00
wantMarch = beat - 1 ;
wantMarchLength = length ;
2022-08-27 04:40:49 +00:00
}
2023-02-07 17:17:40 +00:00
public void PrepareMarch ( float beat , float length = 0 , bool first = false )
2022-08-27 04:40:49 +00:00
{
2023-02-07 17:17:40 +00:00
if ( GameManager . instance . currentGame ! = "marchingOrders" )
return ;
if ( first )
{
marching . length = length ;
marching . startBeat = beat + 1 ;
marchOtherCount = 0 ;
marchPlayerCount = 0 ;
}
else
{
marchOtherCount + + ;
Cadet1 . DoScaledAnimationAsync ( marchOtherCount % 2 ! = 0 ? "MarchR" : "MarchL" , 0.5f ) ;
Cadet2 . DoScaledAnimationAsync ( marchOtherCount % 2 ! = 0 ? "MarchR" : "MarchL" , 0.5f ) ;
Cadet3 . DoScaledAnimationAsync ( marchOtherCount % 2 ! = 0 ? "MarchR" : "MarchL" , 0.5f ) ;
}
if ( beat + 1 < marching . startBeat + marching . length )
{
Debug . Log ( $"PrepareMarch next {beat + 1}, {marching.startBeat}, {marching.length}" ) ;
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
2022-08-28 00:45:55 +00:00
{
2023-02-07 17:17:40 +00:00
new BeatAction . Action ( beat + 1f , delegate {
PrepareMarch ( beat + 1 ) ;
MultiSound . Play ( new MultiSound . Sound [ ] {
new MultiSound . Sound ( "marchingOrders/stepOther" , beat + 1 ) ,
} , true ) ;
} ) ,
2022-08-28 00:45:55 +00:00
} ) ;
2023-02-07 17:17:40 +00:00
ScheduleInput ( beat , 1f , InputType . STANDARD_DOWN , MarchHit , GenericMiss , MarchEmpty ) ;
}
}
public void SargeAttention ( float beat )
{
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
new BeatAction . Action ( beat + 0.25f , delegate { Sarge . DoScaledAnimationAsync ( "Talk" , 0.5f ) ; } ) ,
} ) ;
2022-08-27 04:40:49 +00:00
}
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
public void SargeMarch ( float beat , bool noVoice )
2022-08-28 00:45:55 +00:00
{
2022-09-10 12:56:26 +00:00
marchOtherCount = 0 ;
marchPlayerCount = 0 ;
2023-02-07 17:17:40 +00:00
MarchSound ( beat , noVoice ) ;
if ( ! noVoice )
Sarge . DoScaledAnimationAsync ( "Talk" , 0.5f ) ;
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
2022-09-10 12:56:26 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet1 . DoScaledAnimationAsync ( "MarchL" , 0.5f ) ; } ) ,
2022-09-05 07:46:19 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet2 . DoScaledAnimationAsync ( "MarchL" , 0.5f ) ; } ) ,
2022-09-10 12:56:26 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet3 . DoScaledAnimationAsync ( "MarchL" , 0.5f ) ; } ) ,
new BeatAction . Action ( beat + 1f , delegate { CadetPlayer . DoScaledAnimationAsync ( "MarchL" , 0.5f ) ; } ) ,
2023-02-07 17:17:40 +00:00
} ) ;
2022-08-28 00:45:55 +00:00
}
2022-09-10 12:56:26 +00:00
public void SargeHalt ( float beat )
2022-08-29 14:07:32 +00:00
{
2023-02-07 17:17:40 +00:00
HaltSound ( beat ) ;
ScheduleInput ( beat , 1f , InputType . STANDARD_ALT_DOWN , HaltHit , GenericMiss , HaltEmpty ) ;
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
2022-09-05 07:46:19 +00:00
new BeatAction . Action ( beat , delegate { Sarge . DoScaledAnimationAsync ( "Talk" , 0.5f ) ; } ) ,
2022-09-10 12:56:26 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet1 . DoScaledAnimationAsync ( "Halt" , 0.5f ) ; } ) ,
2022-09-06 06:41:13 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet2 . DoScaledAnimationAsync ( "Halt" , 0.5f ) ; } ) ,
2022-09-10 12:56:26 +00:00
new BeatAction . Action ( beat + 1f , delegate { Cadet3 . DoScaledAnimationAsync ( "Halt" , 0.5f ) ; } ) ,
2023-02-07 17:17:40 +00:00
} ) ;
2022-09-03 06:09:23 +00:00
}
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
public void SargeFaceTurn ( float beat , int type , int type2 , bool toggle )
2022-09-08 12:38:45 +00:00
{
2022-09-10 12:56:26 +00:00
switch ( type2 )
{
case ( int ) MarchingOrders . FaceTurnLength . Fast :
turnLength = 0 ;
2023-02-07 17:17:40 +00:00
fastTurn = "fast" ;
2022-09-10 12:56:26 +00:00
break ;
default :
turnLength = 1 ;
2023-02-07 17:17:40 +00:00
fastTurn = "" ;
2022-09-10 12:56:26 +00:00
break ;
2022-09-08 12:38:45 +00:00
}
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
2022-09-10 12:56:26 +00:00
switch ( type )
2022-09-08 12:38:45 +00:00
{
case ( int ) MarchingOrders . DirectionFaceTurn . Left :
2023-02-07 17:17:40 +00:00
ScheduleInput ( beat , turnLength + 2f , InputType . DIRECTION_LEFT_DOWN , LeftSuccess , GenericMiss , LeftEmpty ) ;
2022-09-08 12:38:45 +00:00
MultiSound . Play ( new MultiSound . Sound [ ] {
2023-02-07 17:17:40 +00:00
new MultiSound . Sound ( "marchingOrders/leftFaceTurn1" + fastTurn , beat ) ,
new MultiSound . Sound ( "marchingOrders/leftFaceTurn2" + fastTurn , beat + 0.6f ) ,
2022-09-10 12:56:26 +00:00
new MultiSound . Sound ( "marchingOrders/leftFaceTurn3" , beat + turnLength + 1f ) ,
2023-02-07 17:17:40 +00:00
new MultiSound . Sound ( "marchingOrders/turnAction" , beat + turnLength + 2f ) ,
} , forcePlay : true ) ;
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead1 . DoScaledAnimationAsync ( "FaceL" , 0.5f ) ;
else Cadet1 . DoScaledAnimationAsync ( "PointL" ) ; } ) ,
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead2 . DoScaledAnimationAsync ( "FaceL" , 0.5f ) ;
else Cadet2 . DoScaledAnimationAsync ( "PointL" ) ; } ) ,
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead3 . DoScaledAnimationAsync ( "FaceL" , 0.5f ) ;
else Cadet3 . DoScaledAnimationAsync ( "PointL" ) ; } ) ,
} ) ;
2022-09-08 12:38:45 +00:00
break ;
2022-09-10 12:56:26 +00:00
default :
2023-02-07 17:17:40 +00:00
ScheduleInput ( beat , turnLength + 2f , InputType . DIRECTION_RIGHT_DOWN , RightSuccess , GenericMiss , RightEmpty ) ;
2022-09-10 12:56:26 +00:00
MultiSound . Play ( new MultiSound . Sound [ ] {
2023-02-07 17:17:40 +00:00
new MultiSound . Sound ( "marchingOrders/rightFaceTurn1" + fastTurn , beat ) ,
new MultiSound . Sound ( "marchingOrders/rightFaceTurn2" + fastTurn , beat + 0.6f ) ,
2022-09-10 12:56:26 +00:00
new MultiSound . Sound ( "marchingOrders/rightFaceTurn3" , beat + turnLength + 1f ) ,
2023-02-07 17:17:40 +00:00
new MultiSound . Sound ( "marchingOrders/turnAction" , beat + turnLength + 2f ) ,
} , forcePlay : true ) ;
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead1 . DoScaledAnimationAsync ( "FaceR" , 0.5f ) ;
else Cadet1 . DoScaledAnimationAsync ( "PointR" ) ; } ) ,
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead2 . DoScaledAnimationAsync ( "FaceR" , 0.5f ) ;
else Cadet2 . DoScaledAnimationAsync ( "PointR" ) ; } ) ,
new BeatAction . Action ( beat + turnLength + 2f , delegate { if ( ! toggle ) CadetHead3 . DoScaledAnimationAsync ( "FaceR" , 0.5f ) ;
else Cadet3 . DoScaledAnimationAsync ( "PointR" ) ; } ) ,
} ) ;
2022-09-10 12:56:26 +00:00
break ;
}
2023-02-07 17:17:40 +00:00
BeatAction . New ( gameObject , new List < BeatAction . Action > ( )
{
2022-09-10 12:56:26 +00:00
new BeatAction . Action ( beat , delegate { Sarge . DoScaledAnimationAsync ( "Talk" , 0.5f ) ; } ) ,
new BeatAction . Action ( beat + turnLength + 1f , delegate { Sarge . DoScaledAnimationAsync ( "Talk" , 0.5f ) ; } ) ,
2023-02-07 17:17:40 +00:00
} ) ;
2022-09-10 12:56:26 +00:00
}
2023-02-07 17:17:40 +00:00
/ * public void BackgroundColorSet ( float beat , int type , int colorType , Color wall , Color pipes , Color floor , Color fill )
{
background = type ;
if ( colorType = = ( int ) MarchingOrders . BackgroundColor . Custom )
{
pipesColor = pipes ;
floorColor = floor ;
wallColor = wall ;
fillColor = fill ;
}
Pipes . color = pipesColor ;
UpdateMaterialColour ( pipes , floor , wall ) ;
}
public static void UpdateMaterialColour ( Color mainCol , Color highlightCol , Color objectCol )
{
pipesColor = mainCol ;
floorColor = highlightCol ;
wallColor = objectCol ;
} * /
2022-09-10 12:56:26 +00:00
public static void AttentionSound ( float beat )
2022-09-03 06:09:23 +00:00
{
2023-02-07 17:17:40 +00:00
PlaySoundSequence ( "marchingOrders" , "zentai" , beat - 1 ) ;
2022-09-03 06:09:23 +00:00
}
2022-09-10 12:56:26 +00:00
2023-02-07 17:17:40 +00:00
public static void MarchSound ( float beat , bool noVoice )
2022-09-03 06:09:23 +00:00
{
2023-02-07 17:17:40 +00:00
if ( ! noVoice )
{
PlaySoundSequence ( "marchingOrders" , "susume" , beat ) ;
}
2022-09-06 06:41:13 +00:00
}
2022-09-10 12:56:26 +00:00
public static void HaltSound ( float beat )
2022-09-06 06:41:13 +00:00
{
2023-02-07 17:17:40 +00:00
PlaySoundSequence ( "marchingOrders" , "tomare" , beat ) ;
2022-08-29 14:07:32 +00:00
}
2022-08-24 02:22:20 +00:00
}
}