Face Turns now in-progress

and still has yet to animate "Bomb"
This commit is contained in:
KrispyDotlessI 2022-09-08 20:38:45 +08:00
parent a064a06552
commit afc495b519
4 changed files with 99 additions and 8 deletions

View file

@ -1238,6 +1238,10 @@ MonoBehaviour:
Cadet2: {fileID: 737841632799169188} Cadet2: {fileID: 737841632799169188}
Cadet3: {fileID: 416600750635270691} Cadet3: {fileID: 416600750635270691}
CadetPlayer: {fileID: 4446640221286175446} CadetPlayer: {fileID: 4446640221286175446}
CadetHead1: {fileID: 5597677561781975540}
CadetHead2: {fileID: 6649403303197644635}
CadetHead3: {fileID: 6030929238039482332}
CadetHeadPlayer: {fileID: 7768596813663215401}
Player: {fileID: 4721136555746708586} Player: {fileID: 4721136555746708586}
--- !u!1 &8579906743383480424 --- !u!1 &8579906743383480424
GameObject: GameObject:
@ -1628,6 +1632,11 @@ Animator:
m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3} m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 930450041863206205} m_PrefabInstance: {fileID: 930450041863206205}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!95 &5597677561781975540 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4703848696091020489, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 930450041863206205}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1366076435959956245 --- !u!1001 &1366076435959956245
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1699,6 +1708,11 @@ Animator:
m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3} m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 1366076435959956245} m_PrefabInstance: {fileID: 1366076435959956245}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!95 &6030929238039482332 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4703848696091020489, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 1366076435959956245}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2089670662784752530 --- !u!1001 &2089670662784752530
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1770,6 +1784,11 @@ Animator:
m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3} m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 2089670662784752530} m_PrefabInstance: {fileID: 2089670662784752530}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!95 &6649403303197644635 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4703848696091020489, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 2089670662784752530}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3064968737360712672 --- !u!1001 &3064968737360712672
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1841,3 +1860,8 @@ Animator:
m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3} m_CorrespondingSourceObject: {fileID: 1674590754458698038, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 3064968737360712672} m_PrefabInstance: {fileID: 3064968737360712672}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!95 &7768596813663215401 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4703848696091020489, guid: 263eb1d1933d9544a8db7c1844e53bb6, type: 3}
m_PrefabInstance: {fileID: 3064968737360712672}
m_PrefabAsset: {fileID: 0}

View file

@ -92,7 +92,7 @@ AnimationClip:
m_Level: 0 m_Level: 0
m_CycleOffset: 0 m_CycleOffset: 0
m_HasAdditiveReferencePose: 0 m_HasAdditiveReferencePose: 0
m_LoopTime: 1 m_LoopTime: 0
m_LoopBlend: 0 m_LoopBlend: 0
m_LoopBlendOrientation: 0 m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0 m_LoopBlendPositionY: 0

View file

@ -92,7 +92,7 @@ AnimationClip:
m_Level: 0 m_Level: 0
m_CycleOffset: 0 m_CycleOffset: 0
m_HasAdditiveReferencePose: 0 m_HasAdditiveReferencePose: 0
m_LoopTime: 1 m_LoopTime: 0
m_LoopBlend: 0 m_LoopBlend: 0
m_LoopBlendOrientation: 0 m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0 m_LoopBlendPositionY: 0

View file

@ -59,11 +59,16 @@ namespace HeavenStudio.Games.Loaders
inactiveFunction = delegate { var e = eventCaller.currentEntity; MarchingOrders.HaltSound(e.beat);} inactiveFunction = delegate { var e = eventCaller.currentEntity; MarchingOrders.HaltSound(e.beat);}
}, },
//new GameAction("face turn", delegate {}, 4f, false, parameters: new List<Param>() new GameAction("face turn", "Direction to Turn")
//{ {
// new Param("type", MarchingOrders.DirectionFaceTurn.Right, "Direction", "The direction sarge wants the cadets to face"), function = delegate { var e = eventCaller.currentEntity; MarchingOrders.instance.SargeFaceTurn(e.beat, e["type"], e["type2"]); },
// new Param("type2", MarchingOrders.FaceTurnLength.Normal, "Length", "How fast or slow the event lasts"), defaultLength = 4f,
//}), parameters = new List<Param>()
{
new Param("type", MarchingOrders.DirectionFaceTurn.Right, "Direction", "The direction sarge wants the cadets to face"),
new Param("type2", MarchingOrders.FaceTurnLength.Normal, "Length", "How fast or slow the event lasts"),
}
},
}); });
} }
} }
@ -81,14 +86,19 @@ namespace HeavenStudio.Games
public Animator Cadet2; public Animator Cadet2;
public Animator Cadet3; public Animator Cadet3;
public Animator CadetPlayer; public Animator CadetPlayer;
public GameObject Player; public Animator CadetHead1;
public Animator CadetHead2;
public Animator CadetHead3;
public Animator CadetHeadPlayer;
public GameObject Player;
public GameEvent bop = new GameEvent(); public GameEvent bop = new GameEvent();
public GameEvent noBop = new GameEvent(); public GameEvent noBop = new GameEvent();
public GameEvent marching = new GameEvent(); public GameEvent marching = new GameEvent();
private int marchCount; private int marchCount;
private int turnLength;
public static MarchingOrders instance; public static MarchingOrders instance;
@ -174,6 +184,8 @@ namespace HeavenStudio.Games
public void SargeMarch(float beat) public void SargeMarch(float beat)
{ {
marchCount = 0;
MultiSound.Play(new MultiSound.Sound[] { MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("marchingOrders/march1", beat), new MultiSound.Sound("marchingOrders/march1", beat),
new MultiSound.Sound("marchingOrders/march2", beat + 1f), new MultiSound.Sound("marchingOrders/march2", beat + 1f),
@ -206,6 +218,61 @@ namespace HeavenStudio.Games
}); });
} }
public void SargeFaceTurn(float beat, int type, int type2)
{
switch (type2)
{
case (int) MarchingOrders.FaceTurnLength.Fast:
turnLength = 0;
break;
default:
turnLength = 1;
break;
}
switch (type)
{
case (int) MarchingOrders.DirectionFaceTurn.Left:
MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("marchingOrders/leftFaceTurn1", beat),
new MultiSound.Sound("marchingOrders/leftFaceTurn2", beat + 0.5f),
new MultiSound.Sound("marchingOrders/leftFaceTurn3", beat + turnLength + 1f),
new MultiSound.Sound("marchingOrders/leftFaceTurn4", beat + turnLength + 2f),
}, forcePlay:true);
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead1.DoScaledAnimationAsync("FaceL", 0.5f);}),
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead2.DoScaledAnimationAsync("FaceL", 0.5f);}),
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead3.DoScaledAnimationAsync("FaceL", 0.5f);}),
});
break;
default:
MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("marchingOrders/rightFaceTurn1", beat),
new MultiSound.Sound("marchingOrders/rightFaceTurn2", beat + 0.5f),
new MultiSound.Sound("marchingOrders/rightFaceTurn3", beat + turnLength + 1f),
new MultiSound.Sound("marchingOrders/rightFaceTurn4", beat + turnLength + 2f),
}, forcePlay:true);
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead1.DoScaledAnimationAsync("FaceR", 0.5f);}),
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead2.DoScaledAnimationAsync("FaceR", 0.5f);}),
new BeatAction.Action(beat + turnLength + 2f, delegate { CadetHead3.DoScaledAnimationAsync("FaceR", 0.5f);}),
});
break;
}
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),
new BeatAction.Action(beat + turnLength + 1f, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),
});
}
public static void AttentionSound(float beat) public static void AttentionSound(float beat)
{ {
MultiSound.Play(new MultiSound.Sound[] { MultiSound.Play(new MultiSound.Sound[] {