Fan Club: arisa jump

This commit is contained in:
minenice55 2022-03-25 22:45:54 -04:00
parent 7d2160d221
commit 6e3ba6ba9f
5 changed files with 2983 additions and 290 deletions

View file

@ -6908,7 +6908,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 15
m_Sprite: {fileID: 21300000, guid: 1ff77a9b486906540986fe813fec9cb7, type: 3}
m_Sprite: {fileID: 21300000, guid: b29e50f9cb73fb1428647ef7075570e3, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 0.5803922}
m_FlipX: 0
m_FlipY: 0

View file

@ -2153,26 +2153,6 @@ AnimationClip:
classID: 212
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -2180,76 +2160,6 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_leg_R
classID: 4
script: {fileID: 0}
@ -2269,10 +2179,130 @@ AnimationClip:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
attribute: m_LocalEulerAngles.x
path: idol_leg_R
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_head
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_head/idol_Hed_hair00
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_leg_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -2340,6 +2370,36 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_mike
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_mike
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_mike
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_torso/idol_arm_R/idol_hand_R
classID: 4
script: {fileID: 0}
@ -2353,16 +2413,6 @@ AnimationClip:
path: idol_torso/idol_arm_R/idol_hand_R
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_torso/idol_arm_R/idol_hand_R
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -2370,57 +2420,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_torso/idol_arm_L
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: idol_mike
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: idol_mike
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: idol_mike
path: idol_torso/idol_arm_R/idol_hand_R
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 1

View file

@ -28,6 +28,10 @@ namespace HeavenStudio.Games
//TODO: HandTwirl, Wink, BigCall
Dab
}
public enum KamoneResponseType {
Through,
Jump,
}
// userdata here
[Header("Animators")]
@ -58,6 +62,7 @@ namespace HeavenStudio.Games
private bool responseToggle = false;
private static float wantHais = Single.MinValue;
private static float wantKamone = Single.MinValue;
private static int wantKamoneType = (int) KamoneResponseType.Through;
private static float wantBigReady = Single.MinValue;
public float idolJumpStartTime = Single.MinValue;
private bool hasJumped = false;
@ -65,15 +70,12 @@ namespace HeavenStudio.Games
//game scene
public static FanClub instance;
const int FAN_COUNT = 12;
const float RADIUS = 1.3f;
private void Awake()
{
instance = this;
}
const int FAN_COUNT = 12;
const float RADIUS = 1.3f;
private void Start()
{
Spectators = new List<GameObject>();
idolAnimator = Arisa.GetComponent<Animator>();
@ -126,7 +128,7 @@ namespace HeavenStudio.Games
}
if (wantKamone != Single.MinValue)
{
ContinueKamone(wantKamone);
ContinueKamone(wantKamone, 0, wantKamoneType);
wantKamone = Single.MinValue;
}
if (wantBigReady != Single.MinValue)
@ -166,14 +168,14 @@ namespace HeavenStudio.Games
float yMul = jumpPos * 2f - 1f;
float yWeight = -(yMul*yMul) + 1f;
//TODO: idol start position
ArisaRootMotion.transform.localPosition = new Vector3(0, 3f * yWeight);
ArisaRootMotion.transform.localPosition = new Vector3(0, 2f * yWeight);
ArisaShadow.transform.localScale = new Vector3((1f-yWeight*0.8f) * IDOL_SHADOW_SCALE, (1f-yWeight*0.8f) * IDOL_SHADOW_SCALE, 1f);
}
else
{
if (hasJumped)
{
DisableBop(cond.songPositionInBeats, 1.5f);
//DisableBop(cond.songPositionInBeats, 1.5f);
//TODO: landing anim
}
idolJumpStartTime = Single.MinValue;
@ -219,6 +221,8 @@ namespace HeavenStudio.Games
if (bt >= noSpecBop.startBeat && bt < noSpecBop.startBeat + noSpecBop.length)
{
float thisStToNextSt = beat - noSpecBop.startBeat;
float newLen = thisStToNextSt + length;
if (newLen > noSpecBop.length)
noSpecBop.length = thisStToNextSt + length;
}
else
@ -230,6 +234,7 @@ namespace HeavenStudio.Games
public void PlayAnim(float beat, float length, int type)
{
idolJumpStartTime = Single.MinValue;
DisableResponse(beat, length);
DisableBop(beat, length);
@ -259,7 +264,7 @@ namespace HeavenStudio.Games
idolAnimator.Play("IdolResponse", -1, 0);
break;
case (int) IdolAnimations.Jump:
DoIdolJump(beat);
DoIdolJump(beat, length);
break;
case (int) IdolAnimations.Dab:
idolAnimator.Play("IdolDab", -1, 0);
@ -268,14 +273,18 @@ namespace HeavenStudio.Games
}
}
private void DoIdolJump(float beat)
private void DoIdolJump(float beat, float length = 3f)
{
DisableBop(beat, 1f);
DisableResponse(beat, 1f);
DisableBop(beat, length);
DisableResponse(beat, length);
idolJumpStartTime = beat;
//play anim
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolJump", -1, 0); }),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolLand", -1, 0); }),
});
}
private void DoIdolClaps()
@ -312,7 +321,6 @@ namespace HeavenStudio.Games
Prepare(beat + 3f);
responseToggle = false;
DisableBop(beat, 8f);
DisableSpecBop(beat + 2.5f, 5f);
Prepare(beat + 4f);
Prepare(beat + 5f);
@ -323,6 +331,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", -1, 0);}),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", -1, 0);}),
new BeatAction.Action(beat + 2f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", -1, 0);}),
new BeatAction.Action(beat + 2.5f, delegate { DisableSpecBop(beat + 2.5f, 5f);}),
new BeatAction.Action(beat + 3f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeaceNoSync"); PlayPrepare(); }),
new BeatAction.Action(beat + 4f, delegate { PlayOneClap(beat + 4f); DoIdolClaps();}),
@ -356,7 +365,7 @@ namespace HeavenStudio.Games
}
const float CALL_LENGTH = 2.5f;
public void CallKamone(float beat, bool noSound = false, int type = 0, bool doJump = false)
public void CallKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
{
if (!noSound)
MultiSound.Play(new MultiSound.Sound[] {
@ -366,7 +375,7 @@ namespace HeavenStudio.Games
});
responseToggle = true;
DisableBop(beat, doJump ? 6.25f : 5.25f);
DisableBop(beat, (responseType == (int) KamoneResponseType.Jump) ? 6.25f : 5.25f);
DisableSpecBop(beat + 0.5f, 6f);
Prepare(beat + 1f);
@ -385,7 +394,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat + 3.5f, delegate { PlayOneClap(beat + 3.5f); }),
new BeatAction.Action(beat + 4f, delegate { PlayChargeClap(beat + 4f); DoIdolResponse(); }),
new BeatAction.Action(beat + 5f, delegate { PlayJump(beat + 5f);
if (doJump)
if (responseType == (int) KamoneResponseType.Jump)
{
DoIdolJump(beat + 5f);
}
@ -404,9 +413,10 @@ namespace HeavenStudio.Games
});
}
public static void WarnKamone(float beat, bool noSound = false, int type = 0)
public static void WarnKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
{
wantKamone = beat;
wantKamoneType = responseType;
if (noSound) return;
MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("fanClub/arisa_ka_jp", beat),
@ -415,9 +425,9 @@ namespace HeavenStudio.Games
}, forcePlay:true);
}
public void ContinueKamone(float beat, int type = 0, bool doJump = false)
public void ContinueKamone(float beat, int type = 0, int responseType = (int) KamoneResponseType.Through)
{
CallKamone(beat, true, type, doJump);
CallKamone(beat, true, type, responseType);
}
const float BIGCALL_LENGTH = 2.75f;

View file

@ -437,8 +437,9 @@ namespace HeavenStudio
inactiveFunction: delegate { var e = eventCaller.currentEntity; FanClub.WarnHai(e.beat, e.toggle);}
),
new GameAction("I suppose", delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e.toggle); }, 6, false, parameters: new List<Param>()
new GameAction("I suppose", delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e.toggle, 0, e.type); }, 6, false, parameters: new List<Param>()
{
new Param("type", FanClub.KamoneResponseType.Through, "Response type", "Type of response to use"),
new Param("toggle", false, "Disable call", "Disable the idol's call")
},
inactiveFunction: delegate { var e = eventCaller.currentEntity; FanClub.WarnKamone(e.beat, e.toggle);}