Sumo Pose anims v4.9

You can now toggle if the blue sumo bro will throw his glasses on the finale pose.
Also changed selecting the pose type from an integer slider to a dropdown menu. You can also now change which direction the sumo brothers begin stomping in.
This commit is contained in:
RaffyTaffy14 2024-04-12 23:44:28 -04:00
parent d3cdc9f04d
commit c3c9ebf82f
4 changed files with 140 additions and 22 deletions

View file

@ -11941,7 +11941,7 @@ SortingGroup:
m_Enabled: 1 m_Enabled: 1
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: -1 m_SortingOrder: -2
--- !u!1 &6987104331872438193 --- !u!1 &6987104331872438193
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -13031,6 +13031,7 @@ GameObject:
- component: {fileID: 2762256219519098174} - component: {fileID: 2762256219519098174}
- component: {fileID: 8586851493466339267} - component: {fileID: 8586851493466339267}
- component: {fileID: 4014474221203422495} - component: {fileID: 4014474221203422495}
- component: {fileID: 5703616812285415365}
m_Layer: 0 m_Layer: 0
m_Name: impact m_Name: impact
m_TagString: Untagged m_TagString: Untagged
@ -13126,6 +13127,17 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!210 &5703616812285415365
SortingGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8949106469928414165}
m_Enabled: 1
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: -1
--- !u!1 &8980866925709474031 --- !u!1 &8980866925709474031
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SumoPoseG4Alt
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 35eceac5313c5fe43875c2f6998959c1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -69,11 +69,12 @@ namespace HeavenStudio.Games.Loaders
new GameAction("stompSignal", "Stomp Signal") new GameAction("stompSignal", "Stomp Signal")
{ {
function = delegate { var e = eventCaller.currentEntity; SumoBrothers.instance.StompSignal(e.beat, e["mute"], !e["mute"], e["look"]); }, function = delegate { var e = eventCaller.currentEntity; SumoBrothers.instance.StompSignal(e.beat, e["mute"], !e["mute"], e["look"], e["direction"]); },
parameters = new List<Param>() parameters = new List<Param>()
{ {
new Param("mute", false, "Mute", "Disables Inu Sensei's sound cues and animations."), new Param("mute", false, "Mute", "Disables Inu Sensei's sound cues and animations."),
new Param("look", true, "Look Forward", "The Sumo Brothers will look at the camera if transitioning from slapping.") new Param("look", true, "Look at Camera", "The Sumo Brothers will look at the camera if transitioning from slapping."),
new Param("direction", SumoBrothers.StompDirection.Automatic, "Stomp Direction", "Which direction the Sumo Brothers will begin stomping in."),
}, },
inactiveFunction = delegate { var e = eventCaller.currentEntity; if (!e["mute"]) { SumoBrothers.StompSignalSound(e.beat);} }, inactiveFunction = delegate { var e = eventCaller.currentEntity; if (!e["mute"]) { SumoBrothers.StompSignalSound(e.beat);} },
defaultLength = 4f, defaultLength = 4f,
@ -100,9 +101,9 @@ namespace HeavenStudio.Games.Loaders
{ {
new Param.CollapseParam((x, _) => !(bool)x, new string[] { "type" }) new Param.CollapseParam((x, _) => !(bool)x, new string[] { "type" })
}), }),
new Param("type", new EntityTypes.Integer(1, 4, 1), "Pose", "The pose that the Sumo Brothers will make.", new List<Param.CollapseParam>() new Param("type", SumoBrothers.PoseType.Squat, "Pose", "The pose variant that the Sumo Brothers perform on a successful input.", new List<Param.CollapseParam>()
{ {
new Param.CollapseParam((x, _) => (int)x == (int)4, new string[] { "throw" }) new Param.CollapseParam((x, _) => (int)x == (int)SumoBrothers.PoseType.Finale, new string[] { "throw" })
}), }),
new Param("throw", true, "Throw Glasses", "If the Blue Sumo Brother will throw his glasses on a successful input."), new Param("throw", true, "Throw Glasses", "If the Blue Sumo Brother will throw his glasses on a successful input."),
new Param("alternate", true, "Alternate Background", "Alternates between which of the backgrounds appear on a successful input.", new List<Param.CollapseParam>() new Param("alternate", true, "Alternate Background", "Alternates between which of the backgrounds appear on a successful input.", new List<Param.CollapseParam>()
@ -201,13 +202,14 @@ namespace HeavenStudio.Games
public static SumoBrothers instance; public static SumoBrothers instance;
/* public enum PoseType public enum PoseType
{ {
Crouching, Squat = 1,
Crossed, Stance = 2,
Pointing, Pointing = 3,
Finale Finale = 4,
}*/ // finale but without throwing glasses will just be = 5
}
public enum BGType public enum BGType
{ {
@ -229,6 +231,13 @@ namespace HeavenStudio.Games
private SumoState sumoState = SumoState.Idle; private SumoState sumoState = SumoState.Idle;
private SumoState sumoStatePrevious = SumoState.Idle; private SumoState sumoStatePrevious = SumoState.Idle;
public enum StompDirection
{
Automatic = 0,
Left = 1,
Right = 2,
}
protected static bool IA_PadAltPress(out double dt) protected static bool IA_PadAltPress(out double dt)
{ {
return PlayerInput.GetPadDown(InputController.ActionsPad.South, out dt); return PlayerInput.GetPadDown(InputController.ActionsPad.South, out dt);
@ -329,7 +338,7 @@ namespace HeavenStudio.Games
continue; continue;
} }
bool isOnGameSwitchBeat = entity.beat == beat; bool isOnGameSwitchBeat = entity.beat == beat;
if(entity.datamodel == "sumoBrothers/stompSignal") {StompSignal(entity.beat, true, true, entity["look"]);} if(entity.datamodel == "sumoBrothers/stompSignal") {StompSignal(entity.beat, true, true, entity["look"], entity["StompDirection"]);}
if(entity.datamodel == "sumoBrothers/slapSignal") {SlapSignal(entity.beat, true, true);} if(entity.datamodel == "sumoBrothers/slapSignal") {SlapSignal(entity.beat, true, true);}
} }
@ -421,7 +430,7 @@ namespace HeavenStudio.Games
} }
public void StompSignal(double beat, bool mute, bool inu, bool lookatcam) public void StompSignal(double beat, bool mute, bool inu, bool lookatcam, int startingDirection)
{ {
if (sumoState == SumoState.Stomp || cueCurrentlyActive) if (sumoState == SumoState.Stomp || cueCurrentlyActive)
{ {
@ -429,7 +438,15 @@ namespace HeavenStudio.Games
} }
CueRunning(beat + 3); CueRunning(beat + 3);
sumoStompDir = true; // true = left, false = right
// Automatic = 0, Left = 1, Right = 2
/*if (startingDirection != 2)
{
sumoStompDir = true;
} else {
sumoStompDir = false;
}*/
if (lookatcam && sumoState == SumoState.Slap) { if (lookatcam && sumoState == SumoState.Slap) {
lookingAtCamera = true; lookingAtCamera = true;
@ -459,6 +476,17 @@ namespace HeavenStudio.Games
sumoState = SumoState.Stomp; sumoState = SumoState.Stomp;
int stompType = 1; int stompType = 1;
bool startingLeftAfterTransition = false;
if (startingDirection == 1)
{
startingLeftAfterTransition = true;
}
if (startingDirection == 2)
{
stompType = 2;
}
if (sumoStatePrevious == SumoState.Slap) { if (sumoStatePrevious == SumoState.Slap) {
stompType = 3; stompType = 3;
@ -466,7 +494,7 @@ namespace HeavenStudio.Games
stompType = 4; stompType = 4;
} }
StompRecursive(beat + 3, 1, stompType); StompRecursive(beat + 3, 1, stompType, startingLeftAfterTransition);
} }
@ -479,7 +507,7 @@ namespace HeavenStudio.Games
}, forcePlay: true); }, forcePlay: true);
} }
private void StompRecursive(double beat, double remaining, int type) private void StompRecursive(double beat, double remaining, int type, bool startingLeftAfterTransition)
{ {
if (sumoState != SumoState.Stomp) { remaining -= 1; } if (sumoState != SumoState.Stomp) { remaining -= 1; }
@ -538,13 +566,13 @@ namespace HeavenStudio.Games
}); });
} }
if (type == 2) {type = 1;} else { type = 2; } if (type == 2 || startingLeftAfterTransition == true) {type = 1;} else { type = 2; }
var stompInput = ScheduleInput(beat , 1, InputAction_BasicPress, StompHit, StompMiss, Nothing); var stompInput = ScheduleInput(beat , 1, InputAction_BasicPress, StompHit, StompMiss, Nothing);
BeatAction.New(instance, new List<BeatAction.Action>() BeatAction.New(instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(beat, delegate { StompRecursive(beat + 2, remaining, type); }) new BeatAction.Action(beat, delegate { StompRecursive(beat + 2, remaining, type, false); })
}); });
stompInput.IsHittable = () => { stompInput.IsHittable = () => {
@ -688,7 +716,7 @@ namespace HeavenStudio.Games
sumoStatePrevious = sumoState; sumoStatePrevious = sumoState;
sumoState = SumoState.Pose; sumoState = SumoState.Pose;
if (sumoPoseTypeNext > 0 & randomPose) { if (sumoPoseTypeNext > 0 & sumoPoseTypeNext < 4 & randomPose) {
poseType = UnityEngine.Random.Range(1, 3); poseType = UnityEngine.Random.Range(1, 3);
if (poseType >= sumoPoseTypeNext) poseType++; if (poseType >= sumoPoseTypeNext) poseType++;
} else if (randomPose) { } else if (randomPose) {
@ -696,11 +724,15 @@ namespace HeavenStudio.Games
} }
if (alternateBG) { if (alternateBG) {
if (bgType == BGType.None || bgType == BGType.OtaniOniji) { backgroundType = 0; } else { if (bgType != BGType.GreatWave) { backgroundType = 0; } else {
backgroundType = 1; } backgroundType = 1; }
} }
if (!throwGlasses & poseType == 4) {
poseType = 5;
}
var cond = Conductor.instance; var cond = Conductor.instance;
ScheduleInput(beat, 4f, InputAction_Alt, PoseHit, PoseMiss, Nothing); ScheduleInput(beat, 4f, InputAction_Alt, PoseHit, PoseMiss, Nothing);
@ -740,11 +772,22 @@ namespace HeavenStudio.Games
sumoPoseTypeCurrent = sumoPoseTypeNext.ToString(); sumoPoseTypeCurrent = sumoPoseTypeNext.ToString();
sumoPoseType = sumoPoseTypeNext; sumoPoseType = sumoPoseTypeNext;
sumoBrotherP.DoScaledAnimationAsync("SumoPoseP" + sumoPoseTypeCurrent, 0.5f); if (sumoPoseType == 4) { glasses.DoScaledAnimationAsync("glassesThrow", 0.5f); }
if (sumoPoseType == 5)
{
sumoBrotherG.DoScaledAnimationAsync("SumoPoseG4Alt", 0.5f);
sumoBrotherGHead.DoScaledAnimationAsync("SumoGPoseAlt4", 0.5f);
sumoPoseType = 4;
sumoPoseTypeNext = 4;
sumoPoseTypeCurrent = "4";
} else {
sumoBrotherG.DoScaledAnimationAsync("SumoPoseG" + sumoPoseTypeCurrent, 0.5f); sumoBrotherG.DoScaledAnimationAsync("SumoPoseG" + sumoPoseTypeCurrent, 0.5f);
sumoBrotherGHead.DoScaledAnimationAsync("SumoGPose" + sumoPoseTypeCurrent, 0.5f); sumoBrotherGHead.DoScaledAnimationAsync("SumoGPose" + sumoPoseTypeCurrent, 0.5f);
}
if (sumoPoseType == 4) { glasses.DoScaledAnimationAsync("glassesThrow", 0.5f); } sumoBrotherP.DoScaledAnimationAsync("SumoPoseP" + sumoPoseTypeCurrent, 0.5f);
if (bgType == BGType.GreatWave) if (bgType == BGType.GreatWave)
{ {
@ -786,6 +829,8 @@ namespace HeavenStudio.Games
{ {
SoundByte.PlayOneShotGame("sumoBrothers/miss"); SoundByte.PlayOneShotGame("sumoBrothers/miss");
if (sumoPoseTypeNext == 5) { sumoPoseTypeNext = 4; }
sumoPoseType = sumoPoseTypeNext; sumoPoseType = sumoPoseTypeNext;
sumoPoseTypeCurrent = "Miss" + sumoPoseTypeNext.ToString(); sumoPoseTypeCurrent = "Miss" + sumoPoseTypeNext.ToString();