Merge branch 'release_1'

This commit is contained in:
minenice55 2023-09-11 18:29:32 -04:00
commit eec4b9e319
157 changed files with 49650 additions and 2194 deletions

View File

@ -1,6 +1,7 @@
{
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig"
]
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig",
"visualstudiotoolsforunity.vstuc"
]
}

10
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}

107
.vscode/settings.json vendored
View File

@ -1,54 +1,55 @@
{
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.gitmodules": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
}
}
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.gitmodules": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
},
"dotnet.defaultSolution": "HeavenStudio.sln"
}

View File

@ -19,7 +19,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 89e1b1c005d29cf4598ea861deb35a80, type: 3}
m_Texture: {fileID: 2800000, guid: 8b8c8a10edf94ddc8cc4cc4fcd5696a9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:

View File

@ -11,6 +11,16 @@ PluginImporter:
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
@ -19,9 +29,35 @@ PluginImporter:
- first:
Editor: Editor
second:
enabled: 0
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,7 +6,7 @@ PluginImporter:
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
@ -19,7 +19,7 @@ PluginImporter:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
@ -31,7 +31,7 @@ PluginImporter:
second:
enabled: 1
settings:
CPU: x86_64
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
@ -49,9 +49,9 @@ PluginImporter:
- first:
Standalone: Win
second:
enabled: 0
enabled: 1
settings:
CPU: None
CPU: x86
- first:
Standalone: Win64
second:

View File

@ -6,11 +6,21 @@ PluginImporter:
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 1
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
@ -18,10 +28,36 @@ PluginImporter:
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
DefaultValueInitialized: true
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 099214b717710f8468369d6cfe2f7135
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,63 +0,0 @@
fileFormatVersion: 2
guid: c603b06f7fc73b9448935991b913d915
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 1
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 47521c369c3ab7849aeb7e479bad21ea
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 12b152ed16fe1eb4698be175f621ffe4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1055,15 +1055,17 @@ MonoBehaviour:
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 50
m_enableWordWrapping: 0
m_TextWrappingMode: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
@ -1713,15 +1715,17 @@ MonoBehaviour:
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 3
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 00000000
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
@ -2602,15 +2606,17 @@ MonoBehaviour:
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 3
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
@ -4187,10 +4193,6 @@ MonoBehaviour:
SoundSequences: []
EligibleHits: []
scheduledInputs: []
firstEnable: 0
alienSpeakCount: 0
translatorSpeakCount: 0
hasMissed: 0
alien: {fileID: 1725356918350344904}
translator: {fileID: 2669316826032871973}
missionControl: {fileID: 1703073459706337243}

View File

@ -1,8 +1,8 @@
using System;
public static class AppInfo {
public const string Version = "0.0.981";
public static readonly DateTime Date = new DateTime(2023, 06, 19, 03, 38, 42, 219, DateTimeKind.Utc);
public const string Version = "0.0.982";
public static readonly DateTime Date = new DateTime(2023, 09, 11, 20, 44, 02, 741, DateTimeKind.Utc);
}

View File

@ -1,16 +1,25 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Starpelly;
using Jukebox;
using Jukebox.Legacy;
using HeavenStudio.Util;
namespace HeavenStudio
{
// [RequireComponent(typeof(AudioSource))]
public class Conductor : MonoBehaviour
{
public struct AddedPitchChange
{
public double time;
public float pitch;
}
public List<AddedPitchChange> addedPitchChanges = new List<AddedPitchChange>();
// Song beats per minute
// This is determined by the song you're trying to sync up to
public float songBpm;
@ -25,18 +34,19 @@ namespace HeavenStudio
// Current song position, in seconds
private double songPos; // for Conductor use only
public float songPosition => (float) songPos;
public float songPosition => (float)songPos;
public double songPositionAsDouble => songPos;
// Current song position, in beats
public double songPosBeat; // for Conductor use only
public float songPositionInBeats => (float) songPosBeat;
public float songPositionInBeats => (float)songPosBeat;
public double songPositionInBeatsAsDouble => songPosBeat;
// Current time of the song
private double time;
double dspTime, lastDspTime;
double absTime, lastAbsTime;
double dspTime;
double absTime, absTimeAdjust;
double dspMargin = 128 / 44100.0;
// the dspTime we started at
private double dspStart;
@ -45,6 +55,7 @@ namespace HeavenStudio
DateTime startTime;
//the beat we started at
private double startPos;
private double startBeat;
public double startBeatAsDouble => startBeat;
@ -59,7 +70,7 @@ namespace HeavenStudio
// Conductor is currently playing song
public bool isPlaying;
// Conductor is currently paused, but not fully stopped
public bool isPaused;
@ -79,16 +90,40 @@ namespace HeavenStudio
public void SetTimelinePitch(float pitch)
{
if (pitch != 0 && pitch * minigamePitch != SongPitch)
{
Debug.Log("added pitch change " + pitch * minigamePitch + " at" + absTime);
addedPitchChanges.Add(new AddedPitchChange { time = absTime, pitch = pitch * minigamePitch });
}
timelinePitch = pitch;
musicSource.pitch = SongPitch;
}
public void SetMinigamePitch(float pitch)
{
if (pitch != 0 && pitch * timelinePitch != SongPitch)
{
Debug.Log("added pitch change " + pitch * timelinePitch + " at" + absTime);
addedPitchChanges.Add(new AddedPitchChange { time = absTime, pitch = pitch * timelinePitch });
}
minigamePitch = pitch;
musicSource.pitch = SongPitch;
}
public void SetMinigamePitch(float pitch, double beat)
{
BeatAction.New( this,
new List<BeatAction.Action> {
new BeatAction.Action(beat, delegate {
SetMinigamePitch(pitch);
}),
}
);
}
void Awake()
{
instance = this;
@ -97,13 +132,16 @@ namespace HeavenStudio
void Start()
{
musicSource.priority = 0;
AudioConfiguration config = AudioSettings.GetConfiguration();
dspMargin = 2 * (config.dspBufferSize / (double)config.sampleRate);
addedPitchChanges.Clear();
}
public void SetBeat(double beat)
{
var chart = GameManager.instance.Beatmap;
double offset = chart.data.offset;
double startPos = GetSongPosFromBeat(beat);
startPos = GetSongPosFromBeat(beat);
double dspTime = AudioSettings.dspTime;
@ -113,19 +151,32 @@ namespace HeavenStudio
SeekMusicToTime(startPos);
songPosBeat = GetBeatFromSongPos(time);
GameManager.instance.SetCurrentEventToClosest(beat);
}
public void Play(double beat)
{
if (isPlaying) return;
if (!isPaused)
{
AudioConfiguration config = AudioSettings.GetConfiguration();
dspMargin = 2 * (config.dspBufferSize / (double)config.sampleRate);
addedPitchChanges.Clear();
addedPitchChanges.Add(new AddedPitchChange { time = 0, pitch = SongPitch });
}
var chart = GameManager.instance.Beatmap;
double offset = chart.data.offset;
double dspTime = AudioSettings.dspTime;
absTimeAdjust = 0;
dspStart = dspTime;
startTime = DateTime.Now;
GameManager.instance.SortEventsList();
double startPos = GetSongPosFromBeat(beat);
startPos = GetSongPosFromBeat(beat);
firstBeatOffset = offset;
time = startPos;
@ -149,12 +200,8 @@ namespace HeavenStudio
}
songPosBeat = GetBeatFromSongPos(time);
startTime = DateTime.Now;
lastAbsTime = 0;
lastDspTime = AudioSettings.dspTime;
dspStart = dspTime;
startBeat = songPosBeat;
isPlaying = true;
isPaused = false;
}
@ -170,10 +217,15 @@ namespace HeavenStudio
public void Stop(double time)
{
if (absTimeAdjust != 0)
{
Debug.Log($"Last playthrough had a dsp (audio) drift of {absTimeAdjust}.\nConsider increasing audio buffer size if audio distortion was present.");
}
this.time = time;
songPos = time;
songPosBeat = 0;
absTimeAdjust = 0;
isPlaying = false;
isPaused = false;
@ -181,13 +233,48 @@ namespace HeavenStudio
musicSource.Stop();
}
void SeekMusicToTime(double startPos)
/// <summary>
/// stops playback of the audio without stopping beatkeeping
/// </summary>
public void StopOnlyAudio()
{
musicSource.Stop();
}
/// <summary>
/// fades out the audio over a duration
/// </summary>
/// <param name="duration">duration of the fade</param>
public void FadeOutAudio(float duration)
{
StartCoroutine(FadeOutAudioCoroutine(duration));
}
IEnumerator FadeOutAudioCoroutine(float duration)
{
float startVolume = musicSource.volume;
float endVolume = 0f;
float startTime = Time.time;
float endTime = startTime + duration;
while (Time.time < endTime)
{
float t = (Time.time - startTime) / duration;
musicSource.volume = Mathf.Lerp(startVolume, endVolume, t);
yield return null;
}
musicSource.volume = endVolume;
StopOnlyAudio();
}
void SeekMusicToTime(double fStartPos)
{
double offset = GameManager.instance.Beatmap.data.offset;
if (musicSource.clip != null && startPos < musicSource.clip.length - offset)
if (musicSource.clip != null && fStartPos < musicSource.clip.length - offset)
{
// https://www.desmos.com/calculator/81ywfok6xk
double musicStartDelay = -offset - startPos;
double musicStartDelay = -offset - fStartPos;
if (musicStartDelay > 0)
{
musicSource.timeSamples = 0;
@ -195,24 +282,13 @@ namespace HeavenStudio
else
{
int freq = musicSource.clip.frequency;
int samples = (int)(freq * (startPos + offset));
int samples = (int)(freq * (fStartPos + offset));
musicSource.timeSamples = samples;
}
}
}
double deltaTimeReal { get {
double ret = absTime - lastAbsTime;
lastAbsTime = absTime;
return ret;
}}
double deltaTimeDsp { get {
double ret = dspTime - lastDspTime;
lastDspTime = dspTime;
return ret;
}}
public void Update()
{
if (isPlaying)
@ -229,24 +305,54 @@ namespace HeavenStudio
musicSource.UnPause();
musicScheduledPitch = SongPitch;
musicScheduledTime = (AudioSettings.dspTime + (-GameManager.instance.Beatmap.data.offset - songPositionAsDouble)/(double)SongPitch);
musicScheduledTime = (AudioSettings.dspTime + (-GameManager.instance.Beatmap.data.offset - songPositionAsDouble) / (double)SongPitch);
musicSource.SetScheduledStartTime(musicScheduledTime);
}
}
absTime = (DateTime.Now - startTime).TotalSeconds;
//dspTime to sync with audio thread in case of drift
dspTime = AudioSettings.dspTime - dspStart;
double dt = deltaTimeReal;
if (Math.Abs(absTime + absTimeAdjust - dspTime) > dspMargin)
{
int i = 0;
while (Math.Abs(absTime + absTimeAdjust - dspTime) > dspMargin)
{
i++;
absTimeAdjust = (dspTime - absTime + absTimeAdjust) * 0.5;
if (i > 8) break;
}
}
//todo: dspTime to sync with audio thread in case of drift
time = MapTimeToPitchChanges(absTime + absTimeAdjust);
time += dt * SongPitch;
songPos = time;
songPos = startPos + time;
songPosBeat = GetBeatFromSongPos(songPos);
}
}
double MapTimeToPitchChanges(double time)
{
double counter = 0;
double lastChangeTime = 0;
float pitch = addedPitchChanges[0].pitch;
foreach (var pch in addedPitchChanges)
{
double changeTime = pch.time;
if (changeTime > time)
{
break;
}
counter += (changeTime - lastChangeTime) * pitch;
lastChangeTime = changeTime;
pitch = pch.pitch;
}
counter += (time - lastChangeTime) * pitch;
return counter;
}
public void LateUpdate()
{
@ -265,7 +371,7 @@ namespace HeavenStudio
{
if (metronomeSound != null)
{
metronomeSound.Delete();
metronomeSound.Stop();
metronomeSound = null;
}
}
@ -352,53 +458,53 @@ namespace HeavenStudio
break;
}
counter += (t.beat - lastTempoChangeBeat) * 60/bpm;
counter += (t.beat - lastTempoChangeBeat) * 60 / bpm;
bpm = t["tempo"];
lastTempoChangeBeat = t.beat;
}
counter += (beat - lastTempoChangeBeat) * 60/bpm;
counter += (beat - lastTempoChangeBeat) * 60 / bpm;
return counter;
}
//thank you @wooningcharithri#7419 for the psuedo-code
public double BeatsToSecs(double beats, float bpm)
{
return beats / bpm * 60f;
}
public double SecsToBeats(double s, float bpm)
{
return s / 60f * bpm;
}
public double BeatsToSecs(double beats, float bpm)
{
return beats / bpm * 60f;
}
public double SecsToBeats(double s, float bpm)
{
return s / 60f * bpm;
}
public double GetBeatFromSongPos(double seconds)
{
double lastTempoChangeBeat = 0f;
double counterSeconds = 0;
float lastBpm = 120f;
foreach (RiqEntity t in GameManager.instance.Beatmap.TempoChanges)
{
double beatToNext = t.beat - lastTempoChangeBeat;
double secToNext = BeatsToSecs(beatToNext, lastBpm);
double nextSecs = counterSeconds + secToNext;
public double GetBeatFromSongPos(double seconds)
{
double lastTempoChangeBeat = 0f;
double counterSeconds = 0;
float lastBpm = 120f;
if (nextSecs >= seconds)
break;
lastTempoChangeBeat = t.beat;
lastBpm = t["tempo"];
counterSeconds = nextSecs;
}
return lastTempoChangeBeat + SecsToBeats(seconds - counterSeconds, lastBpm);
foreach (RiqEntity t in GameManager.instance.Beatmap.TempoChanges)
{
double beatToNext = t.beat - lastTempoChangeBeat;
double secToNext = BeatsToSecs(beatToNext, lastBpm);
double nextSecs = counterSeconds + secToNext;
if (nextSecs >= seconds)
break;
lastTempoChangeBeat = t.beat;
lastBpm = t["tempo"];
counterSeconds = nextSecs;
}
return lastTempoChangeBeat + SecsToBeats(seconds - counterSeconds, lastBpm);
}
//
// convert real seconds to beats
public double GetRestFromRealTime(double seconds)
{
return seconds/pitchedSecPerBeat;
return seconds / pitchedSecPerBeat;
}
public void SetBpm(float bpm)

View File

@ -88,6 +88,7 @@ namespace HeavenStudio
AudioSource source = Conductor.AddComponent<AudioSource>();
Conductor.AddComponent<Conductor>();
Conductor.GetComponent<Conductor>().musicSource = source;
source.priority = 255;
source.outputAudioMixerGroup = Settings.GetMusicMixer();
// Conductor.AddComponent<AudioDspTimeKeeper>();

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Pool;
using Starpelly;
using Jukebox;
@ -14,10 +15,13 @@ namespace HeavenStudio
{
public class GameManager : MonoBehaviour
{
const int SoundPoolSizeMin = 32;
const int SoundPoolSizeMax = 32;
[Header("Lists")]
[NonSerialized] public RiqBeatmap Beatmap = new();
private List<GameObject> preloadedGames = new List<GameObject>();
[NonSerialized] public List<GameObject> SoundObjects = new List<GameObject>();
private List<GameObject> preloadedGames = new();
[NonSerialized] public ObjectPool<Sound> SoundObjects;
[Header("Components")]
[NonSerialized] public Camera GameCamera, CursorCam, OverlayCamera, StaticCamera;
@ -34,7 +38,8 @@ namespace HeavenStudio
[NonSerialized] public string txt = null;
[NonSerialized] public string ext = null;
[NonSerialized] public int currentEvent, currentTempoEvent, currentVolumeEvent, currentSectionEvent,
[NonSerialized]
public int currentEvent, currentTempoEvent, currentVolumeEvent, currentSectionEvent,
currentPreEvent, currentPreSwitch, currentPreSequence;
[NonSerialized] public double endBeat;
[NonSerialized] public float startOffset;
@ -49,6 +54,8 @@ namespace HeavenStudio
bool AudioLoadDone;
bool ChartLoadError;
List<double> eventBeats, tempoBeats, volumeBeats, sectionBeats;
public event Action<double> onBeatChanged;
public event Action<RiqEntity> onSectionChange;
@ -109,7 +116,7 @@ namespace HeavenStudio
{
AudioLoadDone = false;
ChartLoadError = false;
currentPreEvent= 0;
currentPreEvent = 0;
currentPreSwitch = 0;
currentPreSequence = 0;
@ -138,7 +145,9 @@ namespace HeavenStudio
GoForAPerfect.instance.Disable();
/////
SoundObjects = new ObjectPool<Sound>(CreatePooledSound, OnTakePooledSound, OnReturnPooledSound, OnDestroyPooledSound, true, SoundPoolSizeMin, SoundPoolSizeMax);
if (preLoaded)
{
@ -168,8 +177,42 @@ namespace HeavenStudio
}
}
Sound CreatePooledSound()
{
GameObject oneShot = new GameObject($"Pooled Scheduled Sound");
oneShot.transform.SetParent(transform);
AudioSource audioSource = oneShot.AddComponent<AudioSource>();
audioSource.playOnAwake = false;
Sound snd = oneShot.AddComponent<Sound>();
oneShot.SetActive(false);
return snd;
}
// Called when an item is returned to the pool using Release
void OnReturnPooledSound(Sound snd)
{
snd.Stop();
}
// Called when an item is taken from the pool using Get
void OnTakePooledSound(Sound snd)
{
snd.gameObject.SetActive(true);
}
// If the pool capacity is reached then any items returned will be destroyed.
void OnDestroyPooledSound(Sound snd)
{
snd.Stop();
Destroy(snd.gameObject);
}
public void NewRemix()
{
{
AudioLoadDone = false;
Beatmap = new("1", "HeavenStudio");
Beatmap.data.properties = Minigames.propertiesModel;
@ -260,7 +303,7 @@ namespace HeavenStudio
if (Beatmap.data.riqOrigin != "HeavenStudio")
{
string origin = Beatmap.data.riqOrigin?.DisplayName() ?? "Unknown Origin";
GlobalGameManager.ShowErrorMessage("Warning",
GlobalGameManager.ShowErrorMessage("Warning",
$"This chart came from\n<alpha=#AA>{origin}</color>\nand uses content not included in Heaven Studio.\n\n<color=\"yellow\">You may be able to edit this chart in Heaven Studio to be used in its original program.</color>");
}
}
@ -275,7 +318,7 @@ namespace HeavenStudio
{
SkillStarManager.instance.KillStar();
}
if (SkillStarManager.instance.IsEligible && !skillStarCollected && accuracy >= 1f)
{
if (SkillStarManager.instance.DoStarJust())
@ -289,16 +332,26 @@ namespace HeavenStudio
public void SeekAheadAndPreload(double start, float seekTime = 8f)
{
List<RiqEntity> entitiesAtSameBeat = ListPool<RiqEntity>.Get();
List<RiqEntity> gameSwitchs = ListPool<RiqEntity>.Get();
Minigames.Minigame inf;
//seek ahead to preload games that have assetbundles
//check game switches first
var gameSwitchs = Beatmap.Entities.FindAll(c => c.datamodel.Split(1) == "switchGame");
foreach (RiqEntity entity in Beatmap.Entities)
{
if (entity.datamodel.Split(1) == "switchGame")
{
gameSwitchs.Add(entity);
}
}
if (currentPreSwitch < gameSwitchs.Count && currentPreSwitch >= 0)
{
if (start + seekTime >= gameSwitchs[currentPreSwitch].beat)
{
string gameName = gameSwitchs[currentPreSwitch].datamodel.Split(2);
var inf = GetGameInfo(gameName);
if (inf != null && inf.usesAssetBundle && !inf.AssetsLoaded)
inf = GetGameInfo(gameName);
if (inf != null && inf.usesAssetBundle && !inf.AssetsLoaded)
{
Debug.Log($"ASYNC loading assetbundles for game {gameName}");
StartCoroutine(inf.LoadCommonAssetBundleAsync());
@ -308,18 +361,23 @@ namespace HeavenStudio
}
}
//then check game entities
List<double> entities = Beatmap.Entities.Select(c => c.beat).ToList();
if (currentPreEvent < Beatmap.Entities.Count && currentPreEvent >= 0)
{
if (start + seekTime >= entities[currentPreEvent])
if (start + seekTime >= eventBeats[currentPreEvent])
{
var entitiesAtSameBeat = Beatmap.Entities.FindAll(c => c.beat == Beatmap.Entities[currentPreEvent].beat && !EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(c.datamodel.Split('/')[0])));
foreach (RiqEntity entity in Beatmap.Entities)
{
if (entity.beat == Beatmap.Entities[currentPreEvent].beat && !EventCaller.FXOnlyGames().Contains(eventCaller.GetMinigame(entity.datamodel.Split('/')[0])))
{
entitiesAtSameBeat.Add(entity);
}
}
SortEventsByPriority(entitiesAtSameBeat);
foreach (RiqEntity entity in entitiesAtSameBeat)
{
string gameName = entity.datamodel.Split('/')[0];
var inf = GetGameInfo(gameName);
if (inf != null && inf.usesAssetBundle && !inf.AssetsLoaded)
inf = GetGameInfo(gameName);
if (inf != null && inf.usesAssetBundle && !inf.AssetsLoaded)
{
Debug.Log($"ASYNC loading assetbundles for game {gameName}");
StartCoroutine(inf.LoadCommonAssetBundleAsync());
@ -329,29 +387,38 @@ namespace HeavenStudio
}
}
}
ListPool<RiqEntity>.Release(entitiesAtSameBeat);
ListPool<RiqEntity>.Release(gameSwitchs);
}
public void SeekAheadAndDoPreEvent(double start)
{
List<double> entities = Beatmap.Entities.Select(c => c.beat).ToList();
if (currentPreSequence < Beatmap.Entities.Count && currentPreSequence >= 0)
{
var seekEntity = Beatmap.Entities[currentPreSequence];
List<RiqEntity> entitiesAtSameBeat = ListPool<RiqEntity>.Get();
RiqEntity seekEntity = Beatmap.Entities[currentPreSequence];
float seekTime = EventCaller.instance.GetGameAction(
EventCaller.instance.GetMinigame(seekEntity.datamodel.Split(0)), seekEntity.datamodel.Split(1)).preFunctionLength;
if (start + seekTime >= entities[currentPreSequence])
foreach (RiqEntity entity in Beatmap.Entities)
{
if (entity.beat == seekEntity.beat)
{
entitiesAtSameBeat.Add(entity);
}
}
SortEventsByPriority(entitiesAtSameBeat);
float seekTime = eventCaller.GetGameAction(
eventCaller.GetMinigame(seekEntity.datamodel.Split(0)), seekEntity.datamodel.Split(1)).preFunctionLength;
if (start + seekTime >= eventBeats[currentPreSequence])
{
double beat = seekEntity.beat;
var entitiesAtSameBeat = Beatmap.Entities.FindAll(c => c.beat == seekEntity.beat);
SortEventsByPriority(entitiesAtSameBeat);
foreach (RiqEntity entity in entitiesAtSameBeat)
{
currentPreSequence++;
string gameName = entity.datamodel.Split('/')[0];
var inf = GetGameInfo(gameName);
if (inf != null && inf.usesAssetBundle && inf.AssetsLoaded && !inf.SequencesPreloaded)
if (inf != null && inf.usesAssetBundle && inf.AssetsLoaded && !inf.SequencesPreloaded)
{
Debug.Log($"Preloading game {gameName}");
PreloadGameSequences(gameName);
@ -359,6 +426,7 @@ namespace HeavenStudio
eventCaller.CallPreEvent(entity);
}
}
ListPool<RiqEntity>.Release(entitiesAtSameBeat);
}
}
@ -369,33 +437,28 @@ namespace HeavenStudio
if (!Conductor.instance.isPlaying)
return;
Conductor cond = Conductor.instance;
List<double> entities = Beatmap.Entities.Select(c => c.beat).ToList();
List<double> tempoChanges = Beatmap.TempoChanges.Select(c => c.beat).ToList();
if (currentTempoEvent < Beatmap.TempoChanges.Count && currentTempoEvent >= 0)
{
if (cond.songPositionInBeatsAsDouble >= tempoChanges[currentTempoEvent])
if (cond.songPositionInBeatsAsDouble >= tempoBeats[currentTempoEvent])
{
cond.SetBpm(Beatmap.TempoChanges[currentTempoEvent]["tempo"]);
currentTempoEvent++;
}
}
List<double> volumeChanges = Beatmap.VolumeChanges.Select(c => c.beat).ToList();
if (currentVolumeEvent < Beatmap.VolumeChanges.Count && currentVolumeEvent >= 0)
{
if (cond.songPositionInBeatsAsDouble >= volumeChanges[currentVolumeEvent])
if (cond.songPositionInBeatsAsDouble >= volumeBeats[currentVolumeEvent])
{
cond.SetVolume(Beatmap.VolumeChanges[currentVolumeEvent]["volume"]);
currentVolumeEvent++;
}
}
List<double> chartSections = Beatmap.SectionMarkers.Select(c => c.beat).ToList();
if (currentSectionEvent < Beatmap.SectionMarkers.Count && currentSectionEvent >= 0)
{
if (cond.songPositionInBeatsAsDouble >= chartSections[currentSectionEvent])
if (cond.songPositionInBeatsAsDouble >= sectionBeats[currentSectionEvent])
{
Debug.Log("Section " + Beatmap.SectionMarkers[currentSectionEvent]["sectionName"] + " started");
currentSection = Beatmap.SectionMarkers[currentSectionEvent];
@ -416,19 +479,35 @@ namespace HeavenStudio
if (currentEvent < Beatmap.Entities.Count && currentEvent >= 0)
{
if (cond.songPositionInBeatsAsDouble >= entities[currentEvent])
if (cond.songPositionInBeatsAsDouble >= eventBeats[currentEvent])
{
List<RiqEntity> entitiesAtSameBeat = ListPool<RiqEntity>.Get();
List<RiqEntity> fxEntities = ListPool<RiqEntity>.Get();
// allows for multiple events on the same beat to be executed on the same frame, so no more 1-frame delay
var entitiesAtSameBeat = Beatmap.Entities.FindAll(c => c.beat == Beatmap.Entities[currentEvent].beat && !EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(c.datamodel.Split('/')[0])));
var fxEntities = Beatmap.Entities.FindAll(c => c.beat == Beatmap.Entities[currentEvent].beat && EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(c.datamodel.Split('/')[0])));
using (PooledObject<List<RiqEntity>> pool = ListPool<RiqEntity>.Get(out List<RiqEntity> currentBeatEntities))
{
currentBeatEntities = Beatmap.Entities.FindAll(c => c.beat == Beatmap.Entities[currentEvent].beat);
foreach (RiqEntity entity in currentBeatEntities)
{
if (EventCaller.FXOnlyGames().Contains(eventCaller.GetMinigame(entity.datamodel.Split('/')[0])))
{
fxEntities.Add(entity);
}
else
{
entitiesAtSameBeat.Add(entity);
}
}
}
SortEventsByPriority(fxEntities);
SortEventsByPriority(entitiesAtSameBeat);
// FX entities should ALWAYS execute before gameplay entities
for (int i = 0; i < fxEntities.Count; i++)
foreach (RiqEntity entity in fxEntities)
{
eventCaller.CallEvent(fxEntities[i], true);
eventCaller.CallEvent(entity, true);
currentEvent++;
}
@ -447,6 +526,9 @@ namespace HeavenStudio
// Thank you to @shshwdr for bring this to my attention
currentEvent++;
}
ListPool<RiqEntity>.Release(entitiesAtSameBeat);
ListPool<RiqEntity>.Release(fxEntities);
}
}
@ -465,7 +547,8 @@ namespace HeavenStudio
}
}
private void LateUpdate() {
private void LateUpdate()
{
OverlaysManager.instance.TogleOverlaysVisibility(Editor.Editor.instance == null || Editor.Editor.instance.fullscreen || ((PersistentDataManager.gameSettings.overlaysInEditor) && (!Editor.Editor.instance.fullscreen)) || HeavenStudio.Editor.GameSettings.InPreview);
}
@ -514,7 +597,7 @@ namespace HeavenStudio
{
Util.SoundByte.UnpauseOneShots();
}
else
else
{
Conductor.instance.SetBpm(Beatmap.TempoChanges[0]["tempo"]);
Conductor.instance.SetVolume(Beatmap.VolumeChanges[0]["volume"]);
@ -544,7 +627,6 @@ namespace HeavenStudio
Conductor.instance.Stop(beat);
SetCurrentEventToClosest(beat);
onBeatChanged?.Invoke(beat);
KillAllSounds();
// I feel like I should standardize the names
SkillStarManager.instance.KillStar();
@ -555,7 +637,7 @@ namespace HeavenStudio
// pass this data to rating screen + stats
Debug.Log($"== Playthrough statistics of {Beatmap["remixtitle"]} (played at {System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}) ==");
Debug.Log($"Average input offset for playthrough: {averageInputOffset}ms");
Debug.Log($"Accuracy for playthrough: {(PlayerAccuracy * 100) : 0.00}");
Debug.Log($"Accuracy for playthrough: {(PlayerAccuracy * 100): 0.00}");
Debug.Log($"Cleared {clearedSections.FindAll(c => c).Count} sections out of {Beatmap.SectionMarkers.Count}");
if (SkillStarManager.instance.IsCollected)
Debug.Log($"Skill Star collected");
@ -563,7 +645,8 @@ namespace HeavenStudio
Debug.Log($"Skill Star not collected");
if (GoForAPerfect.instance.perfect)
Debug.Log($"Perfect Clear!");
KillAllSounds();
if (playOnStart || restart)
{
Play(0, restartDelay);
@ -573,12 +656,16 @@ namespace HeavenStudio
private IEnumerator WaitReadyAndPlayCo(double beat)
{
WaitUntil yieldOverlays = new WaitUntil(() => OverlaysManager.OverlaysReady);
WaitUntil yieldBeatmap = new WaitUntil(() => Beatmap != null && Beatmap.Entities.Count > 0);
WaitUntil yieldAudio = new WaitUntil(() => AudioLoadDone || (ChartLoadError && !GlobalGameManager.IsShowingDialog));
// wait for overlays to be ready
yield return new WaitUntil(() => OverlaysManager.OverlaysReady);
yield return yieldOverlays;
// wait for first game to be loaded
yield return new WaitUntil(() => Beatmap != null && Beatmap.Entities.Count > 0);
yield return yieldBeatmap;
//wait for audio clip to be loaded
yield return new WaitUntil(() => AudioLoadDone || (ChartLoadError && !GlobalGameManager.IsShowingDialog));
yield return yieldAudio;
SkillStarManager.instance.KillStar();
TimingAccuracyDisplay.instance.StopStarFlash();
@ -588,13 +675,12 @@ namespace HeavenStudio
GlobalGameManager.UpdateDiscordStatus(Beatmap["remixtitle"], false, true);
Play(beat, 1f);
yield break;
}
public void KillAllSounds()
{
for (int i = 0; i < SoundObjects.Count; i++)
Destroy(SoundObjects[i].gameObject);
Debug.Log("Killing all sounds");
SoundObjects.Clear();
Util.SoundByte.KillOneShots();
}
@ -609,15 +695,21 @@ namespace HeavenStudio
Beatmap.TempoChanges.Sort((x, y) => x.beat.CompareTo(y.beat));
Beatmap.VolumeChanges.Sort((x, y) => x.beat.CompareTo(y.beat));
Beatmap.SectionMarkers.Sort((x, y) => x.beat.CompareTo(y.beat));
eventBeats = Beatmap.Entities.Select(c => c.beat).ToList();
tempoBeats = Beatmap.TempoChanges.Select(c => c.beat).ToList();
volumeBeats = Beatmap.VolumeChanges.Select(c => c.beat).ToList();
sectionBeats = Beatmap.SectionMarkers.Select(c => c.beat).ToList();
}
void SortEventsByPriority(List<RiqEntity> entities)
{
entities.Sort((x, y) => {
Minigames.Minigame xGame = EventCaller.instance.GetMinigame(x.datamodel.Split(0));
Minigames.GameAction xAction = EventCaller.instance.GetGameAction(xGame, x.datamodel.Split(1));
Minigames.Minigame yGame = EventCaller.instance.GetMinigame(y.datamodel.Split(0));
Minigames.GameAction yAction = EventCaller.instance.GetGameAction(yGame, y.datamodel.Split(1));
entities.Sort((x, y) =>
{
Minigames.Minigame xGame = eventCaller.GetMinigame(x.datamodel.Split(0));
Minigames.GameAction xAction = eventCaller.GetGameAction(xGame, x.datamodel.Split(1));
Minigames.Minigame yGame = eventCaller.GetMinigame(y.datamodel.Split(0));
Minigames.GameAction yAction = eventCaller.GetGameAction(yGame, y.datamodel.Split(1));
return yAction.priority.CompareTo(xAction.priority);
});
@ -632,25 +724,57 @@ namespace HeavenStudio
return double.MinValue;
}
public static int GetIndexAfter(List<double> list, double compareTo)
{
list.Sort();
if (list.Count > 0)
{
foreach (double item in list)
{
if (item >= compareTo)
{
return Math.Max(list.IndexOf(item), 0);
}
}
return list.Count;
}
return 0;
}
public static int GetIndexBefore(List<double> list, double compareTo)
{
list.Sort();
if (list.Count > 0)
{
foreach (double item in list)
{
if (item >= compareTo)
{
return Math.Max(list.IndexOf(item) - 1, 0);
}
}
return list.Count - 1;
}
return 0;
}
public void SetCurrentEventToClosest(double beat)
{
SortEventsList();
onBeatChanged?.Invoke(beat);
if (Beatmap.Entities.Count > 0)
{
List<double> entities = Beatmap.Entities.Select(c => c.beat).ToList();
currentEvent = entities.IndexOf(GetClosestInList(entities, beat));
currentPreEvent = entities.IndexOf(GetClosestInList(entities, beat));
currentPreSequence = entities.IndexOf(GetClosestInList(entities, beat));
currentEvent = GetIndexAfter(eventBeats, beat);
currentPreEvent = GetIndexAfter(eventBeats, beat);
currentPreSequence = GetIndexAfter(eventBeats, beat);
var gameSwitchs = Beatmap.Entities.FindAll(c => c.datamodel.Split(1) == "switchGame");
string newGame = Beatmap.Entities[currentEvent].datamodel.Split(0);
string newGame = Beatmap.Entities[Math.Min(currentEvent, eventBeats.Count - 1)].datamodel.Split(0);
if (gameSwitchs.Count > 0)
{
int index = gameSwitchs.FindIndex(c => c.beat == GetClosestInList(gameSwitchs.Select(c => c.beat).ToList(), beat));
int index = GetIndexBefore(gameSwitchs.Select(c => c.beat).ToList(), beat);
currentPreSwitch = index;
var closestGameSwitch = gameSwitchs[index];
if (closestGameSwitch.beat <= beat)
@ -698,13 +822,12 @@ namespace HeavenStudio
if (Beatmap.TempoChanges.Count > 0)
{
currentTempoEvent = 0;
List<double> tempoChanges = Beatmap.TempoChanges.Select(c => c.beat).ToList();
//for tempo changes, just go over all of em until the last one we pass
for (int t = 0; t < tempoChanges.Count; t++)
for (int t = 0; t < tempoBeats.Count; t++)
{
// Debug.Log("checking tempo event " + t + " against beat " + beat + "( tc beat " + tempoChanges[t] + ")");
if (tempoChanges[t] > beat)
if (tempoBeats[t] > beat)
{
break;
}
@ -716,11 +839,10 @@ namespace HeavenStudio
if (Beatmap.VolumeChanges.Count > 0)
{
currentVolumeEvent = 0;
List<double> volumeChanges = Beatmap.VolumeChanges.Select(c => c.beat).ToList();
for (int t = 0; t < volumeChanges.Count; t++)
for (int t = 0; t < volumeBeats.Count; t++)
{
if (volumeChanges[t] > beat)
if (volumeBeats[t] > beat)
{
break;
}
@ -733,11 +855,10 @@ namespace HeavenStudio
if (Beatmap.SectionMarkers.Count > 0)
{
currentSectionEvent = 0;
List<double> beatmapSections = Beatmap.SectionMarkers.Select(c => c.beat).ToList();
for (int t = 0; t < beatmapSections.Count; t++)
for (int t = 0; t < sectionBeats.Count; t++)
{
if (beatmapSections[t] > beat)
if (sectionBeats[t] > beat)
{
break;
}
@ -774,7 +895,7 @@ namespace HeavenStudio
if (miniGame != null)
miniGame.OnGameSwitch(beat);
while(beat + 0.25 > Conductor.instance.songPositionInBeats)
while (beat + 0.25 > Conductor.instance.songPositionInBeats)
{
if (!Conductor.instance.isPlaying)
{
@ -831,6 +952,7 @@ namespace HeavenStudio
if (gameInfo.usesAssetBundle)
{
//game is packed in an assetbundle, load from that instead
// this is fucked!! figure out a way to make this async
return gameInfo.GetCommonAssetBundle().LoadAsset<GameObject>(name);
}
name = gameInfo.LoadableName;
@ -841,7 +963,7 @@ namespace HeavenStudio
public Minigames.Minigame GetGameInfo(string name)
{
return EventCaller.instance.minigames.Find(c => c.name == name);
return eventCaller.minigames.Find(c => c.name == name);
}
public void SetCurrentGame(string game, bool useMinigameColor = true)
@ -864,7 +986,7 @@ namespace HeavenStudio
private void SetAmbientGlowToCurrentMinigameColor()
{
if (GetGameInfo(currentGame) != null)
if (GetGameInfo(currentGame) != null)
HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(Colors.Hex2RGB(GetGameInfo(currentGame).color), true);
}

View File

@ -753,7 +753,7 @@ namespace HeavenStudio.Games
public void ServeObject(double beat, double targetBeat, bool type)
{
BeatAction.New(gameObject, new List<BeatAction.Action>
BeatAction.New(this, new List<BeatAction.Action>
{
new BeatAction.Action(beat - 0.5, delegate
{
@ -815,12 +815,12 @@ namespace HeavenStudio.Games
public void ForthCountIn4Do(double beat, float length)
{
BeatAction.New(instance.gameObject, instance.ForthCountIn4Action(beat, length));
BeatAction.New(instance, instance.ForthCountIn4Action(beat, length));
}
public void ForthCountIn8Do(double beat, float length)
{
BeatAction.New(instance.gameObject, instance.ForthCountIn8Action(beat, length));
BeatAction.New(instance, instance.ForthCountIn8Action(beat, length));
}
private List<BeatAction.Action> ForthCountIn4Action(double beat, float length)
@ -905,7 +905,7 @@ namespace HeavenStudio.Games
public void ForthVoiceDo(double beat)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
instance.ForthVoiceAction(beat)
});
@ -1068,7 +1068,7 @@ namespace HeavenStudio.Games
tempCounts.Sort((x, y) => x.beat.CompareTo(y.beat));
BeatAction.New(instance.gameObject, tempCounts);
BeatAction.New(instance, tempCounts);
}
public override void OnPlay(double beat)
@ -1220,7 +1220,7 @@ namespace HeavenStudio.Games
if (!(silent || isBaBumBeat) || (isCatch && !silent))
SoundByte.PlayOneShotGame("airRally/nya_" + distanceString, beat, 1, 1, false, false, nyaOffsets[(int)DistanceAtBeat(beat)]);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{
@ -1336,7 +1336,7 @@ namespace HeavenStudio.Games
MultiSound.Play(sounds.ToArray());
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -1400,7 +1400,7 @@ namespace HeavenStudio.Games
if (IsCatchBeat(caller.startBeat + caller.timer + 1))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1, delegate
{
@ -1444,7 +1444,7 @@ namespace HeavenStudio.Games
if (IsCatchBeat(caller.startBeat + caller.timer + 2))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 2, delegate
{

View File

@ -70,7 +70,7 @@ namespace HeavenStudio.Games.Scripts_BoardMeeting
}
game.StopChairLoopSoundIfLastToStop();
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 1.5f, delegate { canBop = true; })
});

View File

@ -169,7 +169,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -192,7 +192,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("boardMeeting/three", beat + 1),
new MultiSound.Sound("boardMeeting/stopAll", beat + 2)
});
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { assistantAnim.DoScaledAnimationAsync("One", 0.5f); }),
new BeatAction.Action(beat + 1, delegate { assistantAnim.DoScaledAnimationAsync("Three", 0.5f); }),
@ -254,7 +254,7 @@ namespace HeavenStudio.Games
}));
}
stops.Add(new BeatAction.Action(beat + length * executiveCount + 0.5f, delegate { executivesCanBop = true; }));
BeatAction.New(instance.gameObject, stops);
BeatAction.New(instance, stops);
ScheduleInput(beat, length * (executiveCount - 1), InputType.STANDARD_DOWN, Just, Miss, Empty);
}
@ -295,7 +295,7 @@ namespace HeavenStudio.Games
executives[index].Spin(soundToPlay);
}));
}
BeatAction.New(instance.gameObject, rolls);
BeatAction.New(instance, rolls);
}
@ -402,7 +402,7 @@ namespace HeavenStudio.Games
}
SoundByte.PlayOneShotGame("boardMeeting/stopPlayer");
executives[executiveCount - 1].Stop();
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.timer + caller.startBeat + 1f, delegate
{
@ -436,7 +436,7 @@ namespace HeavenStudio.Games
executives[executiveCount - 1].Stop();
assistantAnim.DoScaledAnimationAsync("Stop", 0.5f);
SoundByte.PlayOneShotGame("boardMeeting/stopAllPlayer");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.timer + caller.startBeat + 1f, delegate
{

View File

@ -73,7 +73,7 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleDS
}, forcePlay: true
);
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(sinkBeat, delegate { moving = false; }),
});

View File

@ -343,7 +343,7 @@ namespace HeavenStudio.Games
}
}));
}
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
}
if (!autoLights && !shouldLights)
{
@ -470,7 +470,7 @@ namespace HeavenStudio.Games
public void MultiplePiano(double beat, float length, bool silent, int note1, int note2, int note3, int note4, int note5, int note6)
{
if (silent) return;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { PlayPiano(beat, length, note1); }),
new BeatAction.Action(beat + length, delegate { PlayPiano(beat + length, length, note2); }),

View File

@ -229,7 +229,7 @@ namespace HeavenStudio.Games
beat = beat - (isPineapple ? 2f : 1f);
if (GameManager.instance.currentGame == "catchyTune")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(spawnBeat, delegate { if (instance != null) instance.DropFruit(beat, side, smile, isPineapple, endSmile); }),
});
@ -274,7 +274,7 @@ namespace HeavenStudio.Games
bopRight = whoBopsAuto == (int)WhoBops.Alalin || whoBopsAuto == (int)WhoBops.Both;
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{

View File

@ -148,7 +148,7 @@ namespace HeavenStudio.Games.Scripts_CatchyTune
// play near miss animation
anim.DoScaledAnimation("barely", barelyStart, isPineapple ? 2f : 1f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(barelyStart + (isPineapple ? 2f : 1f), delegate { Destroy(this.gameObject); }),
});
@ -166,7 +166,7 @@ namespace HeavenStudio.Games.Scripts_CatchyTune
{
game.catchMiss(side, isPineapple);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + beatLength + (isPineapple ? 3f : 1.5f), delegate { Destroy(this.gameObject); }),
});

View File

@ -433,7 +433,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -476,7 +476,7 @@ namespace HeavenStudio.Games
cueBeat = beat;
cueLength = length - 1f;
if (!shouldSwitchColor) return;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length * 0.5f, delegate { shouldBeBlack = !shouldBeBlack; })
});
@ -523,7 +523,7 @@ namespace HeavenStudio.Games
}
MultiSound.Play(soundsToPlay.ToArray(), forcePlay: true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -660,7 +660,7 @@ namespace HeavenStudio.Games
}
MultiSound.Play(soundsToPlay.ToArray(), forcePlay: true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -836,7 +836,7 @@ namespace HeavenStudio.Games
break;
}
MultiSound.Play(soundsToPlay.ToArray(), forcePlay: true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -1012,7 +1012,7 @@ namespace HeavenStudio.Games
soundsToPlay.Add(new MultiSound.Sound("cheerReaders/bookDiagonal", beat));
}
MultiSound.Play(soundsToPlay.ToArray(), forcePlay: true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -1218,7 +1218,7 @@ namespace HeavenStudio.Games
break;
}
MultiSound.Play(soundsToPlay.ToArray(), forcePlay: true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -216,7 +216,7 @@ namespace HeavenStudio.Games
}
}
if (sounds.Count > 0) clapSounds = MultiSound.Play(sounds.ToArray());
if (actions.Count > 0) clapAction = BeatAction.New(this.gameObject, actions);
if (actions.Count > 0) clapAction = BeatAction.New(this, actions);
// prepare player input
ClappyTrioPlayer.QueueClap(beat, length * (Lion.Count - 1));
@ -249,7 +249,7 @@ namespace HeavenStudio.Games
bops.Add(new BeatAction.Action(spawnBeat, delegate { misses = 0; }));
}
}
if (bops.Count > 0) BeatAction.New(instance.gameObject, bops);
if (bops.Count > 0) BeatAction.New(instance, bops);
}
}

View File

@ -171,7 +171,7 @@ namespace HeavenStudio.Games
startBeat = inactiveStart + (stepsPassed * 2f);
// Cue the marching proper to begin when applicable.
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat - 0.25f, delegate { StartMarching(startBeat); })
});

View File

@ -279,7 +279,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
if (!isMole)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(pickedBeat + 0.5f, delegate { veggieSprite.sortingOrder = -1; }),
new BeatAction.Action(pickedBeat + pickTime, delegate { GameObject.Destroy(gameObject); })
@ -291,7 +291,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
}
else
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(pickedBeat + pickTime, delegate { GameObject.Destroy(gameObject); })
});

View File

@ -294,7 +294,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -363,7 +363,7 @@ namespace HeavenStudio.Games
}
BeatAction.New(djYellow, new List<BeatAction.Action>()
BeatAction.New(djYellowScript, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -422,7 +422,7 @@ namespace HeavenStudio.Games
}
BeatAction.New(djYellow, new List<BeatAction.Action>()
BeatAction.New(djYellowScript, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.5f, delegate
{
@ -494,7 +494,7 @@ namespace HeavenStudio.Games
});
BeatAction.New(djYellow, new List<BeatAction.Action>()
BeatAction.New(djYellowScript, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { djYellow.GetComponent<Animator>().DoScaledAnimationAsync("Scratcho", 0.5f); }),
new BeatAction.Action(beat + .5f, delegate { djYellow.GetComponent<Animator>().DoScaledAnimationAsync("Scratcho2", 0.5f); }),

View File

@ -206,7 +206,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
FlashFX(false);
swiping = true;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Swipe", 0, 0); }),
new BeatAction.Action(beat + 4f, delegate { swiping = false; }),
@ -226,7 +226,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
{
OnMissSwipeForPlayerInput(caller.timer + caller.startBeat + 1f);
SoundByte.PlayOneShotGame("djSchool/recordSwipe");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Swipe", 0, 0); }),
new BeatAction.Action(beat + 4f, delegate { swiping = false; }),
@ -254,7 +254,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
canBoo = false;
Invoke("EnableBoo", booSound.clip.length);
}
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.timer + caller.startBeat + 1f, delegate
{
@ -276,7 +276,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
//swiping = false;
mixer.audioMixer.FindSnapshot("Main").TransitionTo(.01f);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -55,7 +55,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
void Just(PlayerActionEvent caller, float state)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 3f, delegate
{

View File

@ -187,7 +187,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { SingleBop(); })
});
@ -220,7 +220,7 @@ namespace HeavenStudio.Games
else if (weaselsHappy) weasels.Happy();
if (!forceNoLeaves)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 1f, delegate
{
@ -321,7 +321,7 @@ namespace HeavenStudio.Games
if (hit)
{
lastHitWeasel = Conductor.instance.songPositionInBeatsAsDouble;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - (0.25f/3f), delegate { weasels.Hit(beat); }),
});
@ -329,7 +329,7 @@ namespace HeavenStudio.Games
else
{
lastHitWeasel = Conductor.instance.songPositionInBeatsAsDouble;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.25, delegate { weasels.Hide(beat + 0.25f); }),
});

View File

@ -48,7 +48,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
{
notHit = false;
anim.DoScaledAnimationAsync("WeaselsHide", 0.5f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.45f, delegate
{
@ -75,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
{
notHit = false;
anim.DoScaledAnimationAsync("WeaselsHit", 0.5f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate
{

View File

@ -63,7 +63,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
SoundByte.PlayOneShot("miss");
game.Kick(false);
GetComponent<SpriteRenderer>().sortingOrder = 8;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 4f, delegate
{
@ -73,7 +73,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
return;
}
Hit();
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 1f, delegate
{
@ -115,7 +115,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
}
}
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 5f, delegate
{

View File

@ -55,7 +55,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
void Just(PlayerActionEvent caller, float state)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 3f, delegate
{
@ -89,7 +89,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
SoundByte.PlayOneShotGame("doubleDate/weasel_hide");
game.MissKick(pathStartBeat + 2.25f);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 4f, delegate
{

View File

@ -22,7 +22,7 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
{
game.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+1f, delegate {
SoundByte.PlayOneShotGame("drummingPractice/drum");
@ -46,7 +46,7 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
private void Miss(PlayerActionEvent caller)
{
game.SetFaces(2);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+2f, delegate {
game.SetFaces(0);
@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
if (!_hit)
{
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+2f, delegate {
game.SetFaces(0);

View File

@ -182,7 +182,7 @@ namespace HeavenStudio.Games
moveAnim = exit ? "NPCDrummersExit" : "NPCDrummersEnter";
isMoving = true;
lastEase = (EasingFunction.Ease)ease;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 0.01f, delegate { isMoving = false; })
});
@ -195,7 +195,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { Bop(); })
});

View File

@ -400,7 +400,7 @@ namespace HeavenStudio.Games
goBopSpec = targetAuto == (int)IdolBopType.Both || targetAuto == (int)IdolBopType.Spectators;
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { BopSingle(target); })
});
@ -494,7 +494,7 @@ namespace HeavenStudio.Games
idolAnimator.Play("IdolCrap" + GetPerformanceSuffix(), -1, 0);
break;
case (int)IdolAnimations.Call:
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
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); }),
@ -507,21 +507,21 @@ namespace HeavenStudio.Games
DoIdolJump(beat, length);
break;
case (int)IdolAnimations.BigCall:
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall0" + GetPerformanceSuffix(), -1, 0); }),
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall1" + GetPerformanceSuffix(), -1, 0); }),
});
break;
case (int)IdolAnimations.Squat:
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat0" + GetPerformanceSuffix(), -1, 0); }),
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolSquat1" + GetPerformanceSuffix(), -1, 0); }),
});
break;
case (int)IdolAnimations.Wink:
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolWink0" + GetPerformanceSuffix(), -1, 0); }),
new BeatAction.Action(beat + length, delegate { Arisa.GetComponent<Animator>().Play("IdolWink1" + GetPerformanceSuffix(), -1, 0); }),
@ -573,7 +573,7 @@ namespace HeavenStudio.Games
idolJumpStartTime = beat;
//play anim
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolJump" + GetPerformanceSuffix(), -1, 0); }),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolLand" + GetPerformanceSuffix(), -1, 0); }),
@ -641,7 +641,7 @@ namespace HeavenStudio.Games
Prepare(beat + 5f);
Prepare(beat + 6f);
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { DoIdolPeace();}),
new BeatAction.Action(beat + 1f, delegate { DoIdolPeace();}),
@ -691,7 +691,7 @@ namespace HeavenStudio.Games
Prepare(beat + 3f, 2);
Prepare(beat + 4f, 1);
BeatAction.New(Arisa, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { DoIdolCall(0, isBig); Blue.PlayAnimState("Beat"); Orange.PlayAnimState("Beat"); }),
new BeatAction.Action(beat + (isBig ? 1f : 0.75f), delegate { DoIdolCall(1, isBig); }),
@ -753,7 +753,7 @@ namespace HeavenStudio.Games
DisableSpecBop(beat, 3.75f);
PlayAnimationAll("FanBigReady", onlyOverrideBop: true);
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate { PlayAnimationAll("FanBigReady", onlyOverrideBop: true); }),
new BeatAction.Action(beat + 2f, delegate { PlayAnimationAll("FanBigReady", onlyOverrideBop: true); }),
@ -846,7 +846,7 @@ namespace HeavenStudio.Games
}
// Jukebox.PlayOneShotGame("fanClub/play_clap", volume: 0.08f);
SoundByte.PlayOneShotGame("fanClub/crap_impact", pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 0.1f);
BeatAction.New(Spectators[who], new List<BeatAction.Action>()
BeatAction.New(Spectators[who].GetComponent<NtrIdolFan>(), new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Spectators[who].GetComponent<Animator>().Play("FanClap", -1, 0); }),
new BeatAction.Action(beat + 0.1f, delegate { Spectators[who].GetComponent<Animator>().Play("FanFree", -1, 0); }),
@ -855,7 +855,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
new BeatAction.Action(beat + 0.1f, delegate { PlayAnimationAll("FanFree", true, true);}),
@ -865,7 +865,7 @@ namespace HeavenStudio.Games
private void PlayLongClap(double beat)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
new BeatAction.Action(beat + 1f, delegate { PlayAnimationAll("FanFree", true, true);}),
@ -874,7 +874,7 @@ namespace HeavenStudio.Games
private void PlayChargeClap(double beat)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { PlayAnimationAll("FanClap", true, true);}),
new BeatAction.Action(beat + 0.1f, delegate { PlayAnimationAll("FanClapCharge", true, true);}),
@ -884,7 +884,7 @@ namespace HeavenStudio.Games
private void StartJump(int idx, double beat)
{
Spectators[idx].GetComponent<NtrIdolFan>().jumpStartTime = beat;
BeatAction.New(Spectators[idx], new List<BeatAction.Action>()
BeatAction.New(Spectators[idx].GetComponent<NtrIdolFan>(), 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);}),
@ -934,7 +934,7 @@ namespace HeavenStudio.Games
goBopSpec = false;
// recreation of sub61
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { StartClapLoop(beat, 1);}),
@ -972,7 +972,7 @@ namespace HeavenStudio.Games
void StartClapLoop(double beat, int who)
{
BeatAction.New(Spectators[who], new List<BeatAction.Action>()
BeatAction.New(Spectators[who].GetComponent<NtrIdolFan>(), new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { PlayOneClap(beat, who); }),
new BeatAction.Action(beat + 0.5f, delegate { StartClapLoop(beat + 0.5f, who); }),

View File

@ -163,7 +163,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
startJumpTime = beat;
//play anim
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
// new BeatAction.Action(beat, delegate { anim.Play("Jump", -1, 0); }),
new BeatAction.Action(beat + 1f, delegate { anim.Play("Land", -1, 0); }),
@ -197,14 +197,14 @@ namespace HeavenStudio.Games.Scripts_FanClub
DoIdolJump(beat);
break;
case (int) IdolAnimations.Squat:
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Squat0", -1, 0); }),
new BeatAction.Action(beat + length, delegate { anim.Play("Squat1", -1, 0); }),
});
break;
case (int) IdolAnimations.Wink:
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { anim.Play("Wink0", -1, 0); }),
new BeatAction.Action(beat + length, delegate { anim.Play("Wink1", -1, 0); }),

View File

@ -196,7 +196,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
clappingStartTime = cond.songPositionInBeatsAsDouble;
if (doCharge)
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(cond.songPositionInBeatsAsDouble + 0.1f, delegate {
if (PlayerInput.Pressing() || autoplayRelease > 0f)
@ -209,7 +209,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
if (autoplayRelease > 0f && !doCharge)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(cond.songPositionInBeatsAsDouble + autoplayRelease, delegate {
animator.Play("FanFree", -1, 0);

View File

@ -215,7 +215,7 @@ namespace HeavenStudio.Games
}
if (GameManager.instance.currentGame == "fireworks")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -280,7 +280,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("fireworks/practiceHai", beat + 2),
}, forcePlay: true);
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1, delegate
{

View File

@ -40,7 +40,7 @@ namespace HeavenStudio.Games.Scripts_Fireworks
{
anim.DoScaledAnimationAsync("ExplodeBomb", 0.25f);
exploded = true;
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 3f, delegate { Destroy(gameObject); })
});

View File

@ -270,7 +270,7 @@ namespace HeavenStudio.Games
AlienSpeakInactive(speakEventToCheck["spaceNum"]);
}
}
BeatAction.New(gameObject, queuedSpeaks);
BeatAction.New(this, queuedSpeaks);
}
public override void OnGameSwitch(double beat)
@ -404,7 +404,7 @@ namespace HeavenStudio.Games
ScheduleInput(beat, length + relativeBeat, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, AlienTapping, AlienOnMiss, AlienEmpty);
callDiagList.Add(input["dialogue"]);
}
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -450,7 +450,7 @@ namespace HeavenStudio.Games
MultiSound.Play(sound.ToArray());
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { alien.Play(animString, 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { alien.Play(animString, 0, 0); }),
@ -512,7 +512,7 @@ namespace HeavenStudio.Games
if (!stay)
{
BeatAction.New(missionControl, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { missionControl.SetActive(false); }),
});

View File

@ -44,7 +44,7 @@ namespace HeavenStudio.Games.Scripts_FirstContact
SoundByte.PlayOneShotGame("firstContact/failContact");
}
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(.5f, delegate { anim.Play("translator_speak", 0, 0);}),
});
@ -53,7 +53,7 @@ namespace HeavenStudio.Games.Scripts_FirstContact
public void EhTranslation()
{
SoundByte.PlayOneShotGame("firstContact/slightlyFail");
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(.5f, delegate { anim.Play("translator_eh", 0, 0);}),
});

View File

@ -322,7 +322,7 @@ namespace HeavenStudio.Games
goBopTuck = whoBopsAuto == (int)WhoBops.CaptainTuck || whoBopsAuto == (int)WhoBops.Both;
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -410,13 +410,13 @@ namespace HeavenStudio.Games
{
ScheduleInput(beat - 1, 1 + i, InputType.STANDARD_ALT_DOWN, JustFlipperRoll, MissFlipperRoll, Nothing);
queuedMovements.Add(beat + i);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i - 0.5f, delegate { moveLeft = flippers[0].left;})
});
foreach (var flipper in flippers)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { flipper.Flip(roll, true);})
});
@ -448,7 +448,7 @@ namespace HeavenStudio.Games
soundToPlay = $"flipperFlop/count/flopNoise{noiseToPlay}";
if (thatsItBarberShop)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -462,7 +462,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i - 0.5f, delegate
{
@ -482,7 +482,7 @@ namespace HeavenStudio.Games
else
{
string failingSoundToPlay = $"flipperFlop/count/flopCountFail{flopCount}";
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate {
string voiceLine = soundToPlay;
@ -507,7 +507,7 @@ namespace HeavenStudio.Games
if (appreciation != (int)AppreciationType.None && uh == 0 && i + 1 == length)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i + 1f, delegate
{
@ -537,7 +537,7 @@ namespace HeavenStudio.Games
}
if (appreciation == (int)AppreciationType.None && uh == 0 && i + 1 == length)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 0.1f, delegate { missed = false; currentCaptainBop = CaptainTuckBopType.Normal; captainTuckFaceAnim.Play("CaptainTuckNeutralExpression", 0, 0); })
});
@ -559,7 +559,7 @@ namespace HeavenStudio.Games
ScheduleInput(beat - 1, 1 + i, InputType.STANDARD_DOWN, JustFlip, MissFlip, Nothing);
foreach (var flipper in flippers)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { flipper.Flip(roll, true); CaptainTuckBop(); })
});
@ -574,7 +574,7 @@ namespace HeavenStudio.Games
string voiceLine = $"flipperFlop/uh{voiceLineIndex}";
string failVoiceLine = $"flipperFlop/uhfail{voiceLineIndex}";
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length + i, delegate {
string voiceLineToPlay = voiceLine;
@ -596,7 +596,7 @@ namespace HeavenStudio.Games
}),
});
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length + uh, delegate
{
@ -626,7 +626,7 @@ namespace HeavenStudio.Games
}
else if (uh > 0 && flopCount == 4)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate
{
@ -668,14 +668,14 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("flipperFlop/appreciation/good");
if (heart)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckBlushExpression", 0.5f); })
});
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 0.5f); })
});
@ -685,14 +685,14 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("flipperFlop/appreciation/goodjob");
if (heart)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckBlushExpression", 0.5f); })
});
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 1f); }),
new BeatAction.Action(beat + 0.5f, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 0.5f); })
@ -703,14 +703,14 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("flipperFlop/appreciation/nice");
if (heart)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckBlushExpression", 0.5f); })
});
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 0.5f); })
});
@ -720,14 +720,14 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("flipperFlop/appreciation/welldone");
if (heart)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckBlushExpression", 0.5f); })
});
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 1f); }),
new BeatAction.Action(beat + 0.5f, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 0.5f); })
@ -738,14 +738,14 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("flipperFlop/appreciation/yes");
if (heart)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckBlushExpression", 0.5f); })
});
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { instance.captainTuckFaceAnim.DoScaledAnimationAsync("CaptainTuckSpeakExpression", 0.5f); })
});
@ -770,14 +770,14 @@ namespace HeavenStudio.Games
ScheduleInput(beat, 3, InputType.STANDARD_DOWN, JustFlip, MissFlip, Nothing);
foreach (var flipper in flippers)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2, delegate { flipper.Flip(false, true);}),
new BeatAction.Action(beat + 2.5f, delegate { flipper.Flip(false, true);}),
new BeatAction.Action(beat + 3, delegate { flipper.Flip(false, true);})
});
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2, delegate {captainTuckAnim.DoScaledAnimationAsync("CaptainBop", 0.5f); }),
new BeatAction.Action(beat + 3, delegate {captainTuckAnim.DoScaledAnimationAsync("CaptainBop", 0.5f); }),
@ -892,7 +892,7 @@ namespace HeavenStudio.Games
}
}
BeatAction.New(instance.gameObject, speaks);
BeatAction.New(instance, speaks);
}
public static void FlipperRollVoiceLine(double beat, int amount, bool now)
@ -1043,7 +1043,7 @@ namespace HeavenStudio.Games
}
}
BeatAction.New(instance.gameObject, speaks);
BeatAction.New(instance, speaks);
}
public void JustFlip(PlayerActionEvent caller, float state)

View File

@ -42,7 +42,7 @@ namespace HeavenStudio.Games.Scripts_FlipperFlop
leftImpact.SetActive(true);
}
faceAnim.Play("FaceAngry", 0, 0);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.1f, delegate { leftImpact.SetActive(false); rightImpact.SetActive(false); }),
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.3f, delegate { faceAnim.Play("FaceAnnoyed", 0, 0); })
@ -76,7 +76,7 @@ namespace HeavenStudio.Games.Scripts_FlipperFlop
canBlink = false;
SoundByte.PlayOneShotGame("flipperFlop/failgroan");
game.BumpIntoOtherSeal(!left);
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.3f, delegate { faceAnim.Play("FaceGoofy"); }),
});
@ -118,7 +118,7 @@ namespace HeavenStudio.Games.Scripts_FlipperFlop
SoundByte.PlayOneShotGame("flipperFlop/punch", -1, 1, 0.5f);
anim.DoScaledAnimationAsync(shouldReverse + "MissFlop" + leftOrRight, 0.5f);
game.BumpIntoOtherSeal(!left);
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.3f, delegate { faceAnim.Play("FaceGoofy"); }),
});

View File

@ -158,7 +158,7 @@ namespace HeavenStudio.Games
{
playerInstance.shouldBop = (autoBop || doesBop);
if (!autoBop && doesBop) {
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + length, delegate {
playerInstance.shouldBop = false;
})

View File

@ -199,7 +199,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
private void Miss(PlayerActionEvent caller)
{
SoundByte.PlayOneShot("forkLifter/disappointed");
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+ 2.45f, delegate {
Destroy(this.gameObject);

View File

@ -77,7 +77,7 @@ namespace HeavenStudio.Games.Scripts_GleeClub
if (currentSound != null) SoundByte.KillLoop(currentSound, 0f);
SoundByte.PlayOneShotGame("gleeClub/LoudWailStart");
currentSound = SoundByte.PlayOneShotGame("gleeClub/LoudWailLoop", -1, currentPitch, 1f, true);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 1f, delegate { UnYell(); })
});

View File

@ -284,7 +284,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("gleeClub/togetherEN-04", beat + 2f, conductorPitch, 1, false, 0.02f),
});
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate
{
@ -336,7 +336,7 @@ namespace HeavenStudio.Games
{
StartInterval(beat, length);
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { if (closeMouth != (int)MouthOpenClose.OnlyClose) leftChorusKid.currentPitch = pitch; leftChorusKid.StartSinging(); }),
new BeatAction.Action(beat + length, delegate { if (closeMouth != (int)MouthOpenClose.OnlyOpen) leftChorusKid.StopSinging(); }),
@ -374,7 +374,7 @@ namespace HeavenStudio.Games
float pitchLeft2 = SoundByte.GetPitchFromSemiTones(sing.semiTonesLeft2, true);
float pitchLeft3 = SoundByte.GetPitchFromSemiTones(sing.semiTonesLeft3, true);
float pitchMiddle2 = SoundByte.GetPitchFromSemiTones(sing.semiTonesMiddle2, true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length + sing.startBeat, delegate
{
@ -441,7 +441,7 @@ namespace HeavenStudio.Games
{
missed = false;
if (!playerChorusKid.disappeared) ScheduleInput(beat, 1, InputType.STANDARD_DOWN, JustBaton, MissBaton, Out);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -476,7 +476,7 @@ namespace HeavenStudio.Games
public void ShowHeart(double beat)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -763,7 +763,7 @@ namespace HeavenStudio.Games
int comboId = KarateManPot.GetNewCombo();
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { CreateItemInstance(beat, "Item00", 0, KarateManPot.ItemType.ComboPot1, comboId); }),
new BeatAction.Action(beat + 0.25f, delegate { CreateItemInstance(beat + 0.25f, "Item00", 0, KarateManPot.ItemType.ComboPot2, comboId); }),
@ -1043,7 +1043,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{

View File

@ -276,7 +276,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public void ForceFailCombo(double beat)
{
if (inCombo) return;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Punch(1); inCombo = true; inComboId = -1; shouldComboId = -1;}),
new BeatAction.Action(beat + 0.25f, delegate { Punch(2); }),
@ -297,7 +297,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
wantKick = true;
unPrepareTime = double.MinValue;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate {
if (wantKick)

View File

@ -186,20 +186,20 @@ namespace HeavenStudio.Games.Scripts_KarateMan
break;
case ItemType.ComboPot2:
path = 1;
BeatAction.New(gameObject, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
BeatAction.New(this, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
break;
case ItemType.ComboPot3:
path = 2;
BeatAction.New(gameObject, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
BeatAction.New(this, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
break;
case ItemType.ComboPot4:
path = 3;
//if the button isn't held anymore make Joe spin
BeatAction.New(gameObject, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
BeatAction.New(this, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
break;
case ItemType.ComboPot5:
path = 4;
BeatAction.New(gameObject, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
BeatAction.New(this, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
break;
case ItemType.ComboBarrel:
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_ALT_UP, ComboEndJustOrNg, ComboEndThrough, ComboEndOut, CanComboEnd);
@ -711,7 +711,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
if (OnHitExpression == (int) KarateMan.KarateManFaces.Normal)
return;
var joe = KarateMan.instance.Joe;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(offset, delegate {
joe.SetFaceExpression(OnHitExpression);
@ -741,7 +741,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
status = FlyStatus.NG;
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
@ -792,7 +792,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ItemHitEffect();
}
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 4f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
@ -811,7 +811,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var joe = KarateMan.instance.Joe;
if (GameManager.instance.currentGame != "karateman") return;
if (status != FlyStatus.Fly || gameObject == null) return;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
@ -862,7 +862,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var joe = KarateMan.instance.Joe;
if (GameManager.instance.currentGame != "karateman") return;
if (status != FlyStatus.Fly || gameObject == null) return;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
@ -919,7 +919,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
SoundByte.PlayOneShot("miss");
status = FlyStatus.NG;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
@ -959,7 +959,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var joe = KarateMan.instance.Joe;
if (joe.GetComboId() != comboId || !joe.inCombo)
{
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
@ -973,7 +973,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
else
{
joe.SetFaceExpression((int) KarateMan.KarateManFaces.VerySad);
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 1.5f, delegate {
joe.inCombo = false;
@ -1007,7 +1007,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
status = FlyStatus.NG;
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
@ -1030,7 +1030,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var joe = KarateMan.instance.Joe;
if (GameManager.instance.currentGame != "karateman") return;
if (status != FlyStatus.Fly || gameObject == null) return;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
@ -1065,7 +1065,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
SoundByte.PlayOneShot("miss");
status = FlyStatus.NG;
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 1.25f, delegate {
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
@ -1096,7 +1096,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
if (GameManager.instance.currentGame != "karateman") return;
if (status != FlyStatus.Fly || gameObject == null) return;
BeatAction.New(KarateMan.instance.Joe.gameObject, new List<BeatAction.Action>()
BeatAction.New(KarateMan.instance.Joe, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat + 2f, delegate {
KarateMan.instance.Joe.SetFaceExpression((int) KarateMan.KarateManFaces.VerySad);

View File

@ -62,10 +62,10 @@ namespace HeavenStudio.Games.Loaders
new GameAction("bgcolor", "Background Color")
{
function = delegate
function = delegate
{
var e = eventCaller.currentEntity;
Kitties.instance.BackgroundColor(e.beat, e.length, e["colorStart"], e["colorEnd"], e["ease"]);
Kitties.instance.BackgroundColor(e.beat, e.length, e["colorStart"], e["colorEnd"], e["ease"]);
},
defaultLength = 4,
resizable = true,
@ -77,9 +77,9 @@ namespace HeavenStudio.Games.Loaders
}
}
},
new List<string>() {"ctr", "normal"},
new List<string>() { "ctr", "normal" },
"ctrteppan", "en",
new List<string>() {}
new List<string>() { }
);
}
}
@ -130,23 +130,23 @@ namespace HeavenStudio.Games
new MultiSound.Sound("kitties/nya3", beat + 1.5f)
});
if(type == 3)
if (type == 3)
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Spawn(type, 0, isMice, isInverse, true, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[0].Play("FaceClap", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[0].Play("FaceClap", 0, 0);}),
});
BeatAction.New(Cats[1], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + .75f, delegate { Spawn(type, 1, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[1].Play("FaceClap", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[1].Play("FaceClap", 0, 0);}),
});
BeatAction.New(Cats[2], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate { Spawn(type, 2, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 1.5f, delegate { player.canClap = true;}),
@ -155,21 +155,21 @@ namespace HeavenStudio.Games
else if (!isMice)
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Spawn(type, 0, isMice, isInverse, true, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[0].Play("Clap1", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[0].Play("Clap2", 0, 0);}),
});
BeatAction.New(Cats[1], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + .75f, delegate { Spawn(type, 1, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[1].Play("Clap1", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[1].Play("Clap2", 0, 0);}),
});
BeatAction.New(Cats[2], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate { Spawn(type, 2, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 1.5f, delegate { player.canClap = true;}),
@ -178,21 +178,21 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Spawn(type, 0, isMice, isInverse, true, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[0].Play("MiceClap1", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[0].Play("MiceClap2", 0, 0);}),
});
BeatAction.New(Cats[1], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + .75f, delegate { Spawn(type, 1, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 2.5f, delegate { kitties[1].Play("MiceClap1", 0, 0);}),
new BeatAction.Action(beat + 3f, delegate { kitties[1].Play("MiceClap2", 0, 0);}),
});
BeatAction.New(Cats[2], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.5f, delegate { Spawn(type, 2, isMice, isInverse, false, false);}),
new BeatAction.Action(beat + 1.5f, delegate { player.canClap = true;}),
@ -202,7 +202,7 @@ namespace HeavenStudio.Games
if (!keepSpawned)
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3.5f, delegate { RemoveCats(false);})
});
@ -221,7 +221,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("kitties/roll4", beat + 1.5f)
});
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { kitties[0].Play("RollStart", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { kitties[0].Play("RollStart", 0, 0); }),
@ -231,7 +231,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat + 2.75f, delegate { kitties[0].Play("RollEnd", 0, 0); })
});
BeatAction.New(Cats[1], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { kitties[1].Play("RollStart", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { kitties[1].Play("RollStart", 0, 0); }),
@ -241,7 +241,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat + 2.75f, delegate { kitties[1].Play("RollEnd", 0, 0); })
});
BeatAction.New(Cats[2], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { kitties[2].Play("RollStart", 0, 0); }),
new BeatAction.Action(beat + .5f, delegate { kitties[2].Play("RollStart", 0, 0); }),
@ -252,7 +252,7 @@ namespace HeavenStudio.Games
if (!keepSpawned)
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3.5f, delegate { RemoveCats(false);})
});
@ -263,7 +263,7 @@ namespace HeavenStudio.Games
{
//if (!player.canClap)
// return;
player.ScheduleFish(beat);
MultiSound.Play(new MultiSound.Sound[] {
new MultiSound.Sound("kitties/fish1", beat + 2f),
@ -272,20 +272,20 @@ namespace HeavenStudio.Games
});
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { if (isInverted)
Fish.transform.localScale = new Vector3(-1f, 1f, 1f);
else
Fish.transform.localScale = new Vector3(1f, 1f, 1f); }),
new BeatAction.Action(beat, delegate { Fish.SetActive(true); }),
new BeatAction.Action(beat, delegate { Fish.SetActive(true); }),
new BeatAction.Action(beat, delegate { Fish.GetComponent<Animator>().DoScaledAnimationAsync("FishDangle", 0.5f); }),
new BeatAction.Action(beat + 2f, delegate { kitties[0].Play("FishNotice", 0, 0); }),
new BeatAction.Action(beat + 2.25f, delegate { kitties[1].Play("FishNotice2", 0, 0); }),
new BeatAction.Action(beat + 2.5f, delegate { kitties[2].Play("FishNotice3", 0, 0); })
});
BeatAction.New(Fish, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 4f, delegate { Fish.SetActive(false);})
});
@ -400,7 +400,7 @@ namespace HeavenStudio.Games
}
else
{
if(pos == 3)
if (pos == 3)
kitties[catNum].Play("FaceIdle", 0, 0);
else if (!isMice)
kitties[catNum].Play("Idle", 0, 0);
@ -429,12 +429,12 @@ namespace HeavenStudio.Games
}
else
Fish.SetActive(false);
player.canClap = false;
player.canClap = false;
}
public void InstantSpawn(bool isMice, bool isInverse, double beat, int pos)
{
BeatAction.New(Cats[0], new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Spawn(pos, 0, isMice, isInverse, true, true); }),
new BeatAction.Action(beat, delegate { Spawn(pos, 1, isMice, isInverse, true, true); }),

View File

@ -405,7 +405,7 @@ namespace HeavenStudio.Games
rocketScript.InitBowlingPin(beat);
break;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + beatOffset, delegate { rocketScript.Rise(); })
});

View File

@ -60,7 +60,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/rocket_note", beat + 2, pitches[2]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -86,7 +86,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/popper_note", beat + 1.66f, pitches[4]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -116,7 +116,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/bell_short", beat + 1.83f, pitches[6]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -154,7 +154,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/flute", beat + 1.83f, pitches[12]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -171,7 +171,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -185,7 +185,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
string leftOrRight = (UnityEngine.Random.Range(1, 3) == 1) ? "Left" : "Right";
anim.Play("RocketBarely" + leftOrRight, 0, 0);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -203,7 +203,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/rocket_note", caller.startBeat + caller.timer, pitches[3]),
new MultiSound.Sound("launchParty/rocket_family", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -217,7 +217,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -229,7 +229,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -247,7 +247,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/popper_note", caller.startBeat + caller.timer, pitches[5]),
new MultiSound.Sound("launchParty/rocket_crackerblast", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -261,7 +261,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -273,7 +273,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -291,7 +291,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/bell_note", caller.startBeat + caller.timer, pitches[7]),
new MultiSound.Sound("launchParty/bell_blast", caller.startBeat + caller.timer, pitches[8]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -305,7 +305,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -317,7 +317,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -336,7 +336,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/pin", caller.startBeat + caller.timer, pitches[14]),
new MultiSound.Sound("launchParty/rocket_bowling", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -349,7 +349,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
SoundByte.PlayOneShotGame("launchParty/miss");
number.SetActive(false);
anim.Play("RocketMiss", 0, 0);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});

View File

@ -410,7 +410,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -493,7 +493,7 @@ namespace HeavenStudio.Games
{
if (action.beat >= gameswitchBeat) actions.Add(action);
}
if (actions.Count > 0) BeatAction.New(instance.gameObject, actions);
if (actions.Count > 0) BeatAction.New(instance, actions);
}
public static void OffbeatSwitchSound(double beat, bool hoSound, bool sound)
@ -556,7 +556,7 @@ namespace HeavenStudio.Games
{
if (action.beat >= gameswitchBeat) actions.Add(action);
}
if (actions.Count > 0) BeatAction.New(instance.gameObject, actions);
if (actions.Count > 0) BeatAction.New(instance, actions);
}
private struct QueuedMarch
@ -627,7 +627,7 @@ namespace HeavenStudio.Games
}));
ScheduleInput(stepBeat - 1, 1, InputType.STANDARD_DOWN, offBeat ? JustOff : JustOn, offBeat ? MissOff : MissOn, Nothing);
}
BeatAction.New(gameObject, steps);
BeatAction.New(this, steps);
}
private void StartMarching(double beat, bool sound, int amount, bool visual)
@ -636,7 +636,7 @@ namespace HeavenStudio.Games
bool offBeat = beat % 1 != 0;
if (visual)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { ChangeBeatBackGroundColour(offBeat); })
});
@ -661,7 +661,7 @@ namespace HeavenStudio.Games
bool offBeat = beat % 1 != 0;
bool bachOnBeat = BachOnBeat(beat);
ScheduleInput(beat - 1, 1, InputType.STANDARD_DOWN, offBeat ? JustOff : JustOn, offBeat ? MissOff : MissOn, Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -277,7 +277,7 @@ namespace HeavenStudio.Games
if (Conductor.instance.isPlaying && !Conductor.instance.isPaused) {
if (queuedMarches.Count > 0) {
foreach (var march in queuedMarches) {
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(march, delegate {
ScheduleInput(march, 1f, InputType.STANDARD_DOWN, MarchHit, GenericMiss, Empty);
}),
@ -388,7 +388,7 @@ namespace HeavenStudio.Games
shouldClap = clap;
if (shouldBop) {
for (int i = 0; i < length; i++) {
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat + i, delegate {
foreach (var cadet in Cadets) cadet.DoScaledAnimationAsync(shouldClap ? "Clap" : "Bop", 0.5f);
CadetPlayer.DoScaledAnimationAsync(shouldClap ? "Clap" : "Bop", 0.5f);
@ -400,7 +400,7 @@ namespace HeavenStudio.Games
public void SargeAttention(double beat)
{
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + 0.25f, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),
});
}
@ -420,7 +420,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++) {
ScheduleInput(beat + i - 0.2f, 0.2f, InputType.STANDARD_DOWN, MarchHit, GenericMiss, Empty);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat + i, delegate {
marchOtherCount++;
foreach (var cadet in Cadets) cadet.DoScaledAnimationAsync(marchOtherCount % 2 != 0 ? "MarchR" : "MarchL", 0.5f);
@ -432,7 +432,7 @@ namespace HeavenStudio.Games
public void PreMarch(double beat)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1f, delegate {
foreach (var cadet in Cadets) cadet.DoScaledAnimationAsync("MarchL", 0.5f);
@ -447,7 +447,7 @@ namespace HeavenStudio.Games
HaltSound(beat);
ScheduleInput(beat, 1f, InputType.STANDARD_ALT_DOWN, HaltHit, GenericMiss, Empty);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate { foreach (var cadet in Cadets) cadet.DoScaledAnimationAsync("Halt", 0.5f);}),
@ -468,14 +468,14 @@ namespace HeavenStudio.Games
new MultiSound.Sound("marchingOrders/turnAction", beat + turnLength + 2f),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + turnLength + 2f,delegate {
if (shouldPoint) foreach (var cadet in Cadets) cadet.DoScaledAnimationAsync($"Point{(x ? "R" : "L")}", 0.5f);
foreach (var head in CadetHeads) head.DoScaledAnimationAsync($"Face{(x ? "R" : "L")}", 0.5f);
})
});
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),
new BeatAction.Action(beat + turnLength + 1f, delegate { Sarge.DoScaledAnimationAsync("Talk", 0.5f);}),

View File

@ -155,7 +155,7 @@ namespace HeavenStudio.Games
bossBop = autoBop;
if (doesBop) {
for (int i = 0; i < length; i++) {
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat + i, delegate {
if (!BossAnim.IsPlayingAnimationName("BossCall") && !BossAnim.IsPlayingAnimationName("BossSignal")) {
BossAnim.DoScaledAnimationAsync(bossAnnoyed ? "BossMiss" : "Bop", 0.5f);
@ -178,7 +178,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("meatGrinder/startSignal", beat - 1, forcePlay: true);
if (GameManager.instance.currentGame == "meatGrinder") {
BeatAction.New(MeatGrinder.instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(MeatGrinder.instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat - 1, delegate {
MeatGrinder.instance.BossAnim.DoScaledAnimationAsync("BossSignal", 0.5f);
}),
@ -194,7 +194,7 @@ namespace HeavenStudio.Games
intervalStarted = true;
beatInterval = length;
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + length - 0.33f, delegate { PassTurn(beat); }),
});
}
@ -225,7 +225,7 @@ namespace HeavenStudio.Games
intervalStarted = false;
foreach (var input in queuedInputs)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(input + beatInterval , delegate {
MeatToss Meat = Instantiate(MeatBase, gameObject.transform).GetComponent<MeatToss>();

View File

@ -29,7 +29,7 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
{
game.ScheduleInput(startBeat, cueLength, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Hit, Miss, Nothing);
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(cueBased ? startBeat + 0.66f : cueLength + startBeat - 1 + 0.66f, delegate {
anim.DoScaledAnimationAsync(meatType+"Thrown", 0.32f);
}),

View File

@ -175,7 +175,7 @@ namespace HeavenStudio.Games
{
if (beat >= startBlippingBeat) {
double tempBeat = ((beat % 1 == 0.5) ? Mathf.Floor((float)beat) : Mathf.Round((float)beat)) + (startBlippingBeat % 1);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(tempBeat, delegate { man.RecursiveBlipping(tempBeat); })
});
startBlippingBeat = double.MaxValue;
@ -223,7 +223,7 @@ namespace HeavenStudio.Games
if (stopBlipping) instance.stopBlipping = true;
if (playDing) SoundByte.PlayOneShotGame("mrUpbeat/ding", beat: beat, forcePlay: true);
if (applause) SoundByte.PlayOneShot("applause", beat: beat);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat + 0.5, delegate {
instance.stopStepping = false;
instance.stopBlipping = false;
@ -255,7 +255,7 @@ namespace HeavenStudio.Games
metronomeAnim.DoScaledAnimationAsync("MetronomeGo" + dir, 0.5f);
SoundByte.PlayOneShotGame("mrUpbeat/metronome" + dir);
ScheduleInput(beat, 0.5f, InputType.STANDARD_DOWN, Success, Miss, Nothing);
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + 1, delegate { RecursiveStepping(beat + 1); })
});
stepIterate++;
@ -274,7 +274,7 @@ namespace HeavenStudio.Games
stepIterate++;
}));
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
}
public static void Blipping(double beat, float length)

View File

@ -44,7 +44,7 @@ namespace HeavenStudio.Games.Scripts_MrUpbeat
if (shouldBlip) {
Blipping(beat);
}
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + 1, delegate { RecursiveBlipping(beat + 1); })
});
}

View File

@ -423,7 +423,7 @@ namespace HeavenStudio.Games
public void OneGoCue(double beat, Color firstColor)
{
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat, delegate {
OneGiverAnim.DoScaledAnimationAsync("GiveIn", 0.5f);
// dumpling
@ -453,7 +453,7 @@ namespace HeavenStudio.Games
public void TwoTwoCue(double beat, Color firstColor, Color secondColor)
{
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat-0.5f, delegate {
TwoGiverAnim.DoScaledAnimationAsync("GiveIn", 0.5f);
// first dumpling
@ -492,7 +492,7 @@ namespace HeavenStudio.Games
public void ThreeGoCue(double beat, Color firstColor, Color secondColor, Color thirdColor)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat, delegate {
// first in
ThreeGiverAnim.DoScaledAnimationAsync("GiveIn", 0.5f);

View File

@ -278,7 +278,7 @@ namespace HeavenStudio.Games
if (GameManager.instance.currentGame != "octopusMachine") {
OctopusMachine.queuePrepare = true;
} else {
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
BeatAction.New(instance, new List<BeatAction.Action>() {
new BeatAction.Action(beat - prepBeats, delegate {
OctopusMachine.queuePrepare = true;
})
@ -415,7 +415,7 @@ namespace HeavenStudio.Games
intervalStartBeat = beat;
beatInterval = length;
intervalStarted = true;
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(beat + length, delegate {
PassTurn(beat + length);
}),
@ -445,7 +445,7 @@ namespace HeavenStudio.Games
// thanks to ras for giving me this line of code
// i do NOT understand how it works
queuedInputs.Sort((s1, s2) => s1.beat.CompareTo(s2.beat));
BeatAction.New(gameObject, queuedInputs);
BeatAction.New(this, queuedInputs);
}
private void SqueezeHit(PlayerActionEvent caller, float state)

View File

@ -181,7 +181,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty
if (action != (int) PajamaParty.SleepType.NoAwake)
seq.Add(new BeatAction.Action( beat + 7f, delegate { anim.DoScaledAnimationAsync("MonkeyAwake"); }));
BeatAction.New(Monkey, seq);
BeatAction.New(this, seq);
}
}
}

View File

@ -208,7 +208,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty
else
{
anim.DoScaledAnimationAsync("MakoThrowOut", 0.5f);
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(
beat + 0.5f,
@ -231,7 +231,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty
charging = false;
canCharge = false;
canJump = false;
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(
beat + 0.5f,
@ -366,7 +366,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty
longSleep = true;
}
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(
beat,
@ -418,7 +418,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty
if (!longSleep)
{
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(
caller.startBeat + 7f,

View File

@ -204,7 +204,7 @@ namespace HeavenStudio.Games
}
}));
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
}
}
@ -218,7 +218,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("pajamaParty/three3", beat + 2f),
});
BeatAction.New(Bed, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(
beat,
@ -265,7 +265,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("pajamaParty/five5", beat + 2f)
});
BeatAction.New(Bed, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action( beat, delegate { JumpRow(4, beat); }),
new BeatAction.Action( beat + 0.5f, delegate { JumpRow(3, beat + 0.5f, 2); }),
@ -293,7 +293,7 @@ namespace HeavenStudio.Games
if (doSound)
PlayThrowSequenceSound(beat);
BeatAction.New(Mako.Player, new List<BeatAction.Action>()
BeatAction.New(Mako, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { MonkeyCharge(beat + 2f); } ),
new BeatAction.Action(beat + 3f, delegate { MonkeyThrow(beat + 3f); } ),
@ -358,7 +358,7 @@ namespace HeavenStudio.Games
}
if (action == 1) return;
BeatAction.New(gameObject, new List<BeatAction.Action>() {
BeatAction.New(this, new List<BeatAction.Action>() {
new BeatAction.Action(deslumber, delegate {
Mako.anim.DoScaledAnimationAsync("MakoAwake", 0.5f);
SoundByte.PlayOneShotGame("pajamaParty/siestaDone");

View File

@ -471,7 +471,7 @@ namespace HeavenStudio.Games
HostPressButton(inputBeat, isDpad);
}));
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
if (autoPassTurn)
{
@ -595,7 +595,7 @@ namespace HeavenStudio.Games
),
new BeatAction.Action(beat + length + intervalLength + timeUpBeat, delegate { if (timeUpSound && !consecutive) SoundByte.PlayOneShotGame("quizShow/timeUp"); }),
};
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
}
void ContesteePressButton(bool dpad)
@ -677,7 +677,7 @@ namespace HeavenStudio.Games
public void RevealAnswer(double beat, float length)
{
blackOut.SetActive(true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate
{

View File

@ -90,7 +90,7 @@ namespace HeavenStudio.Games.Scripts_RhythmRally
public void BounceFX(double bounceBeat)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(bounceBeat, delegate
{

View File

@ -374,7 +374,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -500,7 +500,7 @@ namespace HeavenStudio.Games
{
if (speedChange == RallySpeed.Fast)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { Serve(beat + 2f, RallySpeed.Fast); })
});
@ -538,7 +538,7 @@ namespace HeavenStudio.Games
double beatToSpawn = beat + i;
servesToPerform.Add( new BeatAction.Action(beatToSpawn, delegate { Serve(beatToSpawn, RallySpeed.SuperFast); }) );
}
BeatAction.New(gameObject, servesToPerform);
BeatAction.New(this, servesToPerform);
}
}
}

View File

@ -111,7 +111,7 @@ namespace HeavenStudio.Games
backArm.Play("BackArmLift", 0, 0);
FrontArm.DoScaledAnimationAsync("ArmSlurp", 0.5f);
hasSlurped = true;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1f, delegate
{
@ -132,7 +132,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -153,7 +153,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f),
});
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}),
new BeatAction.Action(beat + 1.0f, delegate { FarCrane.Play("Open", -1, 0);}),
@ -172,7 +172,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f),
});
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}),
new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.Play("OpenClose", -1, 0);}),
@ -193,7 +193,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f),
});
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}),
new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}),
@ -210,7 +210,7 @@ namespace HeavenStudio.Games
//Bell Sound lol
SoundByte.PlayOneShotGame("rhythmSomen/somen_bell");
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { EffectExclam.Play("ExclamAppear", -1, 0);}),
});

View File

@ -26,7 +26,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
{
peekBeat = beat - 1;
peekRising = true;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { peekBeat = beat + length; peekRising = false; shouldDelete = true; })
});

View File

@ -297,7 +297,7 @@ namespace HeavenStudio.Games
Hair hair = Instantiate(hairBase, transform).GetComponent<Hair>();
spawnedHairs.Add(hair);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -322,7 +322,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("rhythmTweezers/longAppear", beat);
LongHair hair = Instantiate(longHairBase, transform).GetComponent<LongHair>();
spawnedLongs.Add(hair);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -417,7 +417,7 @@ namespace HeavenStudio.Games
Tweezers spawnedTweezers = Instantiate(Tweezers, transform);
spawnedTweezers.gameObject.SetActive(true);
spawnedTweezers.Init(beat, beat + length);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 0.25, delegate
{

View File

@ -235,7 +235,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame($"ringside/yell{UnityEngine.Random.Range(1, 7)}Raw");
SoundByte.PlayOneShotGame("ringside/barely");
wrestlerTransform.localScale = new Vector3(1.1f, 1.1f, 1f);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(cond.songPositionInBeatsAsDouble + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
});
@ -301,7 +301,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -376,7 +376,7 @@ namespace HeavenStudio.Games
{
int currentQuestion = questionVariant;
if (currentQuestion == (int)QuestionVariant.Random) currentQuestion = UnityEngine.Random.Range(1, 4);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 0.5f, delegate { reporterAnim.DoScaledAnimationAsync("WubbaLubbaDubbaThatTrue", 0.4f); }),
});
@ -392,7 +392,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound($"ringside/true{currentQuestion}", beat + 1f),
}, forcePlay: true);
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, JustQuestion, Miss, Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.5f, delegate { reporterAnim.DoScaledAnimationAsync("ThatTrue", 0.5f); }),
new BeatAction.Action(beat + 1.5f, delegate { canBop = false; }),
@ -418,7 +418,7 @@ namespace HeavenStudio.Games
ScheduleInput(beat, 2.5f, InputType.STANDARD_DOWN, JustBigGuyFirst, MissBigGuyOne, Nothing);
ScheduleInput(beat, 3f, InputType.STANDARD_DOWN, JustBigGuySecond, MissBigGuyTwo, Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2f, delegate { reporterAnim.Play("True", 0, 0); }),
new BeatAction.Action(beat + 2.25f, delegate { canBop = false; }),
@ -464,7 +464,7 @@ namespace HeavenStudio.Games
{
reporterShouldHeart = false;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -496,7 +496,7 @@ namespace HeavenStudio.Games
{
if (newspaperBeats > 0)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3f, delegate
{
@ -540,7 +540,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3.99f, delegate
{
@ -553,7 +553,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2.5f, delegate
{
@ -563,7 +563,7 @@ namespace HeavenStudio.Games
});
if (newspaperBeats > 0)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3f, delegate
{
@ -684,7 +684,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame($"ringside/cough");
reporterAnim.Play("ExtendMiss", 0, 0);
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
@ -699,7 +699,7 @@ namespace HeavenStudio.Games
wrestlerAnim.DoScaledAnimationAsync("Ye", 0.5f);
reporterAnim.Play("ExtendSmile", 0, 0);
SoundByte.PlayOneShotGame($"ringside/ye{UnityEngine.Random.Range(1, 4)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { SoundByte.PlayOneShotGame("ringside/yeCamera"); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { FadeFlashColor(Color.white, new Color(1, 1, 1, 0), 0.5f); }),
@ -737,7 +737,7 @@ namespace HeavenStudio.Games
wrestlerAnim.DoScaledAnimationAsync("BigGuyTwo", 0.5f);
if (!missedBigGuy)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
});
@ -746,7 +746,7 @@ namespace HeavenStudio.Games
{
reporterAnim.Play("ExtendMiss", 0, 0);
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
@ -764,7 +764,7 @@ namespace HeavenStudio.Games
if (!missedBigGuy)
{
reporterAnim.Play("ExtendSmile", 0, 0);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { SoundByte.PlayOneShotGame("ringside/musclesCamera"); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("SmileReporter", 0, 0); }),
@ -777,7 +777,7 @@ namespace HeavenStudio.Games
else
{
reporterAnim.Play("ExtendMiss", 0, 0);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
@ -796,7 +796,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame($"ringside/yell{UnityEngine.Random.Range(1, 7)}Raw");
reporterAnim.Play("IdleMiss", 0, 0);
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
});
@ -824,7 +824,7 @@ namespace HeavenStudio.Games
FadeFlashColor(Color.white, new Color(1, 1, 1, 0), 1f);
FadeBGColor(Color.black, defaultBGColorLight, 1f);
flashParticles.Play();
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { SoundByte.PlayOneShotGame("ringside/poseCamera"); }),
@ -838,7 +838,7 @@ namespace HeavenStudio.Games
{
reporterAnim.Play("ExtendMiss", 0, 0);
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
@ -854,7 +854,7 @@ namespace HeavenStudio.Games
{
reporterAnim.Play("ExtendMiss", 0, 0);
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),

View File

@ -623,7 +623,7 @@ namespace HeavenStudio.Games
cameraMoveBeat = beat + 2;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2, delegate
{
@ -678,7 +678,7 @@ namespace HeavenStudio.Games
targetCameraX = 0;
cameraMoveBeat = beat + 2;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2, delegate
{
@ -748,7 +748,7 @@ namespace HeavenStudio.Games
targetCameraX = 0;
cameraMoveBeat = beat + goToMiddleBeat;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + goToMiddleBeat, delegate
{
@ -808,7 +808,7 @@ namespace HeavenStudio.Games
break;
}
}
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
}
public static void PreInterval(double beat, float length, bool autoPassTurn, bool moveCamera, bool movePass)
@ -854,7 +854,7 @@ namespace HeavenStudio.Games
riffUsedBeats.Add(input.beat);
if (input.beat >= gameSwitchBeat)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(input.beat, delegate { Riff(input.beat, input.length, new int[]
{
@ -879,7 +879,7 @@ namespace HeavenStudio.Games
bendUsedBeats.Add(beat);
if (input.beat >= gameSwitchBeat)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(input.beat, delegate
{
@ -889,7 +889,7 @@ namespace HeavenStudio.Games
}
}
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -908,7 +908,7 @@ namespace HeavenStudio.Games
public void Riff(double beat, float length, int[] pitches, bool gleeClubJJ, int sampleJJ, int sampleTonesJJ, bool noRespond)
{
JJ.StrumStrings(gleeClubJJ, pitches, (PremadeSamples)sampleJJ, sampleTonesJJ, noRespond);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { JJ.Mute(); })
});
@ -932,7 +932,7 @@ namespace HeavenStudio.Games
public void Bend(double beat, float length, int pitchJJ)
{
JJ.BendUp(pitchJJ);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { JJ.BendDown(); })
});
@ -990,7 +990,7 @@ namespace HeavenStudio.Games
var relevantInputs = GrabAllInputsBetween(intervalStartBeat, intervalStartBeat + intervalLength);
if (relevantInputs.Count > 0)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{

View File

@ -160,7 +160,7 @@ namespace HeavenStudio.Games
goBopChild = whoBopsAuto == (int)WhoBops.Children || whoBopsAuto == (int)WhoBops.Both;
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { BopSingle(whoBops); })
});

View File

@ -356,7 +356,7 @@ namespace HeavenStudio.Games
float beatToJump = (float)allJumpEvents[currentJumpIndex].beat - (inJump ? 1 : 2);
SoundByte.PlayOneShotGame("seeSaw/prepareHigh", beatToJump);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToJump, delegate { see.SetState(inJump ? SeeSawGuy.JumpState.StartJumpIn : SeeSawGuy.JumpState.StartJump, beatToJump); see.canBop = false; })
});
@ -430,7 +430,7 @@ namespace HeavenStudio.Games
}
}));
}
BeatAction.New(instance.gameObject, bops);
BeatAction.New(instance, bops);
}
}
@ -496,7 +496,7 @@ namespace HeavenStudio.Games
{
saw.canBop = true;
SoundByte.PlayOneShotGame("seeSaw/otherLand", beat + 4);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3.75f, delegate { see.canBop = true; }),
new BeatAction.Action(beat + 4, delegate { see.Land(SeeSawGuy.LandType.Normal, true); canPrepare = true;})
@ -556,7 +556,7 @@ namespace HeavenStudio.Games
saw.canBop = true;
float beatLength = see.ShouldEndJumpOut() ? 4 : 3;
SoundByte.PlayOneShotGame("seeSaw/otherLand", beat + beatLength);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + beatLength - 0.25f, delegate { see.canBop = true; }),
new BeatAction.Action(beat + beatLength, delegate { see.Land(SeeSawGuy.LandType.Normal, true); canPrepare = true;})
@ -616,7 +616,7 @@ namespace HeavenStudio.Games
saw.canBop = true;
float beatLength = see.ShouldEndJumpOut() ? 3 : 2;
SoundByte.PlayOneShotGame("seeSaw/otherLand", beat + beatLength);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + beatLength - 0.25f, delegate { see.canBop = true; }),
new BeatAction.Action(beat + beatLength, delegate { see.Land(SeeSawGuy.LandType.Normal, false); canPrepare = true; })
@ -675,7 +675,7 @@ namespace HeavenStudio.Games
{
saw.canBop = true;
SoundByte.PlayOneShotGame("seeSaw/otherLand", beat + 2);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.75f, delegate { see.canBop = true; }),
new BeatAction.Action(beat + 2, delegate { see.Land(SeeSawGuy.LandType.Normal, false); canPrepare = true;})

View File

@ -172,7 +172,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
dead = true;
anim.DoScaledAnimationAsync("Choke_" + (see ? "See" : "Saw") + "_Intro", 0.5f);
SoundByte.PlayOneShotGame("seeSaw/explosion" + (see ? "Black" : "White"), beat + length);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { invertAnim.DoScaledAnimationAsync("Invert", 0.5f); }),
new BeatAction.Action(beat + length, delegate { anim.DoScaledAnimationAsync("Explode", 0.5f); deathParticle.Play();})
@ -244,7 +244,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
if (landType is not LandType.Barely)
{
string getUpAnim = "GetUp_" + landOut + typeOfLanding;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + (getUpOut ? 1f : 0.5f), delegate { anim.DoScaledAnimationAsync(getUpAnim, 0.5f); })
});
@ -316,7 +316,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
cameraPath.positions[0].duration = 2f;
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutOut_Start", 0.5f);
if (see) return;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1, delegate { anim.DoScaledAnimationAsync("Jump_OutOut_Transform", 0.5f); })
});
@ -328,7 +328,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
cameraPath.positions[0].duration = 2f;
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutIn_Start", 0.5f);
if (see) return;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1, delegate { anim.DoScaledAnimationAsync("Jump_OutIn_Transform", 0.5f); })
});
@ -340,7 +340,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
cameraPath.positions[0].duration = 1f;
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
if (see) return;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.5f, delegate { anim.DoScaledAnimationAsync("Jump_OutOut_Transform", 0.5f); })
});
@ -352,7 +352,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
cameraPath.positions[0].duration = 1f;
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
if (see) return;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.5f, delegate { anim.DoScaledAnimationAsync("Jump_OutIn_Transform", 0.5f); })
});

View File

@ -195,7 +195,7 @@ namespace HeavenStudio.Games
{
ScheduleInput(beat, length * 7, InputType.STANDARD_DOWN, JustNoSlowDown, Miss, Out);
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length * 3, delegate { ForceReload(); })
});
@ -221,7 +221,7 @@ namespace HeavenStudio.Games
bowAnim.DoScaledAnimationAsync("BowRecoil", 0.25f);
hasArrowLoaded = false;
SoundByte.PlayOneShotGame("sneakySpirits/arrowMiss", -1, 2);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 3f, delegate {
if (GameManager.instance.currentGame == "sneakySpirits")
@ -242,7 +242,7 @@ namespace HeavenStudio.Games
GameObject spawnedGhost = Instantiate(ghostMissPrefab, transform);
spawnedGhost.SetActive(true);
spawnedGhost.GetComponent<Animator>().DoScaledAnimationAsync("GhostBarely", 0.5f);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 2f, delegate {
if (GameManager.instance.currentGame == "sneakySpirits")
@ -266,7 +266,7 @@ namespace HeavenStudio.Games
GameObject spawnedGhost = Instantiate(ghostMissPrefab, transform);
spawnedGhost.SetActive(true);
spawnedGhost.GetComponent<Animator>().DoScaledAnimationAsync("GhostBarely", 0.5f);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 2f, delegate {
if (GameManager.instance.currentGame == "sneakySpirits")
@ -313,14 +313,14 @@ namespace HeavenStudio.Games
slowTree.SetActive(true);
normalTree.SetActive(false);
Conductor.instance.SetMinigamePitch(0.25f);
Conductor.instance.SetMinigamePitch(1f, caller.startBeat + caller.timer + 1f);
}
doorAnim.DoScaledAnimationAsync("DoorOpen", 0.5f);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate
{
if (slowDown) Conductor.instance.SetMinigamePitch(1f);
doorAnim.DoScaledAnimationAsync("DoorClose", 0.5f);
slowRain.SetActive(false);
normalRain.SetActive(true);
@ -336,7 +336,7 @@ namespace HeavenStudio.Games
GameObject spawnedGhost = Instantiate(ghostMissPrefab, transform);
spawnedGhost.SetActive(true);
spawnedGhost.GetComponent<Animator>().DoScaledAnimationAsync("GhostMiss", 0.5f);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate {
if (GameManager.instance.currentGame == "sneakySpirits")

View File

@ -19,7 +19,7 @@ namespace HeavenStudio.Games.Scripts_SneakySpirits
public void Init(double spawnBeat, float length)
{
if (length == 0) length = 1;
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(spawnBeat, delegate { anim.DoScaledAnimationAsync("Move", (1 / length) * Conductor.instance.SongPitch); }),
new BeatAction.Action(spawnBeat + (length * 0.5f), delegate { anim.DoScaledAnimationAsync("MoveDown", (1 / length) * Conductor.instance.SongPitch); }),

View File

@ -283,7 +283,7 @@ namespace HeavenStudio.Games
{
if (!grampsLoopingAnim || !grampsSniffing) return;
spaceGrampsShouldBop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -317,7 +317,7 @@ namespace HeavenStudio.Games
{
if (!grampsLoopingAnim || grampsSniffing) return;
spaceGrampsShouldBop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.66666f , delegate
{
@ -412,7 +412,7 @@ namespace HeavenStudio.Games
if (grampsTurns) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_RIGHT_DOWN, JustRight, RightMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -481,7 +481,7 @@ namespace HeavenStudio.Games
if (grampsSits) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_DOWN_DOWN, JustSit, SitMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -556,7 +556,7 @@ namespace HeavenStudio.Games
if (grampsPunches) grampsCanBop = false;
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, JustPunch, PunchMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -615,7 +615,7 @@ namespace HeavenStudio.Games
bops.Add(new BeatAction.Action(beat + i, delegate { GrampsBop(); }));
}
}
BeatAction.New(instance.gameObject, bops);
BeatAction.New(instance, bops);
}
}

View File

@ -62,7 +62,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
if (beatToKick < Conductor.instance.songPositionInBeatsAsDouble) beatToKick = ball.nextAnimBeat;
if (ball.state == Ball.State.HighKicked)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToKick - 0.5f, delegate { Kick(true, true); }),
new BeatAction.Action(beatToKick, delegate { Toe(true); }),
@ -71,7 +71,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
}
else
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToKick, delegate { KickCheck(true, false, beatToKick); }),
});
@ -296,7 +296,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
HighKick(hit);
if (!player)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + ball.GetAnimLength(Ball.State.Kicked), delegate { Kick(true, true); }),
new BeatAction.Action(beat + ball.GetAnimLength(Ball.State.Toe), delegate { Toe(true); }),
@ -309,7 +309,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
Kick(hit);
if (!player)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + ball.GetAnimLength(Ball.State.Kicked), delegate { KickCheck(true, false, beat + ball.GetAnimLength(Ball.State.Kicked)); }),
});
@ -320,7 +320,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
Kick(hit);
if (!player)
{
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + ball.GetAnimLength(Ball.State.Kicked), delegate { KickCheck(true, false, beat + ball.GetAnimLength(Ball.State.Kicked)); }),
});

View File

@ -143,7 +143,7 @@ namespace HeavenStudio.Games.Scripts_Splashdown
{
anim.Play("Idle", 0, 0);
SetState(MovementState.JumpIntoWater, beat);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.75, delegate
{
@ -171,7 +171,7 @@ namespace HeavenStudio.Games.Scripts_Splashdown
{
anim.DoScaledAnimationAsync(missed ? "DolphinMiss" : "Dolphin", 0.5f);
}
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1.75, delegate { Instantiate(splashPrefab, splashHolder).Init("BigSplash"); }),
new BeatAction.Action(beat + 2, delegate

View File

@ -178,7 +178,7 @@ namespace HeavenStudio.Games
player.JumpIntoWater(beat + length - 1);
}));
SoundByte.PlayOneShotGame("splashdown/start", beat + length - 0.25);
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
}
public void GoDown(double beat, float length)
@ -196,7 +196,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("splashdown/whistle", diveBeat);
SoundByte.PlayOneShotGame("splashdown/downOthers", diveBeat);
}
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
SoundByte.PlayOneShotGame("splashdown/whistle", beat + (currentSynchrettes.Count * length));
ScheduleInput(beat, currentSynchrettes.Count * length, InputType.STANDARD_DOWN, JustDown, Out, Out);
}
@ -216,7 +216,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("splashdown/whistle", diveBeat);
SoundByte.PlayOneShotGame("splashdown/upOthers", diveBeat);
}
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
SoundByte.PlayOneShotGame("splashdown/whistle", beat + (currentSynchrettes.Count * length));
switch (appearType)
{
@ -249,7 +249,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("splashdown/rollOthers", diveBeat + 1);
SoundByte.PlayOneShotGame("splashdown/splashOthers", diveBeat + 1.75);
}
BeatAction.New(instance.gameObject, actions);
BeatAction.New(instance, actions);
SoundByte.PlayOneShotGame("splashdown/yeah", beat + (currentSynchrettes.Count * length));
ScheduleInput(beat, currentSynchrettes.Count * length, InputType.STANDARD_UP, dolphin ? JustJump : JustJumpNoDolphin, Out, Out);
}
@ -258,7 +258,7 @@ namespace HeavenStudio.Games
{
if (IsIntroing()) return;
SoundByte.PlayOneShotGame("splashdown/together");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 2, delegate
{
@ -295,7 +295,7 @@ namespace HeavenStudio.Games
{
if (IsIntroing()) return;
SoundByte.PlayOneShotGame("splashdown/togetherRemix9");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1, delegate
{
@ -386,7 +386,7 @@ namespace HeavenStudio.Games
}
SoundByte.PlayOneShotGame("splashdown/rollPlayer", diveBeat + 1);
player.Jump(diveBeat);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(diveBeat + 1.75, delegate { crowdAnim.DoScaledAnimationAsync("CrowdCheer", 0.5f); }),
new BeatAction.Action(diveBeat + 4, delegate { crowdAnim.Play("CrowdIdle", 0, 0); })
@ -405,7 +405,7 @@ namespace HeavenStudio.Games
}
SoundByte.PlayOneShotGame("splashdown/rollPlayer", diveBeat + 1);
player.Jump(diveBeat, false, true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(diveBeat + 1.75, delegate { crowdAnim.DoScaledAnimationAsync("CrowdCheer", 0.5f); }),
new BeatAction.Action(diveBeat + 4, delegate { crowdAnim.Play("CrowdIdle", 0, 0); })
@ -423,7 +423,7 @@ namespace HeavenStudio.Games
return;
}
player.Jump(diveBeat, false, true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(diveBeat + 1.75, delegate { crowdAnim.DoScaledAnimationAsync("CrowdCheer", 0.5f); }),
new BeatAction.Action(diveBeat + 4, delegate { crowdAnim.Play("CrowdIdle", 0, 0); })

View File

@ -256,7 +256,7 @@ namespace HeavenStudio.Games
}
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
if (autoPassTurn)
{
@ -329,7 +329,7 @@ namespace HeavenStudio.Games
Bop(beat + length + inputBeat, 1, (int)WhoBops.Monkey, (int)WhoBops.None);
}));
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
}
public void Bop(double beat, float length, int whoBops, int whoBopsAuto)
@ -338,7 +338,7 @@ namespace HeavenStudio.Games
handsGoBop = whoBopsAuto == (int)WhoBops.Player || whoBopsAuto == (int)WhoBops.Both;
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -377,7 +377,7 @@ namespace HeavenStudio.Games
new MultiSound.Sound("tambourine/player/turnPass/note3", beat + 0.3f),
}, forcePlay: true);
happyFace.SetActive(true);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 1, delegate { happyFace.SetActive(false); }),
});

View File

@ -259,7 +259,7 @@ namespace HeavenStudio.Games
{
actions.Add(new BeatAction.Action(beat + i, delegate { SingleBop(); }));
}
BeatAction.New(gameObject, actions);
BeatAction.New(this, actions);
}
}
@ -278,7 +278,7 @@ namespace HeavenStudio.Games
public void Tap(double beat)
{
canBop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -308,7 +308,7 @@ namespace HeavenStudio.Games
public void DoubleTap(double beat)
{
canBop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -347,7 +347,7 @@ namespace HeavenStudio.Games
public void TripleTap(double beat)
{
canBop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -400,7 +400,7 @@ namespace HeavenStudio.Games
{
canBop = false;
jumpStartBeat = beat;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -124,7 +124,7 @@ namespace HeavenStudio.Games.Scripts_TapTrial
anim.DoScaledAnimationAsync("PosePrepare_1", 0.5f);
state = TapState.TripleTap;
tripleTaps = 0;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.5, delegate
{

View File

@ -225,7 +225,7 @@ namespace HeavenStudio.Games
foreach (var tap in queuedTaps)
{
Tapping(tap.beat, tap.length, tap.okay, tap.okayType, tap.animType, tap.popperBeats, tap.randomVoiceLine);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(tap.beat - 1.1f, delegate { prepareTap = true; }),
new BeatAction.Action(tap.beat, delegate { prepareTap = false; })
@ -352,7 +352,7 @@ namespace HeavenStudio.Games
for (int i = 0; i < length; i++)
{
TapTroupe.instance.ScheduleInput(beat - 1, 1 + i, InputType.STANDARD_DOWN, TapTroupe.instance.JustStep, TapTroupe.instance.MissStep, TapTroupe.instance.Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -361,7 +361,7 @@ namespace HeavenStudio.Games
})
});
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{
@ -388,7 +388,7 @@ namespace HeavenStudio.Games
if (GameManager.instance.currentGame == "tapTroupe")
{
TapTroupe.instance.Tapping(beat, length, okay, okayType, animType, popperBeats, randomVoiceLine);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1.1f, delegate { prepareTap = true; }),
new BeatAction.Action(beat, delegate { prepareTap = false; })
@ -422,7 +422,7 @@ namespace HeavenStudio.Games
otherSoundToPlay = "other2";
beatToSpawn = Math.Ceiling(beat + i);
finalBeatToSpawn = beatToSpawn;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.LastTap; shouldSwitchStep = false; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.LastTap, true, false);}),
@ -432,7 +432,7 @@ namespace HeavenStudio.Games
else if (i + 1.5f >= actualLength)
{
soundToPlay = "tapvoice2";
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.Tap; shouldSwitchStep = false; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.Tap, true, false); })
@ -443,7 +443,7 @@ namespace HeavenStudio.Games
soundToPlay = "tapvoice1";
if (actualLength == 2.25f)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.Tap; shouldSwitchStep = true; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.Tap); })
@ -451,7 +451,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.Tap; shouldSwitchStep = false; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.Tap, true, false); })
@ -465,7 +465,7 @@ namespace HeavenStudio.Games
{
if (actualLength == 3f)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.Tap; shouldSwitchStep = true; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.Tap); })
@ -473,7 +473,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.BamTapReady; shouldSwitchStep = true; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.BamTapReady); })
@ -482,7 +482,7 @@ namespace HeavenStudio.Games
}
else if (i == 0)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.BamReady; shouldSwitchStep = false; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.BamReady, true, false); })
@ -491,7 +491,7 @@ namespace HeavenStudio.Games
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beatToSpawn - 0.3f, delegate { currentTapAnim = TapTroupeTapper.TapAnim.Bam; shouldSwitchStep = true; }),
new BeatAction.Action(beatToSpawn, delegate { NPCTap(TapTroupeTapper.TapAnim.Bam); }),
@ -540,7 +540,7 @@ namespace HeavenStudio.Games
okayOneVoiceLine = "A";
break;
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1f, delegate
{
@ -599,7 +599,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -724,7 +724,7 @@ namespace HeavenStudio.Games
{
corner.ResetFace();
}
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 0.1f, delegate { if (playerTapper.transform.localScale.x != npcTappers[0].transform.localScale.x) playerTapper.dontSwitchNextStep = true; })
});

View File

@ -66,7 +66,7 @@ namespace HeavenStudio.Games.Scripts_TapTroupe
public void PartyPopper(double beat)
{
bodyAnim.Play("PartyPopperReady", 0, 0);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { bodyAnim.Play("PartyPopper", 0, 0); }),
new BeatAction.Action(beat + 1f, delegate { bodyAnim.DoScaledAnimationAsync("PartyPopperPop", 0.25f); SoundByte.PlayOneShotGame("tapTroupe/popper"); popperEffect.Play(); }),

View File

@ -343,7 +343,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -412,7 +412,7 @@ namespace HeavenStudio.Games
crouchEndBeat = beat + length;
ScheduleInput(beat, 2f * actualLength, InputType.STANDARD_DOWN, JustCrouch, Nothing, Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -555,7 +555,7 @@ namespace HeavenStudio.Games
}
player.canBop = true;
}));
BeatAction.New(instance.gameObject, posesToDo);
BeatAction.New(instance, posesToDo);
}
void JustCrouch(PlayerActionEvent caller, float state)

View File

@ -67,7 +67,7 @@ namespace HeavenStudio.Games.Scripts_TheDazzles
public void StartReleaseBox(double beat)
{
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1f, delegate {if (holding) holdEffectAnim.DoScaledAnimationAsync("ReleaseBox", 0.25f);})
});

View File

@ -278,7 +278,7 @@ namespace HeavenStudio.Games
{
bops.Add(new BeatAction.Action(beat + i, delegate { SingleBop(); }));
}
BeatAction.New(instance.gameObject, bops);
BeatAction.New(instance, bops);
}
}
#endregion
@ -353,14 +353,14 @@ namespace HeavenStudio.Games
ScheduleInput(beat, length, GetInputTypeBasedOnCurrentReceiver(), JustHitBall, Miss, Empty);
if (passBallDict[beat + length].datamodel == "tossBoys/dual" || passBallDict[beat + length].datamodel == "tossBoys/lightning" || passBallDict[beat + length].datamodel == "tossBoys/blur")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { DoSpecialBasedOnReceiver(beat + length - 1); })
});
}
else if (passBallDict[beat + length].datamodel == "tossBoys/pop")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { GetCurrentReceiver().PopBallPrepare(); })
});
@ -368,7 +368,7 @@ namespace HeavenStudio.Games
}
else
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { Miss(null); })
});
@ -436,7 +436,7 @@ namespace HeavenStudio.Games
}
if (passBallDict.ContainsKey(beat + currentEventLength) && passBallDict[beat + currentEventLength].datamodel == "tossBoys/pop")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + currentEventLength - 1, delegate { GetCurrentReceiver().PopBallPrepare(); })
});
@ -488,7 +488,7 @@ namespace HeavenStudio.Games
};
if (passBallDict.ContainsKey(beat + length) && (passBallDict[beat + length].datamodel is "tossBoys/dual" or "tossBoys/lightning" or "tossBoys/blur"))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { DoSpecialBasedOnReceiver(beat + length - 1); })
});
@ -543,7 +543,7 @@ namespace HeavenStudio.Games
};
if (passBallDict.ContainsKey(beat + length) && (passBallDict[beat + length].datamodel is "tossBoys/lightning" or "tossBoys/blur"))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { DoSpecialBasedOnReceiver(beat + length - 1); })
});
@ -597,7 +597,7 @@ namespace HeavenStudio.Games
};
if (passBallDict.ContainsKey(beat + length) && (passBallDict[beat + length].datamodel is "tossBoys/dual" or "tossBoys/lightning" or "tossBoys/blur"))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { DoSpecialBasedOnReceiver(beat + length - 1); })
});
@ -653,7 +653,7 @@ namespace HeavenStudio.Games
if (secondBeat == 0.25f) soundsToPlay.Add(new MultiSound.Sound("tossBoys/" + last + current + "Low" + 3, beat + 0.5f, 1, 1, false, thirdOffset));
if (passBallDict.ContainsKey(beat + length) && (passBallDict[beat + length].datamodel is "tossBoys/dual" or "tossBoys/blur"))
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 1, delegate { DoSpecialBasedOnReceiver(beat + length - 1); })
});

View File

@ -74,7 +74,7 @@ namespace HeavenStudio.Games.Scripts_TossBoys
public void ShowArrow(double startBeat, float length)
{
BeatAction.New(game.gameObject, new List<BeatAction.Action>(){
BeatAction.New(game, new List<BeatAction.Action>(){
new BeatAction.Action(startBeat, delegate { arrow.SetActive(true); }),
new BeatAction.Action(startBeat + length, delegate { arrow.SetActive(false); }),
});

View File

@ -267,7 +267,7 @@ namespace HeavenStudio.Games
return;
}
SoundByte.PlayOneShotGame("tramAndPauline/transformTram");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1, delegate
{
@ -286,7 +286,7 @@ namespace HeavenStudio.Games
return;
}
SoundByte.PlayOneShotGame("tramAndPauline/transformPauline");
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1, delegate
{

View File

@ -130,7 +130,7 @@ namespace HeavenStudio.Games
{
foreach (var input in queuedInputs)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(input.beat - 1f, delegate
{
@ -170,7 +170,7 @@ namespace HeavenStudio.Games
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
@ -194,7 +194,7 @@ namespace HeavenStudio.Games
{
if (GameManager.instance.currentGame == "trickClass")
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{

View File

@ -199,7 +199,7 @@ namespace HeavenStudio.Games
private void PassTurn(double beat, CallAndResponseHandler crHandler)
{
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 0.25, delegate
{
@ -262,7 +262,7 @@ namespace HeavenStudio.Games
plant.createBeat = beat;
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{

View File

@ -116,7 +116,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
double beat = Conductor.instance.songPositionInBeats;
startBeat = beat;
game.playerImpact.SetActive(true);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.1f, delegate { game.playerImpact.SetActive(false); }),
});
@ -153,7 +153,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
}
bool hasGandw = false;
if (gandw != null) hasGandw = gandw.activeSelf;
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.9f, delegate { game.arrowSRRightPlayer.sprite = game.redArrowSprite; }),
new BeatAction.Action(beat + 1f, delegate { game.arrowSRRightPlayer.sprite = game.whiteArrowSprite; }),
@ -167,7 +167,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
double beat = Conductor.instance.songPositionInBeats;
rightInput.Disable();
game.playerImpact.SetActive(true);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.1f, delegate { game.playerImpact.SetActive(false); }),
});
@ -196,7 +196,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
currentState = State.Miss;
startBeat = beat;
Update();
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.25f, delegate { game.missImpact.SetActive(true); }),
new BeatAction.Action(beat + 0.25f, delegate { SoundByte.PlayOneShotGame("workingDough/BallMiss"); }),

View File

@ -274,7 +274,7 @@ namespace HeavenStudio.Games
{
PassTurn(beat + interval, interval, beat);
}
BeatAction.New(ballTransporterLeftNPC, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{
@ -314,7 +314,7 @@ namespace HeavenStudio.Games
private void PassTurn(double beat, double length, double startBeat)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat - 1, delegate
{
@ -374,7 +374,7 @@ namespace HeavenStudio.Games
var ballComponent = spawnedBall.GetComponent<NPCDoughBall>();
spawnedBall.SetActive(true);
ballComponent.Init(beat, hasGandw);
BeatAction.New(doughDudesNPC, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
//Jump and play sound
new BeatAction.Action(beat, delegate { arrowSRLeftNPC.sprite = redArrowSprite; }),
@ -402,7 +402,7 @@ namespace HeavenStudio.Games
spawnedBall.SetActive(true);
ballComponent.Init(beat, isBig, hasGandw);
BeatAction.New(doughDudesPlayer, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { arrowSRLeftPlayer.sprite = redArrowSprite; }),
new BeatAction.Action(beat + 0.1f, delegate { arrowSRLeftPlayer.sprite = whiteArrowSprite; }),
@ -483,7 +483,7 @@ namespace HeavenStudio.Games
var ballComponent = spawnedBall.GetComponent<BGBall>();
spawnedBall.SetActive(true);
ballComponent.Init(beat, hasGandw);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 9f, delegate { if (!spaceshipRisen && !bgDisabled) spaceshipAnimator.Play("AbsorbBall", 0, 0); }),
});
@ -501,7 +501,7 @@ namespace HeavenStudio.Games
liftingLength = length;
liftingDoughDudes = true;
doughDudesHolderAnim.DoScaledAnimation(liftingAnimName, liftingStartBeat, liftingLength);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 0.1f, delegate { liftingDoughDudes = false; }),
});
@ -517,7 +517,7 @@ namespace HeavenStudio.Games
spaceshipLights.GetComponent<Animator>().Play("SpaceshipLights", 0, 0);
}
spaceshipAnimator.Play("SpaceshipShake", 0, 0);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { spaceshipAnimator.Play("SpaceshipLaunch", 0, 0); }),
new BeatAction.Action(beat + length, delegate { SoundByte.PlayOneShotGame("workingDough/LaunchRobot"); }),
@ -537,7 +537,7 @@ namespace HeavenStudio.Games
spaceshipLights.GetComponent<Animator>().Play("SpaceshipLights", 0, 0);
}
spaceshipAnimator.DoScaledAnimation("RiseSpaceship", risingStartBeat, risingLength);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 0.1f, delegate { spaceshipRising = false; }),
});
@ -552,7 +552,7 @@ namespace HeavenStudio.Games
gandMovingStartBeat = beat;
gandwMovingAnimName = shouldExit ? "GANDWLeave" : "GANDWEnter";
gandwAnim.DoScaledAnimation(gandwMovingAnimName, gandMovingStartBeat, gandMovingLength);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 0.1f, delegate { gandwMoving = false; }),
new BeatAction.Action(beat + length, delegate { gandwHasEntered = shouldExit ? false : true; }),

Some files were not shown because too many files have changed in this diff Show More