2022-03-14 14:36:19 +00:00
|
|
|
using HeavenStudio.Util;
|
2022-03-13 04:24:37 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
2022-03-17 20:43:35 +00:00
|
|
|
using System;
|
2022-03-13 04:24:37 +00:00
|
|
|
using UnityEngine;
|
2022-03-15 00:54:54 +00:00
|
|
|
using UnityEngine.Rendering; //don't ask
|
2022-03-13 04:24:37 +00:00
|
|
|
|
2022-04-12 16:14:46 +00:00
|
|
|
namespace HeavenStudio.Games.Loaders
|
|
|
|
{
|
|
|
|
using static Minigames;
|
|
|
|
public static class NtrIdolLoader
|
|
|
|
{
|
|
|
|
public static Minigame AddGame(EventCaller eventCaller) {
|
|
|
|
return new Minigame("fanClub", "Fan Club", "FDFD00", false, false, new List<GameAction>()
|
|
|
|
{
|
|
|
|
new GameAction("bop", delegate { var e = eventCaller.currentEntity; FanClub.instance.Bop(e.beat, e.length, e.type); }, 0.5f, true, parameters: new List<Param>()
|
|
|
|
{
|
|
|
|
new Param("type", FanClub.IdolBopType.Both, "Bop target", "Who to make bop"),
|
|
|
|
}),
|
|
|
|
|
|
|
|
new GameAction("yeah, yeah, yeah", delegate { var e = eventCaller.currentEntity; FanClub.instance.CallHai(e.beat, e.toggle); }, 8, false, parameters: new List<Param>()
|
|
|
|
{
|
|
|
|
new Param("toggle", false, "Disable call", "Disable the idol's call")
|
|
|
|
},
|
|
|
|
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, 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);}
|
|
|
|
),
|
|
|
|
|
|
|
|
new GameAction("double clap", delegate { var e = eventCaller.currentEntity; FanClub.instance.CallBigReady(e.beat, e.toggle); }, 4, false, parameters: new List<Param>()
|
|
|
|
{
|
|
|
|
new Param("toggle", false, "Disable call", "Disable the call")
|
|
|
|
},
|
|
|
|
inactiveFunction: delegate { var e = eventCaller.currentEntity; FanClub.WarnBigReady(e.beat, e.toggle); }
|
|
|
|
),
|
|
|
|
|
|
|
|
new GameAction("play idol animation", delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e.type); }, 1, true, parameters: new List<Param>()
|
|
|
|
{
|
|
|
|
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>()
|
|
|
|
{
|
2022-04-28 20:01:07 +00:00
|
|
|
new Param("type", FanClub.StageAnimations.Flash, "Animation", "Animation to play")
|
2022-04-12 16:14:46 +00:00
|
|
|
}),
|
2022-04-28 21:56:00 +00:00
|
|
|
|
|
|
|
new GameAction("set performance type", delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e.type);}, 0.5f, false, parameters: new List<Param>()
|
|
|
|
{
|
|
|
|
new Param("type", FanClub.IdolPerformanceType.Normal, "Performance Type", "Set of animations for the idol to use")
|
|
|
|
},
|
|
|
|
inactiveFunction: delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e.type); }
|
|
|
|
),
|
2022-04-12 16:14:46 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-14 14:36:19 +00:00
|
|
|
namespace HeavenStudio.Games
|
2022-03-13 04:24:37 +00:00
|
|
|
{
|
2022-03-15 00:54:54 +00:00
|
|
|
using Scripts_FanClub;
|
2022-04-12 16:14:46 +00:00
|
|
|
|
2022-03-13 04:24:37 +00:00
|
|
|
public class FanClub : Minigame
|
|
|
|
{
|
2022-03-17 19:13:48 +00:00
|
|
|
public enum IdolBopType {
|
|
|
|
Both,
|
|
|
|
Idol,
|
|
|
|
Spectators
|
|
|
|
}
|
2022-03-16 21:41:46 +00:00
|
|
|
public enum IdolAnimations {
|
|
|
|
Bop,
|
|
|
|
PeaceVocal,
|
|
|
|
Peace,
|
|
|
|
Clap,
|
|
|
|
Call,
|
|
|
|
Response,
|
|
|
|
Jump,
|
2022-04-28 20:01:07 +00:00
|
|
|
BigCall,
|
2022-03-27 04:11:32 +00:00
|
|
|
Squat,
|
2022-03-27 23:05:08 +00:00
|
|
|
Wink,
|
2022-03-16 21:41:46 +00:00
|
|
|
Dab
|
|
|
|
}
|
2022-03-26 02:45:54 +00:00
|
|
|
public enum KamoneResponseType {
|
|
|
|
Through,
|
|
|
|
Jump,
|
2022-04-27 22:02:53 +00:00
|
|
|
ThroughFast,
|
|
|
|
JumpFast,
|
2022-03-26 02:45:54 +00:00
|
|
|
}
|
2022-03-27 23:05:08 +00:00
|
|
|
public enum StageAnimations {
|
|
|
|
Reset,
|
|
|
|
Flash,
|
|
|
|
//TODO: spotlight
|
|
|
|
}
|
2022-04-28 21:56:00 +00:00
|
|
|
public enum IdolPerformanceType {
|
|
|
|
Normal,
|
|
|
|
Arrange,
|
|
|
|
// Tour(this one is fan made so ?)
|
|
|
|
}
|
2022-03-16 21:41:46 +00:00
|
|
|
|
2022-03-13 04:24:37 +00:00
|
|
|
// userdata here
|
2022-03-13 22:23:38 +00:00
|
|
|
[Header("Animators")]
|
2022-03-27 23:05:08 +00:00
|
|
|
//stage
|
|
|
|
public Animator StageAnimator;
|
2022-03-13 04:24:37 +00:00
|
|
|
|
2022-03-13 22:23:38 +00:00
|
|
|
[Header("Objects")]
|
|
|
|
public GameObject Arisa;
|
2022-03-25 22:59:18 +00:00
|
|
|
public GameObject ArisaRootMotion;
|
2022-03-22 19:23:55 +00:00
|
|
|
public GameObject ArisaShadow;
|
2022-03-15 00:54:54 +00:00
|
|
|
public GameObject spectator;
|
|
|
|
public GameObject spectatorAnchor;
|
2022-03-13 04:24:37 +00:00
|
|
|
|
2022-03-13 22:23:38 +00:00
|
|
|
// end userdata
|
2022-03-15 00:54:54 +00:00
|
|
|
|
|
|
|
//arisa's animation controller
|
2022-03-13 22:23:38 +00:00
|
|
|
private Animator idolAnimator;
|
2022-03-15 00:54:54 +00:00
|
|
|
//spectators
|
|
|
|
private List<GameObject> Spectators;
|
2022-03-15 22:43:13 +00:00
|
|
|
public NtrIdolFan Player;
|
2022-03-15 00:54:54 +00:00
|
|
|
|
|
|
|
//bop-type animations
|
2022-03-13 22:23:38 +00:00
|
|
|
public GameEvent bop = new GameEvent();
|
2022-03-15 00:54:54 +00:00
|
|
|
public GameEvent specBop = new GameEvent();
|
2022-03-17 19:13:48 +00:00
|
|
|
public GameEvent noBop = new GameEvent();
|
2022-03-21 15:29:24 +00:00
|
|
|
public GameEvent noResponse = new GameEvent();
|
2022-03-17 19:13:48 +00:00
|
|
|
public GameEvent noSpecBop = new GameEvent();
|
|
|
|
|
2022-04-28 21:56:00 +00:00
|
|
|
private static int performanceType = (int) IdolPerformanceType.Normal;
|
2022-03-17 19:13:48 +00:00
|
|
|
private bool responseToggle = false;
|
2022-03-17 20:43:35 +00:00
|
|
|
private static float wantHais = Single.MinValue;
|
|
|
|
private static float wantKamone = Single.MinValue;
|
2022-03-26 02:45:54 +00:00
|
|
|
private static int wantKamoneType = (int) KamoneResponseType.Through;
|
2022-03-17 20:43:35 +00:00
|
|
|
private static float wantBigReady = Single.MinValue;
|
2022-03-22 19:23:55 +00:00
|
|
|
public float idolJumpStartTime = Single.MinValue;
|
|
|
|
private bool hasJumped = false;
|
2022-03-17 19:13:48 +00:00
|
|
|
|
2022-03-15 00:54:54 +00:00
|
|
|
//game scene
|
2022-03-13 04:24:37 +00:00
|
|
|
public static FanClub instance;
|
|
|
|
|
2022-03-26 02:45:54 +00:00
|
|
|
const int FAN_COUNT = 12;
|
|
|
|
const float RADIUS = 1.3f;
|
2022-03-13 04:24:37 +00:00
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
instance = this;
|
|
|
|
|
2022-03-15 00:54:54 +00:00
|
|
|
Spectators = new List<GameObject>();
|
2022-03-13 22:23:38 +00:00
|
|
|
idolAnimator = Arisa.GetComponent<Animator>();
|
2022-03-15 00:54:54 +00:00
|
|
|
|
|
|
|
// procedurally spawning the spectators
|
|
|
|
// from middle of viewport:
|
|
|
|
|
|
|
|
// |========A========|
|
|
|
|
// f==f==f==0==p==f==f
|
2022-03-17 19:13:48 +00:00
|
|
|
// f==f==f==0==0==f==f==f
|
2022-03-15 00:54:54 +00:00
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
//spawn 12, the 4th is our player (idx 3)
|
2022-03-15 00:54:54 +00:00
|
|
|
Vector3 origin = spectatorAnchor.transform.localPosition;
|
|
|
|
int sortOrigin = spectatorAnchor.GetComponent<SortingGroup>().sortingOrder;
|
|
|
|
Vector3 spawnPos = new Vector3(origin.x, origin.y, origin.z);
|
|
|
|
spawnPos.x -= RADIUS * 2 * 3;
|
|
|
|
for (int i = 0; i < FAN_COUNT; i++)
|
|
|
|
{
|
|
|
|
GameObject mobj = Instantiate(spectator, spectatorAnchor.transform.parent);
|
2022-03-26 02:08:46 +00:00
|
|
|
NtrIdolFan fan = mobj.GetComponent<NtrIdolFan>();
|
2022-03-15 00:54:54 +00:00
|
|
|
mobj.transform.localPosition = new Vector3(spawnPos.x, spawnPos.y, spawnPos.z);
|
|
|
|
mobj.GetComponent<SortingGroup>().sortingOrder = i + sortOrigin;
|
|
|
|
if (i == 3)
|
2022-03-15 22:43:13 +00:00
|
|
|
{
|
2022-03-26 02:08:46 +00:00
|
|
|
Player = fan;
|
2022-03-15 22:43:13 +00:00
|
|
|
Player.player = true;
|
|
|
|
}
|
2022-03-15 00:54:54 +00:00
|
|
|
Spectators.Add(mobj);
|
2022-03-26 02:08:46 +00:00
|
|
|
fan.Init();
|
2022-03-15 00:54:54 +00:00
|
|
|
|
|
|
|
//prepare spawn point of next spectator
|
|
|
|
spawnPos.x += RADIUS * 2;
|
|
|
|
if (i == 2)
|
|
|
|
spawnPos.x += RADIUS * 2;
|
|
|
|
if (i == 8)
|
|
|
|
spawnPos.x += RADIUS * 4;
|
|
|
|
if (i == 5)
|
|
|
|
{
|
|
|
|
spawnPos = new Vector3(origin.x, origin.y, origin.z);
|
|
|
|
spawnPos.x -= RADIUS * 2 * 4 - RADIUS;
|
|
|
|
spawnPos.y -= RADIUS;
|
2022-03-15 22:43:13 +00:00
|
|
|
// spawnPos.z -= RADIUS/4;
|
2022-03-15 00:54:54 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-28 21:56:00 +00:00
|
|
|
|
|
|
|
if (performanceType != (int) IdolPerformanceType.Normal)
|
|
|
|
{
|
|
|
|
idolAnimator.Play("NoPose" + GetPerformanceSuffix(), -1, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static string GetPerformanceSuffix()
|
|
|
|
{
|
|
|
|
switch (performanceType)
|
|
|
|
{
|
|
|
|
case (int) IdolPerformanceType.Arrange:
|
|
|
|
return "Arrange";
|
|
|
|
default:
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void SetPerformanceType(int type = (int) IdolPerformanceType.Normal)
|
|
|
|
{
|
|
|
|
performanceType = type;
|
|
|
|
if (GameManager.instance.currentGame == "fanClub")
|
|
|
|
{
|
|
|
|
FanClub.instance.idolAnimator.Play("NoPose" + GetPerformanceSuffix(), -1, 0);
|
|
|
|
}
|
2022-03-13 22:23:38 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
public override void OnGameSwitch(float beat)
|
|
|
|
{
|
|
|
|
if (wantHais != Single.MinValue)
|
|
|
|
{
|
|
|
|
ContinueHais(wantHais);
|
|
|
|
wantHais = Single.MinValue;
|
|
|
|
}
|
|
|
|
if (wantKamone != Single.MinValue)
|
|
|
|
{
|
2022-03-26 02:45:54 +00:00
|
|
|
ContinueKamone(wantKamone, 0, wantKamoneType);
|
2022-03-17 20:43:35 +00:00
|
|
|
wantKamone = Single.MinValue;
|
|
|
|
}
|
|
|
|
if (wantBigReady != Single.MinValue)
|
|
|
|
{
|
|
|
|
ContinueBigReady(wantBigReady);
|
|
|
|
wantBigReady = Single.MinValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-13 04:24:37 +00:00
|
|
|
private void Update()
|
|
|
|
{
|
2022-03-25 22:51:43 +00:00
|
|
|
var cond = Conductor.instance;
|
|
|
|
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
2022-03-13 22:23:38 +00:00
|
|
|
{
|
2022-03-25 22:51:43 +00:00
|
|
|
if (cond.songPositionInBeats >= bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length)
|
2022-03-15 00:54:54 +00:00
|
|
|
{
|
2022-03-25 22:51:43 +00:00
|
|
|
if (!(cond.songPositionInBeats >= noBop.startBeat && cond.songPositionInBeats < noBop.startBeat + noBop.length))
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolBeat" + GetPerformanceSuffix(), 0, 0);
|
2022-03-15 00:54:54 +00:00
|
|
|
}
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-25 22:51:43 +00:00
|
|
|
if (cond.ReportBeat(ref specBop.lastReportedBeat, specBop.startBeat % 1))
|
2022-03-17 19:13:48 +00:00
|
|
|
{
|
2022-03-25 22:51:43 +00:00
|
|
|
if (cond.songPositionInBeats >= specBop.startBeat && cond.songPositionInBeats < specBop.startBeat + specBop.length)
|
2022-03-13 22:23:38 +00:00
|
|
|
{
|
2022-03-25 22:51:43 +00:00
|
|
|
if (!(cond.songPositionInBeats >= noSpecBop.startBeat && cond.songPositionInBeats < noSpecBop.startBeat + noSpecBop.length))
|
2022-03-17 19:13:48 +00:00
|
|
|
BopAll();
|
2022-03-13 22:23:38 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-17 19:13:48 +00:00
|
|
|
|
2022-03-22 19:23:55 +00:00
|
|
|
//idol jumping physics
|
2022-03-25 22:51:43 +00:00
|
|
|
float jumpPos = cond.GetPositionFromBeat(idolJumpStartTime, 1f);
|
2022-03-25 22:59:18 +00:00
|
|
|
float IDOL_SHADOW_SCALE = 1.18f;
|
2022-03-25 22:51:43 +00:00
|
|
|
if (cond.songPositionInBeats >= idolJumpStartTime && cond.songPositionInBeats < idolJumpStartTime + 1f)
|
2022-03-22 19:23:55 +00:00
|
|
|
{
|
|
|
|
hasJumped = true;
|
|
|
|
float yMul = jumpPos * 2f - 1f;
|
|
|
|
float yWeight = -(yMul*yMul) + 1f;
|
|
|
|
//TODO: idol start position
|
2022-04-30 04:36:47 +00:00
|
|
|
ArisaRootMotion.transform.localPosition = new Vector3(0, 2f * yWeight + 0.25f);
|
2022-03-22 19:23:55 +00:00
|
|
|
ArisaShadow.transform.localScale = new Vector3((1f-yWeight*0.8f) * IDOL_SHADOW_SCALE, (1f-yWeight*0.8f) * IDOL_SHADOW_SCALE, 1f);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (hasJumped)
|
|
|
|
{
|
2022-03-26 02:45:54 +00:00
|
|
|
//DisableBop(cond.songPositionInBeats, 1.5f);
|
2022-03-22 19:23:55 +00:00
|
|
|
//TODO: landing anim
|
|
|
|
}
|
2022-03-25 22:51:43 +00:00
|
|
|
idolJumpStartTime = Single.MinValue;
|
2022-03-22 19:23:55 +00:00
|
|
|
//TODO: idol start position
|
2022-03-25 22:59:18 +00:00
|
|
|
ArisaRootMotion.transform.localPosition = new Vector3(0, 0);
|
2022-03-22 19:23:55 +00:00
|
|
|
ArisaShadow.transform.localScale = new Vector3(IDOL_SHADOW_SCALE, IDOL_SHADOW_SCALE, 1f);
|
|
|
|
}
|
2022-03-13 22:23:38 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
public void Bop(float beat, float length, int target = (int) IdolBopType.Both)
|
2022-03-13 22:23:38 +00:00
|
|
|
{
|
2022-03-17 19:13:48 +00:00
|
|
|
if (target == (int) IdolBopType.Both || target == (int) IdolBopType.Idol)
|
|
|
|
{
|
|
|
|
bop.length = length;
|
|
|
|
bop.startBeat = beat;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (target == (int) IdolBopType.Both || target == (int) IdolBopType.Spectators)
|
|
|
|
SpecBop(beat, length);
|
2022-03-13 22:23:38 +00:00
|
|
|
}
|
|
|
|
|
2022-03-15 00:54:54 +00:00
|
|
|
public void SpecBop(float beat, float length)
|
|
|
|
{
|
|
|
|
specBop.length = length;
|
|
|
|
specBop.startBeat = beat;
|
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
private void DisableBop(float beat, float length)
|
|
|
|
{
|
|
|
|
noBop.length = length;
|
|
|
|
noBop.startBeat = beat;
|
|
|
|
}
|
|
|
|
|
2022-03-21 15:29:24 +00:00
|
|
|
private void DisableResponse(float beat, float length)
|
|
|
|
{
|
|
|
|
noResponse.length = length;
|
|
|
|
noResponse.startBeat = beat;
|
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
private void DisableSpecBop(float beat, float length)
|
|
|
|
{
|
2022-03-21 15:23:42 +00:00
|
|
|
float bt = Conductor.instance.songPositionInBeats;
|
|
|
|
if (bt >= noSpecBop.startBeat && bt < noSpecBop.startBeat + noSpecBop.length)
|
|
|
|
{
|
|
|
|
float thisStToNextSt = beat - noSpecBop.startBeat;
|
2022-03-26 02:45:54 +00:00
|
|
|
float newLen = thisStToNextSt + length;
|
|
|
|
if (newLen > noSpecBop.length)
|
|
|
|
noSpecBop.length = thisStToNextSt + length;
|
2022-03-21 15:23:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
noSpecBop.length = length;
|
|
|
|
noSpecBop.startBeat = beat;
|
|
|
|
}
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void PlayAnim(float beat, float length, int type)
|
2022-03-16 21:41:46 +00:00
|
|
|
{
|
2022-03-26 02:45:54 +00:00
|
|
|
idolJumpStartTime = Single.MinValue;
|
2022-04-28 20:01:07 +00:00
|
|
|
DisableResponse(beat, length + 0.5f);
|
|
|
|
DisableBop(beat, length + 0.5f);
|
2022-03-17 19:13:48 +00:00
|
|
|
|
2022-03-16 21:41:46 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case (int) IdolAnimations.Bop:
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolBeat" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.PeaceVocal:
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.Peace:
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolPeaceNoSync" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.Clap:
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolCrap" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.Call:
|
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-04-30 04:36:47 +00:00
|
|
|
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0" + GetPerformanceSuffix(), -1, 0); }),
|
|
|
|
new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1" + GetPerformanceSuffix(), -1, 0); }),
|
2022-03-16 21:41:46 +00:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.Response:
|
2022-04-30 04:36:47 +00:00
|
|
|
idolAnimator.Play("IdolResponse" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
|
|
|
case (int) IdolAnimations.Jump:
|
2022-03-26 02:45:54 +00:00
|
|
|
DoIdolJump(beat, length);
|
2022-03-16 21:41:46 +00:00
|
|
|
break;
|
2022-04-28 20:01:07 +00:00
|
|
|
case (int) IdolAnimations.BigCall:
|
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall0", -1, 0); }),
|
|
|
|
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall1", -1, 0); }),
|
|
|
|
});
|
|
|
|
break;
|
2022-03-27 04:11:32 +00:00
|
|
|
case (int) IdolAnimations.Squat:
|
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-03-27 23:05:08 +00:00
|
|
|
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat0", -1, 0); }),
|
2022-04-28 20:01:07 +00:00
|
|
|
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat1", -1, 0); }),
|
2022-03-27 23:05:08 +00:00
|
|
|
});
|
|
|
|
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); }),
|
2022-03-27 04:11:32 +00:00
|
|
|
});
|
|
|
|
break;
|
2022-03-16 21:41:46 +00:00
|
|
|
case (int) IdolAnimations.Dab:
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolDab" + GetPerformanceSuffix(), -1, 0);
|
2022-03-16 21:41:46 +00:00
|
|
|
Jukebox.PlayOneShotGame("fanClub/arisa_dab");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-27 23:05:08 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-26 02:45:54 +00:00
|
|
|
private void DoIdolJump(float beat, float length = 3f)
|
2022-03-16 21:41:46 +00:00
|
|
|
{
|
2022-03-26 02:45:54 +00:00
|
|
|
DisableBop(beat, length);
|
|
|
|
DisableResponse(beat, length);
|
2022-03-22 19:23:55 +00:00
|
|
|
idolJumpStartTime = beat;
|
|
|
|
|
|
|
|
//play anim
|
2022-03-26 02:45:54 +00:00
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-04-30 04:36:47 +00:00
|
|
|
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolJump" + GetPerformanceSuffix(), -1, 0); }),
|
2022-03-27 23:05:08 +00:00
|
|
|
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolLand", -1, 0); }),
|
2022-03-26 02:45:54 +00:00
|
|
|
});
|
2022-03-16 21:41:46 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
private void DoIdolClaps()
|
2022-03-13 22:23:38 +00:00
|
|
|
{
|
2022-03-17 19:13:48 +00:00
|
|
|
if (!responseToggle)
|
2022-03-16 21:41:46 +00:00
|
|
|
{
|
2022-03-21 15:29:24 +00:00
|
|
|
if (!(Conductor.instance.songPositionInBeats >= noResponse.startBeat && Conductor.instance.songPositionInBeats < noResponse.startBeat + noResponse.length))
|
|
|
|
{
|
2022-04-28 21:56:00 +00:00
|
|
|
idolAnimator.Play("IdolCrap" + GetPerformanceSuffix(), -1, 0);
|
2022-03-21 15:29:24 +00:00
|
|
|
}
|
2022-03-16 21:41:46 +00:00
|
|
|
}
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void DoIdolResponse()
|
|
|
|
{
|
|
|
|
if (responseToggle)
|
|
|
|
{
|
2022-03-21 15:29:24 +00:00
|
|
|
if (!(Conductor.instance.songPositionInBeats >= noResponse.startBeat && Conductor.instance.songPositionInBeats < noResponse.startBeat + noResponse.length))
|
2022-04-30 04:36:47 +00:00
|
|
|
idolAnimator.Play("IdolResponse" + GetPerformanceSuffix(), -1, 0);
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const float HAIS_LENGTH = 4.5f;
|
2022-03-17 20:43:35 +00:00
|
|
|
public void CallHai(float beat, bool noSound = false, int type = 0)
|
2022-03-17 19:13:48 +00:00
|
|
|
{
|
2022-03-17 20:43:35 +00:00
|
|
|
if (!noSound)
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_1_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_2_jp", beat + 1f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_3_jp", beat + 2f),
|
|
|
|
});
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
responseToggle = false;
|
|
|
|
DisableBop(beat, 8f);
|
2022-03-16 21:41:46 +00:00
|
|
|
|
2022-04-28 20:01:07 +00:00
|
|
|
Prepare(beat + 3f);
|
2022-03-15 22:43:13 +00:00
|
|
|
Prepare(beat + 4f);
|
|
|
|
Prepare(beat + 5f);
|
|
|
|
Prepare(beat + 6f);
|
|
|
|
|
2022-03-13 22:23:38 +00:00
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-04-28 21:56:00 +00:00
|
|
|
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
|
|
|
|
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
|
|
|
|
new BeatAction.Action(beat + 2f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
|
2022-03-26 02:45:54 +00:00
|
|
|
new BeatAction.Action(beat + 2.5f, delegate { DisableSpecBop(beat + 2.5f, 5f);}),
|
2022-04-28 21:56:00 +00:00
|
|
|
new BeatAction.Action(beat + 3f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeaceNoSync" + GetPerformanceSuffix()); PlayPrepare(); }),
|
2022-03-17 19:13:48 +00:00
|
|
|
|
|
|
|
new BeatAction.Action(beat + 4f, delegate { PlayOneClap(beat + 4f); DoIdolClaps();}),
|
|
|
|
new BeatAction.Action(beat + 5f, delegate { PlayOneClap(beat + 5f); DoIdolClaps();}),
|
|
|
|
new BeatAction.Action(beat + 6f, delegate { PlayOneClap(beat + 6f); DoIdolClaps();}),
|
|
|
|
new BeatAction.Action(beat + 7f, delegate { PlayOneClap(beat + 7f); DoIdolClaps();}),
|
2022-03-15 22:43:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/crowd_hai_jp", beat + 4f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_hai_jp", beat + 5f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_hai_jp", beat + 6f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_hai_jp", beat + 7f),
|
2022-03-13 22:23:38 +00:00
|
|
|
});
|
2022-03-15 00:54:54 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
public static void WarnHai(float beat, bool noSound = false, int type = 0)
|
2022-03-15 22:43:13 +00:00
|
|
|
{
|
2022-03-17 20:43:35 +00:00
|
|
|
wantHais = beat;
|
|
|
|
if (noSound) return;
|
2022-03-15 22:43:13 +00:00
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_1_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_2_jp", beat + 1f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_hai_3_jp", beat + 2f),
|
|
|
|
}, forcePlay:true);
|
|
|
|
}
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
public void ContinueHais(float beat, int type = 0)
|
|
|
|
{
|
|
|
|
CallHai(beat, true, type);
|
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
const float CALL_LENGTH = 2.5f;
|
2022-03-26 02:45:54 +00:00
|
|
|
public void CallKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
|
2022-03-15 00:54:54 +00:00
|
|
|
{
|
2022-04-27 22:02:53 +00:00
|
|
|
bool doJump = (responseType == (int) KamoneResponseType.Jump || responseType == (int) KamoneResponseType.JumpFast);
|
|
|
|
BeatAction.Action call0;
|
|
|
|
BeatAction.Action call1;
|
|
|
|
DisableResponse(beat, 2f);
|
|
|
|
if (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast)
|
|
|
|
{
|
|
|
|
call0 = new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall0", -1, 0); });
|
2022-04-30 04:36:47 +00:00
|
|
|
call1 = new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall1", -1, 0); });
|
2022-04-27 22:02:53 +00:00
|
|
|
|
|
|
|
if (!noSound)
|
|
|
|
{
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ka_fast_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_mo_fast_jp", beat + 0.25f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ne_fast_jp", beat + 0.5f),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-04-30 04:36:47 +00:00
|
|
|
call0 = new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0" + GetPerformanceSuffix(), -1, 0); });
|
|
|
|
call1 = new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1" + GetPerformanceSuffix(), -1, 0); });
|
2022-04-27 22:02:53 +00:00
|
|
|
|
|
|
|
if (!noSound)
|
|
|
|
{
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ka_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f, offset: 0.07407407f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f, offset: 0.07407407f),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2022-03-17 20:43:35 +00:00
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
responseToggle = true;
|
2022-04-27 22:02:53 +00:00
|
|
|
DisableBop(beat, (doJump) ? 6.25f : 5.25f);
|
2022-03-17 19:13:48 +00:00
|
|
|
DisableSpecBop(beat + 0.5f, 6f);
|
|
|
|
|
|
|
|
Prepare(beat + 1f);
|
|
|
|
Prepare(beat + 2.5f);
|
|
|
|
Prepare(beat + 3f, 2);
|
|
|
|
Prepare(beat + 4f, 1);
|
2022-03-15 00:54:54 +00:00
|
|
|
|
|
|
|
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-04-27 22:02:53 +00:00
|
|
|
call0,
|
|
|
|
call1,
|
2022-03-17 19:13:48 +00:00
|
|
|
new BeatAction.Action(beat + 1f, delegate { PlayPrepare(); }),
|
|
|
|
|
|
|
|
new BeatAction.Action(beat + 2f, delegate { PlayLongClap(beat + 2f); DoIdolResponse(); }),
|
|
|
|
new BeatAction.Action(beat + 3f, delegate { DoIdolResponse(); }),
|
|
|
|
new BeatAction.Action(beat + 3.5f, delegate { PlayOneClap(beat + 3.5f); }),
|
|
|
|
new BeatAction.Action(beat + 4f, delegate { PlayChargeClap(beat + 4f); DoIdolResponse(); }),
|
2022-03-16 21:41:46 +00:00
|
|
|
new BeatAction.Action(beat + 5f, delegate { PlayJump(beat + 5f);
|
2022-04-27 22:02:53 +00:00
|
|
|
if (doJump)
|
2022-03-16 21:41:46 +00:00
|
|
|
{
|
|
|
|
DoIdolJump(beat + 5f);
|
|
|
|
}
|
2022-03-17 19:13:48 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
DoIdolResponse();
|
|
|
|
}
|
2022-03-16 21:41:46 +00:00
|
|
|
}),
|
2022-03-15 22:43:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/crowd_ka_jp", beat + 2f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_mo_jp", beat + 3.5f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_ne_jp", beat + 4f),
|
|
|
|
new MultiSound.Sound("fanClub/crowd_hey_jp", beat + 5f),
|
2022-03-15 00:54:54 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-03-26 02:45:54 +00:00
|
|
|
public static void WarnKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
|
2022-03-15 22:43:13 +00:00
|
|
|
{
|
2022-03-17 20:43:35 +00:00
|
|
|
wantKamone = beat;
|
2022-03-26 02:45:54 +00:00
|
|
|
wantKamoneType = responseType;
|
2022-03-17 20:43:35 +00:00
|
|
|
if (noSound) return;
|
2022-04-27 22:02:53 +00:00
|
|
|
if (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast)
|
|
|
|
{
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ka_fast_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_mo_fast_jp", beat + 0.25f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ne_fast_jp", beat + 0.5f),
|
|
|
|
}, forcePlay:true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
MultiSound.Play(new MultiSound.Sound[] {
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ka_jp", beat),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f, offset: 0.07407407f),
|
|
|
|
new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f, offset: 0.07407407f),
|
|
|
|
}, forcePlay:true);
|
|
|
|
}
|
2022-03-15 22:43:13 +00:00
|
|
|
}
|
|
|
|
|
2022-03-26 02:45:54 +00:00
|
|
|
public void ContinueKamone(float beat, int type = 0, int responseType = (int) KamoneResponseType.Through)
|
2022-03-17 20:43:35 +00:00
|
|
|
{
|
2022-03-26 02:45:54 +00:00
|
|
|
CallKamone(beat, true, type, responseType);
|
2022-03-17 20:43:35 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
const float BIGCALL_LENGTH = 2.75f;
|
2022-03-17 20:43:35 +00:00
|
|
|
public void CallBigReady(float beat, bool noSound = false)
|
2022-03-15 22:43:13 +00:00
|
|
|
{
|
2022-04-28 20:01:07 +00:00
|
|
|
Prepare(beat + 1.5f);
|
|
|
|
Prepare(beat + 2f);
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
if (!noSound)
|
|
|
|
Jukebox.PlayOneShotGame("fanClub/crowd_big_ready");
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
DisableSpecBop(beat, 3.75f);
|
|
|
|
|
|
|
|
PlayAnimationAll("FanBigReady", onlyOverrideBop: true);
|
2022-03-16 21:41:46 +00:00
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
2022-03-17 19:13:48 +00:00
|
|
|
new BeatAction.Action(beat + 1.5f, delegate { PlayAnimationAll("FanBigReady", onlyOverrideBop: true); }),
|
|
|
|
new BeatAction.Action(beat + 2f, delegate { PlayAnimationAll("FanBigReady", onlyOverrideBop: true); }),
|
2022-03-16 21:41:46 +00:00
|
|
|
new BeatAction.Action(beat + 2.5f, delegate { PlayOneClap(beat + 2.5f);}),
|
|
|
|
new BeatAction.Action(beat + 3f, delegate { PlayOneClap(beat + 3f);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
public static void WarnBigReady(float beat, bool noSound = false)
|
2022-03-16 21:41:46 +00:00
|
|
|
{
|
2022-03-17 20:43:35 +00:00
|
|
|
wantBigReady = beat;
|
|
|
|
if (noSound) return;
|
2022-03-16 21:41:46 +00:00
|
|
|
Jukebox.PlayOneShotGame("fanClub/crowd_big_ready");
|
|
|
|
}
|
|
|
|
|
2022-03-17 20:43:35 +00:00
|
|
|
public void ContinueBigReady(float beat)
|
|
|
|
{
|
|
|
|
CallBigReady(beat, true);
|
|
|
|
}
|
|
|
|
|
2022-03-16 21:41:46 +00:00
|
|
|
public void Prepare(float beat, int type = 0)
|
|
|
|
{
|
|
|
|
Player.AddHit(beat, type);
|
2022-03-15 22:43:13 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
private void PlayAnimationAll(string anim, bool noPlayer = false, bool doForced = false, bool onlyOverrideBop = false)
|
2022-03-15 00:54:54 +00:00
|
|
|
{
|
|
|
|
for (int i = 0; i < Spectators.Count; i++)
|
|
|
|
{
|
|
|
|
if (i == 3 && noPlayer)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (!Spectators[i].GetComponent<Animator>().IsAnimationNotPlaying() && !doForced)
|
2022-03-17 19:13:48 +00:00
|
|
|
{
|
|
|
|
if (onlyOverrideBop)
|
|
|
|
{
|
|
|
|
string clipName = Spectators[i].GetComponent<Animator>().GetCurrentAnimatorClipInfo(0)[0].clip.name;
|
|
|
|
if (clipName == "FanBeat" || clipName == "NoPose")
|
|
|
|
Spectators[i].GetComponent<Animator>().Play(anim);
|
|
|
|
}
|
2022-03-15 00:54:54 +00:00
|
|
|
continue;
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
2022-03-16 21:41:46 +00:00
|
|
|
Spectators[i].GetComponent<Animator>().Play(anim);
|
2022-03-15 00:54:54 +00:00
|
|
|
}
|
2022-03-13 04:24:37 +00:00
|
|
|
}
|
2022-03-15 22:43:13 +00:00
|
|
|
|
|
|
|
private void BopAll(bool noPlayer = false, bool doForced = false)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < Spectators.Count; i++)
|
|
|
|
{
|
|
|
|
if (i == 3 && noPlayer)
|
|
|
|
continue;
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
string clipName = Spectators[i].GetComponent<Animator>().GetCurrentAnimatorClipInfo(0)[0].clip.name;
|
2022-03-15 22:43:13 +00:00
|
|
|
if (!Spectators[i].GetComponent<Animator>().IsAnimationNotPlaying() && !doForced)
|
2022-03-17 19:13:48 +00:00
|
|
|
{
|
|
|
|
if (clipName == "FanBeat" || clipName == "NoPose")
|
|
|
|
Spectators[i].GetComponent<NtrIdolFan>().Bop();
|
2022-03-15 22:43:13 +00:00
|
|
|
continue;
|
2022-03-17 19:13:48 +00:00
|
|
|
}
|
2022-03-15 22:43:13 +00:00
|
|
|
Spectators[i].GetComponent<NtrIdolFan>().Bop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-17 19:13:48 +00:00
|
|
|
private void PlayPrepare()
|
|
|
|
{
|
|
|
|
for (int i = 0; i < Spectators.Count; i++)
|
|
|
|
{
|
|
|
|
if (Spectators[i].GetComponent<NtrIdolFan>().IsJumping())
|
|
|
|
continue;
|
|
|
|
Spectators[i].GetComponent<Animator>().Play("FanPrepare");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-15 22:43:13 +00:00
|
|
|
private void PlayOneClap(float beat)
|
|
|
|
{
|
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
|
|
|
|
new BeatAction.Action(beat + 0.25f, delegate { PlayAnimationAll("FanFree", true);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private void PlayLongClap(float beat)
|
|
|
|
{
|
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
|
|
|
|
new BeatAction.Action(beat + 1f, delegate { PlayAnimationAll("FanFree", true);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private void PlayChargeClap(float beat)
|
|
|
|
{
|
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
|
|
|
|
new BeatAction.Action(beat + 0.1f, delegate { PlayAnimationAll("FanClapCharge", true, true);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private void StartJump(int idx, float beat)
|
|
|
|
{
|
|
|
|
Spectators[idx].GetComponent<NtrIdolFan>().jumpStartTime = beat;
|
|
|
|
BeatAction.New(Spectators[idx], new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { Spectators[idx].GetComponent<Animator>().Play("FanJump", -1, 0);}),
|
|
|
|
new BeatAction.Action(beat + 1f, delegate { Spectators[idx].GetComponent<Animator>().Play("FanPrepare", -1, 0);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private void PlayJump(float beat)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < Spectators.Count; i++)
|
|
|
|
{
|
|
|
|
if (i == 3)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
StartJump(i, beat);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void AngerOnMiss()
|
|
|
|
{
|
|
|
|
for (int i = 0; i <= 5; i++)
|
|
|
|
{
|
|
|
|
if (i == 3)
|
|
|
|
continue;
|
|
|
|
Spectators[i].GetComponent<NtrIdolFan>().MakeAngry(i > 3);
|
|
|
|
}
|
|
|
|
}
|
2022-03-13 04:24:37 +00:00
|
|
|
}
|
|
|
|
}
|