mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:47:39 +02:00
Mass Text Update (#615)
* Air Rally Text Update * Blue Bear Text Update * Board Meeting Text Update * Built To Scale DS Text Update also changed Air Rally's assetbundle tag from "normal" to "keep" * Catchy Tune Text Update also changed some minor wording in Board Meeting and Built To Scale DS * Cheer Readers Text Update * The Clappy Trio Text Update * Coin Toss Text Update * Crop Stomp Text Update * DJ School Text Update * Dog Ninja Text Update * Double Date Text Update * Drumming Practice Text Update * Fan Club Text Update * Fireworks Text Update * Second Contact Text Update * Flipper-Flop Text Update also fix an error in Catchy Tune * Fork Lifter Text Update * Glee Club Text Update * Karate Man Text Update also minor updates to other games * Kitties! Text Update * Launch Party Text Update * Lockstep Text Update * Marching Orders Text Update * Meat Grinder Text Update also fixed an error in Second Contact * Mr. Upbeat Text Update * Munchy Monk Text Update * Octopus Machine Text Update * Pajama Party Text Update * Quiz Show Text Update also changed some wording in meat grinder * Rhythm Rally Text Update * Rhythm Somen Text Update that was easy * Rhythm Tweezers Text Update * Ringside Text Update * Rockers Text Update this sucked * Samurai Slice DS Text Update * See Saw Text Update * Sneaky Spirits Text Update * Spaceball Text Update * Space Dance Text Update * Space Soccer Text Update * Splashdown Text Update * Tambourine Text Update * Tap Trial Text Update * Tap Troupe Text Update * The Dazzles Text Update * Toss Boys Text Update * Tram & Pauline Text Update also added translation for Fireworks * Tunnel Text Update * Wizard's Waltz Text Update * Working Dough Text Update * fix compiler errors * fix editor offset bug(?) * fix missing param in second contact * Ball Redispense text * remove space soccer swing * Trick on the Class Text Update * Non-Game Text Update * fix pre-function sorting * camera shake ease * remove a bunch of prints * rhythm tweezers bug fix * Update Credits.txt * ssds nop samurai bop * swap order of shake properties * Update FirstContact.cs --------- Co-authored-by: minenice55 <star.elementa@gmail.com>
This commit is contained in:
@ -69,7 +69,7 @@ namespace HeavenStudio
|
||||
bool AudioLoadDone;
|
||||
bool ChartLoadError;
|
||||
|
||||
List<double> eventBeats, tempoBeats, volumeBeats, sectionBeats;
|
||||
List<double> eventBeats, preSequenceBeats, tempoBeats, volumeBeats, sectionBeats;
|
||||
List<RiqEntity> allGameSwitches;
|
||||
|
||||
public event Action<double> onBeatChanged;
|
||||
@ -455,27 +455,22 @@ namespace HeavenStudio
|
||||
{
|
||||
if (currentPreSequence < Beatmap.Entities.Count && currentPreSequence >= 0)
|
||||
{
|
||||
List<RiqEntity> entitiesAtSameBeat = ListPool<RiqEntity>.Get();
|
||||
RiqEntity seekEntity = Beatmap.Entities[currentPreSequence];
|
||||
|
||||
foreach (RiqEntity entity in Beatmap.Entities)
|
||||
if (start >= preSequenceBeats[currentPreSequence])
|
||||
{
|
||||
if (entity.beat == seekEntity.beat)
|
||||
List<RiqEntity> entitiesInRange = ListPool<RiqEntity>.Get();
|
||||
foreach (RiqEntity entity in Beatmap.Entities)
|
||||
{
|
||||
entitiesAtSameBeat.Add(entity);
|
||||
string[] entityDatamodel = entity.datamodel.Split('/');
|
||||
double seekTime = eventCaller.GetGameAction(entityDatamodel[0], entityDatamodel[1]).preFunctionLength;
|
||||
if (entity.beat - seekTime == preSequenceBeats[currentPreSequence])
|
||||
{
|
||||
entitiesInRange.Add(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
SortEventsByPriority(entitiesAtSameBeat);
|
||||
SortEventsByPriority(entitiesInRange);
|
||||
|
||||
string[] seekEntityDatamodel = seekEntity.datamodel.Split('/');
|
||||
|
||||
float seekTime = eventCaller.GetGameAction(seekEntityDatamodel[0], seekEntityDatamodel[1]).preFunctionLength;
|
||||
|
||||
if (start + seekTime >= eventBeats[currentPreSequence])
|
||||
{
|
||||
foreach (RiqEntity entity in entitiesAtSameBeat)
|
||||
foreach (RiqEntity entity in entitiesInRange)
|
||||
{
|
||||
currentPreSequence++;
|
||||
string gameName = entity.datamodel.Split('/')[0];
|
||||
var inf = GetGameInfo(gameName);
|
||||
if (inf != null && inf.usesAssetBundle && inf.AssetsLoaded && !inf.SequencesPreloaded)
|
||||
@ -484,9 +479,10 @@ namespace HeavenStudio
|
||||
PreloadGameSequences(gameName);
|
||||
}
|
||||
eventCaller.CallPreEvent(entity);
|
||||
currentPreSequence++;
|
||||
}
|
||||
ListPool<RiqEntity>.Release(entitiesInRange);
|
||||
}
|
||||
ListPool<RiqEntity>.Release(entitiesAtSameBeat);
|
||||
}
|
||||
}
|
||||
|
||||
@ -577,13 +573,13 @@ namespace HeavenStudio
|
||||
{
|
||||
if (clampedBeat >= eventBeats[currentEvent])
|
||||
{
|
||||
List<RiqEntity> entitiesAtSameBeat = ListPool<RiqEntity>.Get();
|
||||
List<RiqEntity> entitiesInRange = 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
|
||||
using (PooledObject<List<RiqEntity>> pool = ListPool<RiqEntity>.Get(out List<RiqEntity> currentBeatEntities))
|
||||
{
|
||||
currentBeatEntities = Beatmap.Entities.FindAll(c => c.beat == Beatmap.Entities[currentEvent].beat);
|
||||
currentBeatEntities = Beatmap.Entities.FindAll(c => c.beat == eventBeats[currentEvent]);
|
||||
foreach (RiqEntity entity in currentBeatEntities)
|
||||
{
|
||||
if (EventCaller.FXOnlyGames().Contains(eventCaller.GetMinigame(entity.datamodel.Split('/')[0])))
|
||||
@ -592,13 +588,13 @@ namespace HeavenStudio
|
||||
}
|
||||
else
|
||||
{
|
||||
entitiesAtSameBeat.Add(entity);
|
||||
entitiesInRange.Add(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SortEventsByPriority(fxEntities);
|
||||
SortEventsByPriority(entitiesAtSameBeat);
|
||||
SortEventsByPriority(entitiesInRange);
|
||||
|
||||
// FX entities should ALWAYS execute before gameplay entities
|
||||
foreach (RiqEntity entity in fxEntities)
|
||||
@ -607,7 +603,7 @@ namespace HeavenStudio
|
||||
currentEvent++;
|
||||
}
|
||||
|
||||
foreach (RiqEntity entity in entitiesAtSameBeat)
|
||||
foreach (RiqEntity entity in entitiesInRange)
|
||||
{
|
||||
// if game isn't loaded, preload game so whatever event that would be called will still run outside if needed
|
||||
if (entity.datamodel.Split('/')[0] != currentGame)
|
||||
@ -623,7 +619,7 @@ namespace HeavenStudio
|
||||
currentEvent++;
|
||||
}
|
||||
|
||||
ListPool<RiqEntity>.Release(entitiesAtSameBeat);
|
||||
ListPool<RiqEntity>.Release(entitiesInRange);
|
||||
ListPool<RiqEntity>.Release(fxEntities);
|
||||
}
|
||||
}
|
||||
@ -643,10 +639,10 @@ namespace HeavenStudio
|
||||
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);
|
||||
|
||||
|
||||
if (!Conductor.instance.isPlaying)
|
||||
return;
|
||||
|
||||
|
||||
if (Conductor.instance.songPositionInBeatsAsDouble >= Math.Ceiling(_playStartBeat) + _latePulseTally)
|
||||
{
|
||||
if (_currentMinigame != null) _currentMinigame.OnLateBeatPulse(Math.Ceiling(_playStartBeat) + _latePulseTally);
|
||||
@ -893,6 +889,15 @@ namespace HeavenStudio
|
||||
sectionBeats = Beatmap.SectionMarkers.Select(c => c.beat).ToList();
|
||||
|
||||
allGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" });
|
||||
|
||||
preSequenceBeats = new List<double>();
|
||||
foreach (RiqEntity entity in Beatmap.Entities)
|
||||
{
|
||||
string[] seekEntityDatamodel = entity.datamodel.Split('/');
|
||||
double seekTime = eventCaller.GetGameAction(seekEntityDatamodel[0], seekEntityDatamodel[1]).preFunctionLength;
|
||||
preSequenceBeats.Add(entity.beat - seekTime);
|
||||
}
|
||||
preSequenceBeats.Sort();
|
||||
}
|
||||
|
||||
void SortEventsByPriority(List<RiqEntity> entities)
|
||||
@ -909,7 +914,6 @@ namespace HeavenStudio
|
||||
|
||||
return yAction.priority.CompareTo(xAction.priority);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static double GetClosestInList(List<double> list, double compareTo)
|
||||
@ -1177,7 +1181,7 @@ namespace HeavenStudio
|
||||
{
|
||||
//game is packed in an assetbundle, load from that instead
|
||||
if (gameInfo.AssetsLoaded && gameInfo.LoadedPrefab != null) return gameInfo.LoadedPrefab;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
return gameInfo.GetCommonAssetBundle().LoadAsset<GameObject>(name);
|
||||
|
Reference in New Issue
Block a user