2023-04-23 20:17:21 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.Rendering;
|
|
|
|
using HeavenStudio.Util;
|
|
|
|
using DG.Tweening;
|
|
|
|
|
|
|
|
namespace HeavenStudio.Games.Loaders
|
|
|
|
{
|
|
|
|
using static Minigames;
|
|
|
|
|
|
|
|
public static class RvlBoardMeetingLoader
|
|
|
|
{
|
|
|
|
public static Minigame AddGame(EventCaller eventCaller)
|
|
|
|
{
|
|
|
|
return new Minigame("boardMeeting", "Board Meeting", "d37912", false, false, new List<GameAction>()
|
|
|
|
{
|
2024-01-15 02:04:10 +00:00
|
|
|
new GameAction("bop", "Bop")
|
|
|
|
{
|
|
|
|
function = delegate { var e = eventCaller.currentEntity; BoardMeeting.instance.Bop(e.beat, e.length, e["bop"], e["auto"]); },
|
|
|
|
resizable = true,
|
|
|
|
parameters = new List<Param>()
|
|
|
|
{
|
|
|
|
new Param("bop", true, "Bop", "Toggle if the pigs & assistant should bop for the duration of this event."),
|
|
|
|
new Param("auto", false, "Bop (Auto)", "Toggle if the pigs & assistant should automatically bop until another Bop event is reached.")
|
|
|
|
}
|
|
|
|
},
|
2023-04-23 20:17:21 +00:00
|
|
|
new GameAction("prepare", "Prepare")
|
|
|
|
{
|
|
|
|
function = delegate { BoardMeeting.instance.Prepare(); }
|
|
|
|
},
|
|
|
|
new GameAction("spinEqui", "Spin")
|
|
|
|
{
|
|
|
|
function = delegate {var e = eventCaller.currentEntity; BoardMeeting.instance.SpinEqui(e.beat, e.length); },
|
|
|
|
resizable = true,
|
|
|
|
priority = 2
|
|
|
|
},
|
|
|
|
new GameAction("spin", "Spin (Range)")
|
|
|
|
{
|
|
|
|
function = delegate {var e = eventCaller.currentEntity; BoardMeeting.instance.Spin(e["start"], e["end"]); },
|
|
|
|
parameters = new List<Param>()
|
|
|
|
{
|
2024-01-15 02:04:10 +00:00
|
|
|
new Param("start", new EntityTypes.Integer(1, 6, 1), "Starting Pig", "Choose the leftmost pig in the range to start spinning."),
|
|
|
|
new Param("end", new EntityTypes.Integer(1, 6, 4), "Ending Pig", "Choose the rightmost pig in the range to start spinning.")
|
2023-04-23 20:17:21 +00:00
|
|
|
},
|
|
|
|
priority = 2
|
|
|
|
},
|
|
|
|
new GameAction("stop", "Stop")
|
|
|
|
{
|
|
|
|
function = delegate { var e = eventCaller.currentEntity; BoardMeeting.instance.Stop(e.beat, e.length); },
|
|
|
|
resizable = true,
|
|
|
|
priority = 1
|
|
|
|
},
|
|
|
|
new GameAction("assStop", "Assistant Stop")
|
|
|
|
{
|
|
|
|
function = delegate { var e = eventCaller.currentEntity; BoardMeeting.instance.AssistantStop(e.beat); },
|
|
|
|
defaultLength = 3f
|
|
|
|
},
|
2024-01-15 02:04:10 +00:00
|
|
|
new GameAction("changeCount", "Change Pig Number")
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
function = delegate { BoardMeeting.instance.ChangeExecutiveCount(eventCaller.currentEntity["amount"]); },
|
|
|
|
defaultLength = 0.5f,
|
|
|
|
parameters = new List<Param>()
|
|
|
|
{
|
2024-01-15 02:04:10 +00:00
|
|
|
new Param("amount", new EntityTypes.Integer(3, 5, 4), "Pigs", "Set how many pigs there will be. The player is always the rightmost pig.")
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-28 17:34:44 +00:00
|
|
|
},
|
|
|
|
new List<string>() {"rvl", "normal"},
|
|
|
|
"rvlrotation", "en",
|
|
|
|
new List<string>() {"en"}
|
|
|
|
);
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace HeavenStudio.Games
|
|
|
|
{
|
|
|
|
using Scripts_BoardMeeting;
|
2023-07-17 15:09:58 +00:00
|
|
|
using System;
|
2023-04-23 20:17:21 +00:00
|
|
|
|
|
|
|
public class BoardMeeting : Minigame
|
|
|
|
{
|
|
|
|
[Header("Components")]
|
|
|
|
[SerializeField] Transform farLeft;
|
|
|
|
[SerializeField] Transform farRight;
|
|
|
|
[SerializeField] Animator assistantAnim;
|
|
|
|
|
|
|
|
[Header("Properties")]
|
|
|
|
[SerializeField] int executiveCount = 4;
|
|
|
|
[SerializeField] List<BMExecutive> executives = new List<BMExecutive>();
|
|
|
|
public BMExecutive firstSpinner;
|
|
|
|
[SerializeField] float shakeIntensity = 0.5f;
|
2023-11-23 16:19:39 +00:00
|
|
|
private bool assistantCanBop = true;
|
|
|
|
private bool executivesCanBop = true;
|
2023-07-17 15:09:58 +00:00
|
|
|
[NonSerialized] public Sound chairLoopSound = null;
|
2023-04-23 20:17:21 +00:00
|
|
|
int missCounter = 0;
|
|
|
|
private Tween shakeTween;
|
|
|
|
|
|
|
|
public static BoardMeeting instance;
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
instance = this;
|
2023-12-05 22:38:52 +00:00
|
|
|
SetupBopRegion("boardMeeting", "bop", "auto");
|
2023-04-23 20:17:21 +00:00
|
|
|
InitExecutives();
|
|
|
|
}
|
|
|
|
|
2023-07-17 15:09:58 +00:00
|
|
|
private void OnDestroy()
|
|
|
|
{
|
|
|
|
foreach(var evt in scheduledInputs)
|
|
|
|
{
|
|
|
|
evt.Disable();
|
|
|
|
}
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-23 20:17:21 +00:00
|
|
|
private void Update()
|
|
|
|
{
|
|
|
|
var cond = Conductor.instance;
|
|
|
|
|
|
|
|
if (cond.isPlaying && !cond.isPaused)
|
|
|
|
{
|
2023-10-29 19:44:47 +00:00
|
|
|
if (PlayerInput.GetIsAction(InputAction_BasicPressing) && !IsExpectingInputNow(InputAction_BasicPress.inputLockCategory))
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
if (executives[executiveCount - 1].spinning)
|
|
|
|
{
|
|
|
|
executives[executiveCount - 1].Stop(false);
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/miss");
|
|
|
|
SoundByte.PlayOneShot("miss");
|
2023-04-26 12:43:35 +00:00
|
|
|
ScoreMiss();
|
2023-07-17 15:09:58 +00:00
|
|
|
foreach (var evt in scheduledInputs)
|
|
|
|
{
|
|
|
|
evt.Disable();
|
|
|
|
}
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-23 16:19:39 +00:00
|
|
|
public override void OnBeatPulse(double beat)
|
|
|
|
{
|
2023-12-05 22:38:52 +00:00
|
|
|
if (!BeatIsInBopRegion(beat)) return;
|
2023-11-23 16:19:39 +00:00
|
|
|
SingleBop();
|
|
|
|
}
|
|
|
|
|
2023-04-23 20:17:21 +00:00
|
|
|
void SingleBop()
|
|
|
|
{
|
|
|
|
if (assistantCanBop)
|
|
|
|
{
|
|
|
|
if (missCounter > 0) assistantAnim.DoScaledAnimationAsync("MissBop", 0.5f);
|
|
|
|
else assistantAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
|
|
|
}
|
|
|
|
if (missCounter > 0) missCounter--;
|
|
|
|
if (!executivesCanBop) return;
|
|
|
|
foreach (var executive in executives)
|
|
|
|
{
|
|
|
|
executive.Bop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-10 19:13:29 +00:00
|
|
|
public void Bop(double beat, float length, bool goBop, bool autoBop)
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
if (goBop)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < length; i++)
|
|
|
|
{
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
new BeatAction.Action(beat + i, delegate
|
|
|
|
{
|
|
|
|
SingleBop();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-10 19:13:29 +00:00
|
|
|
public void AssistantStop(double beat)
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
assistantCanBop = false;
|
|
|
|
string twoSound = "boardMeeting/two";
|
|
|
|
if (beat % 1 != 0) twoSound = "boardMeeting/twoUra";
|
|
|
|
MultiSound.Play(new MultiSound.Sound[]
|
|
|
|
{
|
|
|
|
new MultiSound.Sound("boardMeeting/one", beat),
|
|
|
|
new MultiSound.Sound(twoSound, beat + 0.5f),
|
|
|
|
new MultiSound.Sound("boardMeeting/three", beat + 1),
|
|
|
|
new MultiSound.Sound("boardMeeting/stopAll", beat + 2)
|
|
|
|
});
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
new BeatAction.Action(beat, delegate { assistantAnim.DoScaledAnimationAsync("One", 0.5f); }),
|
|
|
|
new BeatAction.Action(beat + 1, delegate { assistantAnim.DoScaledAnimationAsync("Three", 0.5f); }),
|
|
|
|
new BeatAction.Action(beat + 2, delegate
|
|
|
|
{
|
|
|
|
foreach (var executive in executives)
|
|
|
|
{
|
|
|
|
if (executive.player) continue;
|
|
|
|
executive.Stop();
|
|
|
|
}
|
|
|
|
if (!executives[executiveCount - 1].spinning)
|
|
|
|
{
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
new BeatAction.Action(beat + 2.5f, delegate { assistantCanBop = true; })
|
|
|
|
});
|
2023-10-29 19:44:47 +00:00
|
|
|
ScheduleInput(beat, 2f, InputAction_BasicPress, JustAssistant, MissAssistant, Empty);
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
|
2023-06-10 19:13:29 +00:00
|
|
|
public void Stop(double beat, float length)
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
executivesCanBop = false;
|
|
|
|
List<BeatAction.Action> stops = new List<BeatAction.Action>();
|
|
|
|
for (int i = 0; i < executiveCount; i++)
|
|
|
|
{
|
|
|
|
if (executives[i].player) break;
|
|
|
|
int index = i;
|
|
|
|
stops.Add(new BeatAction.Action(beat + length * i, delegate
|
|
|
|
{
|
|
|
|
int ex = executiveCount;
|
|
|
|
if (executiveCount < 4) ex = 4;
|
|
|
|
if (index < ex - 3)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/stopA");
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
else if (index == ex - 3)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/stopB");
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
else if (index == ex - 2)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/stopC");
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (index == executiveCount - 2 && !executives[executiveCount - 1].spinning)
|
|
|
|
{
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
executives[index].Stop();
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
stops.Add(new BeatAction.Action(beat + length * executiveCount + 0.5f, delegate { executivesCanBop = true; }));
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, stops);
|
2023-10-29 19:44:47 +00:00
|
|
|
ScheduleInput(beat, length * (executiveCount - 1), InputAction_BasicPress, Just, Miss, Empty);
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void Prepare()
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/prepare");
|
2023-04-23 20:17:21 +00:00
|
|
|
foreach (var executive in executives)
|
|
|
|
{
|
|
|
|
executive.Prepare();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-10 19:13:29 +00:00
|
|
|
public void SpinEqui(double beat, float length)
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
if (chairLoopSound == null) chairLoopSound = SoundByte.PlayOneShotGame("boardMeeting/chairLoop", -1, 1, 1, true);
|
2023-04-23 20:17:21 +00:00
|
|
|
firstSpinner = executives[0];
|
|
|
|
List<BeatAction.Action> rolls = new List<BeatAction.Action>();
|
|
|
|
for (int i = 0; i < executiveCount; i++)
|
|
|
|
{
|
|
|
|
int index = i;
|
|
|
|
rolls.Add(new BeatAction.Action(beat + length * i, delegate
|
|
|
|
{
|
|
|
|
int ex = executiveCount;
|
|
|
|
string soundToPlay = "A";
|
|
|
|
if (executiveCount < 4) ex = 4;
|
|
|
|
if (index == ex - 3)
|
|
|
|
{
|
|
|
|
soundToPlay = "B";
|
|
|
|
}
|
|
|
|
else if (index == ex - 2)
|
|
|
|
{
|
|
|
|
soundToPlay = "C";
|
|
|
|
}
|
|
|
|
else if (index == ex - 1)
|
|
|
|
{
|
|
|
|
soundToPlay = "Player";
|
|
|
|
}
|
|
|
|
executives[index].Spin(soundToPlay);
|
|
|
|
}));
|
|
|
|
}
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, rolls);
|
2023-04-23 20:17:21 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Spin(int start, int end)
|
|
|
|
{
|
|
|
|
if (start > executiveCount || end > executiveCount) return;
|
2023-04-26 12:43:35 +00:00
|
|
|
bool forceStart = false;
|
2023-04-23 20:17:21 +00:00
|
|
|
if (chairLoopSound == null)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
chairLoopSound = SoundByte.PlayOneShotGame("boardMeeting/chairLoop", -1, 1, 1, true);
|
2023-04-23 20:17:21 +00:00
|
|
|
firstSpinner = executives[start - 1];
|
2023-04-26 12:43:35 +00:00
|
|
|
forceStart = true;
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
for (int i = start - 1; i < end; i++)
|
|
|
|
{
|
|
|
|
int ex = executiveCount;
|
|
|
|
string soundToPlay = "A";
|
|
|
|
if (executiveCount < 4) ex = 4;
|
|
|
|
if (i == ex - 3)
|
|
|
|
{
|
|
|
|
soundToPlay = "B";
|
|
|
|
}
|
|
|
|
else if (i == ex - 2)
|
|
|
|
{
|
|
|
|
soundToPlay = "C";
|
|
|
|
}
|
|
|
|
else if (i == ex - 1)
|
|
|
|
{
|
|
|
|
soundToPlay = "Player";
|
|
|
|
}
|
2023-04-26 12:43:35 +00:00
|
|
|
executives[i].Spin(soundToPlay, forceStart);
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-17 15:09:58 +00:00
|
|
|
public void StopChairLoopSoundIfLastToStop()
|
|
|
|
{
|
|
|
|
if (executives.FindAll(x => x.spinning).Count > 1) return;
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-23 20:17:21 +00:00
|
|
|
public void InitExecutives()
|
|
|
|
{
|
|
|
|
float startPos = farLeft.position.x;
|
|
|
|
float maxWidth = Mathf.Abs(farLeft.position.x - farRight.position.x);
|
|
|
|
|
2023-04-26 12:43:35 +00:00
|
|
|
float betweenDistance = maxWidth / 3;
|
|
|
|
|
|
|
|
maxWidth = betweenDistance * executiveCount;
|
|
|
|
|
|
|
|
startPos = -(maxWidth / 2);
|
|
|
|
|
|
|
|
for (int i = -1; i < executiveCount; i++)
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
2023-04-26 12:43:35 +00:00
|
|
|
if (i == -1)
|
|
|
|
{
|
|
|
|
assistantAnim.transform.localPosition = new Vector3(startPos + 5.359f, 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
BMExecutive executive;
|
|
|
|
if (i == 0) executive = executives[0];
|
|
|
|
else executive = Instantiate(executives[0], transform);
|
2023-04-23 20:17:21 +00:00
|
|
|
|
2023-04-26 12:43:35 +00:00
|
|
|
executive.transform.localPosition = new Vector3(startPos + betweenDistance * (i + 1), 0);
|
|
|
|
executive.GetComponent<SortingGroup>().sortingOrder = i;
|
2023-04-23 20:17:21 +00:00
|
|
|
|
2023-04-26 12:43:35 +00:00
|
|
|
if (i > 0)
|
|
|
|
executives.Add(executive);
|
2023-04-23 20:17:21 +00:00
|
|
|
|
2023-04-26 12:43:35 +00:00
|
|
|
if (i == executiveCount - 1)
|
|
|
|
executive.player = true;
|
|
|
|
}
|
2023-04-23 20:17:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ChangeExecutiveCount(int count)
|
|
|
|
{
|
|
|
|
for (int i = 1; i < executiveCount; i++)
|
|
|
|
{
|
|
|
|
Destroy(executives[i].gameObject);
|
|
|
|
}
|
|
|
|
executives.RemoveRange(1, executiveCount - 1);
|
|
|
|
executiveCount = count;
|
|
|
|
InitExecutives();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Just(PlayerActionEvent caller, float state)
|
|
|
|
{
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
if (state >= 1f || state <= -1f)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/missThrough");
|
|
|
|
SoundByte.PlayOneShot("miss");
|
2023-04-23 20:17:21 +00:00
|
|
|
executives[executiveCount - 1].Stop(false);
|
|
|
|
return;
|
|
|
|
}
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/stopPlayer");
|
2023-04-23 20:17:21 +00:00
|
|
|
executives[executiveCount - 1].Stop();
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
new BeatAction.Action(caller.timer + caller.startBeat + 1f, delegate
|
|
|
|
{
|
|
|
|
foreach (var executive in executives)
|
|
|
|
{
|
|
|
|
executive.Smile();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void JustAssistant(PlayerActionEvent caller, float state)
|
|
|
|
{
|
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
if (state >= 1f || state <= -1f)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/missThrough");
|
|
|
|
SoundByte.PlayOneShot("miss");
|
2023-04-23 20:17:21 +00:00
|
|
|
executives[executiveCount - 1].Stop(false);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (shakeTween != null)
|
|
|
|
shakeTween.Kill(true);
|
|
|
|
|
2023-11-21 16:57:03 +00:00
|
|
|
DOTween.Punch(() => GameCamera.AdditionalPosition, x => GameCamera.AdditionalPosition = x, new Vector3(shakeIntensity, 0, 0),
|
2023-04-23 20:17:21 +00:00
|
|
|
Conductor.instance.pitchedSecPerBeat * 0.5f, 18, 1f);
|
|
|
|
executives[executiveCount - 1].Stop();
|
|
|
|
assistantAnim.DoScaledAnimationAsync("Stop", 0.5f);
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/stopAllPlayer");
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
2023-04-23 20:17:21 +00:00
|
|
|
{
|
|
|
|
new BeatAction.Action(caller.timer + caller.startBeat + 1f, delegate
|
|
|
|
{
|
|
|
|
foreach (var executive in executives)
|
|
|
|
{
|
|
|
|
executive.Smile();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void Miss(PlayerActionEvent caller)
|
|
|
|
{
|
|
|
|
if (executives[executiveCount - 1].spinning)
|
|
|
|
{
|
|
|
|
executives[executiveCount - 1].Stop(false);
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/missThrough");
|
|
|
|
SoundByte.PlayOneShot("miss");
|
2023-04-23 20:17:21 +00:00
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MissAssistant(PlayerActionEvent caller)
|
|
|
|
{
|
|
|
|
if (executives[executiveCount - 1].spinning)
|
|
|
|
{
|
|
|
|
executives[executiveCount - 1].Stop(false);
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("boardMeeting/missThrough");
|
|
|
|
SoundByte.PlayOneShot("miss");
|
2023-04-23 20:17:21 +00:00
|
|
|
if (chairLoopSound != null)
|
|
|
|
{
|
|
|
|
chairLoopSound.KillLoop(0);
|
|
|
|
chairLoopSound = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assistantAnim.Play("MissIdle", 0, 0);
|
|
|
|
missCounter = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Empty(PlayerActionEvent caller) { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|