Fan Club: more animations

This commit is contained in:
minenice55
2022-03-27 19:05:08 -04:00
parent f179122dfa
commit 8ca290cc3f
52 changed files with 26383 additions and 810 deletions

View File

@ -25,23 +25,30 @@ namespace HeavenStudio.Games
Call,
Response,
Jump,
//TODO: Wink, BigCall
//TODO: BigCall
Squat,
Wink,
Dab
}
public enum KamoneResponseType {
Through,
Jump,
}
public enum StageAnimations {
Reset,
Flash,
//TODO: spotlight
}
// userdata here
[Header("Animators")]
//stage
public Animator StageAnimator;
[Header("Objects")]
public GameObject Arisa;
public GameObject ArisaRootMotion;
public GameObject ArisaShadow;
public ParticleSystem idolClapEffect;
public GameObject spectator;
public GameObject spectatorAnchor;
@ -252,13 +259,12 @@ namespace HeavenStudio.Games
break;
case (int) IdolAnimations.Clap:
idolAnimator.Play("IdolCrap", -1, 0);
idolClapEffect.Play();
break;
case (int) IdolAnimations.Call:
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0", -1, 0); }),
new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1", -1, 0); }),
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0", -1, 0); }),
new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1", -1, 0); }),
});
break;
case (int) IdolAnimations.Response:
@ -270,8 +276,15 @@ namespace HeavenStudio.Games
case (int) IdolAnimations.Squat:
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat0", -1, 0); }),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat1", -1, 0); }),
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat0", -1, 0); }),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat1", -1, 0); }),
});
break;
case (int) IdolAnimations.Wink:
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolWink0", -1, 0); }),
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolWink1", -1, 0); }),
});
break;
case (int) IdolAnimations.Dab:
@ -281,6 +294,19 @@ namespace HeavenStudio.Games
}
}
public void PlayAnimStage(float beat, int type)
{
switch (type)
{
case (int) StageAnimations.Reset:
StageAnimator.Play("Bg", -1, 0);
break;
case (int) StageAnimations.Flash:
StageAnimator.Play("Bg_Light", -1, 0);
break;
}
}
private void DoIdolJump(float beat, float length = 3f)
{
DisableBop(beat, length);
@ -290,8 +316,8 @@ namespace HeavenStudio.Games
//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); }),
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); }),
});
}
@ -302,7 +328,6 @@ namespace HeavenStudio.Games
if (!(Conductor.instance.songPositionInBeats >= noResponse.startBeat && Conductor.instance.songPositionInBeats < noResponse.startBeat + noResponse.length))
{
idolAnimator.Play("IdolCrap", -1, 0);
idolClapEffect.Play();
}
}
}

View File

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NtrIdolAri : MonoBehaviour
{
[Header("Objects")]
public ParticleSystem idolClapEffect;
public ParticleSystem idolWinkEffect;
public void ClapParticle()
{
idolClapEffect.Play();
}
public void WinkParticle()
{
idolWinkEffect.Play();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f77451de3e6820d46a0706da521031a6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -145,7 +145,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
hasJumped = false;
stopBeat = true;
jumpStartTime = -99f;
animator.Play("FanClap", 0, 0);
animator.Play("FanClap", -1, 0);
Jukebox.PlayOneShotGame("fanClub/play_clap");
Jukebox.PlayOneShotGame("fanClub/crap_impact");
clappingStartTime = cond.songPositionInBeats;
@ -154,7 +154,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
{
if (cond.songPositionInBeats > clappingStartTime + 1.5f && !stopCharge)
{
animator.Play("FanClapCharge", 0, 0);
animator.Play("FanClapCharge", -1, 0);
stopCharge = true;
}
}
@ -165,14 +165,14 @@ namespace HeavenStudio.Games.Scripts_FanClub
if (!hasHit || (upcomingHits?.Count == 0 && startBeat == Single.MinValue))
FanClub.instance.AngerOnMiss();
animator.Play("FanJump", 0, 0);
animator.Play("FanJump", -1, 0);
Jukebox.PlayOneShotGame("fanClub/play_jump");
jumpStartTime = cond.songPositionInBeats;
stopCharge = false;
}
else
{
animator.Play("FanFree", 0, 0);
animator.Play("FanFree", -1, 0);
stopBeat = false;
}
}
@ -196,7 +196,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
Jukebox.PlayOneShotGame("fanClub/landing_impact", pitch: UnityEngine.Random.Range(0.95f, 1f), volume: 1f/4);
if (player)
{
animator.Play("FanPrepare", 0, 0);
animator.Play("FanPrepare", -1, 0);
stopBeat = false;
}
}
@ -215,7 +215,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
new BeatAction.Action(cond.songPositionInBeats + 0.1f, delegate {
if (PlayerInput.Pressing() || fromAutoplay)
{
animator.Play("FanClapCharge", 0, 0);
animator.Play("FanClapCharge", -1, 0);
stopCharge = true;
}
}),
@ -229,7 +229,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
{
stopBeat = true;
jumpStartTime = -99f;
animator.Play("FanClap", 0, 0);
animator.Play("FanClap", -1, 0);
Jukebox.PlayOneShotGame("fanClub/play_clap");
Jukebox.PlayOneShotGame("fanClub/crap_impact");
clappingStartTime = cond.songPositionInBeats;
@ -239,7 +239,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(cond.songPositionInBeats + 0.1f, delegate {
animator.Play("FanFree", 0, 0);
animator.Play("FanFree", -1, 0);
stopBeat = false;
}),
});
@ -258,7 +258,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
}
if (fromAutoplay || !force)
{
animator.Play("FanJump", 0, 0);
animator.Play("FanJump", -1, 0);
Jukebox.PlayOneShotGame("fanClub/play_jump");
jumpStartTime = cond.songPositionInBeats;
stopCharge = false;
@ -284,7 +284,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
public void MakeAngry(bool flip = false)
{
headAnimator.Play("FanFaceAngry", 0, 0);
headAnimator.Play("FanFaceAngry", -1, 0);
if (flip)
{
headRoot.transform.localScale = new Vector3(-1f, 1f, 1f);

View File

@ -456,6 +456,11 @@ namespace HeavenStudio
{
new Param("type", FanClub.IdolAnimations.Bop, "Animation", "Animation to play")
}),
new GameAction("play stage animation", delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnimStage(e.beat, e.type); }, 1, true, parameters: new List<Param>()
{
new Param("type", FanClub.StageAnimations.Reset, "Animation", "Animation to play")
}),
}),
/*new Minigame("spaceDance", "Space Dance", "B888F8", new List<GameAction>()
{