mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-08 18:55:07 +00:00
clean up
This commit is contained in:
parent
d2bc7d9871
commit
6c25344e9e
3 changed files with 10 additions and 29 deletions
|
@ -82,7 +82,7 @@ namespace RhythmHeavenMania
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogWarning("Event not found! May be spelled wrong or it is not implemented." + ex);
|
||||
Debug.LogWarning("Event not found! May be spelled wrong or it is not implemented.\n" + ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace RhythmHeavenMania
|
|||
public Games.Global.Flash fade;
|
||||
|
||||
[Header("Games")]
|
||||
public Minigame currentGame;
|
||||
public string currentGame;
|
||||
Coroutine currentGameSwitchIE;
|
||||
|
||||
[Header("Properties")]
|
||||
|
@ -372,10 +372,10 @@ namespace RhythmHeavenMania
|
|||
GetGame(game).GetComponent<Minigame>().OnGameSwitch();
|
||||
}*/
|
||||
|
||||
SetCurrentGame(game);
|
||||
Minigame miniGame = currentGameO.GetComponent<Minigame>();
|
||||
if (miniGame != null)
|
||||
miniGame.OnGameSwitch();
|
||||
SetCurrentGame(game);
|
||||
|
||||
ResetCamera();
|
||||
}
|
||||
|
@ -417,23 +417,7 @@ namespace RhythmHeavenMania
|
|||
return EventCaller.instance.minigames.Find(c => c.name == name);
|
||||
}
|
||||
|
||||
public Minigames.Minigame GetGameInfo(Minigame game)
|
||||
{
|
||||
if (game == null)
|
||||
return null;
|
||||
return GetGameInfo(game.name);
|
||||
}
|
||||
|
||||
public string GetCurrentGameName()
|
||||
{
|
||||
if(currentGame == null)
|
||||
{
|
||||
return "noGame";
|
||||
}
|
||||
return currentGame.name;
|
||||
}
|
||||
|
||||
public void SetCurrentGame(Minigame game)
|
||||
public void SetCurrentGame(string game)
|
||||
{
|
||||
currentGame = game;
|
||||
if (GetGameInfo(currentGame) != null) CircleCursor.InnerCircle.GetComponent<SpriteRenderer>().color = Colors.Hex2RGB(GetGameInfo(currentGame).color);
|
||||
|
|
|
@ -44,24 +44,21 @@ namespace RhythmHeavenMania.Games
|
|||
|
||||
public int firstEnable = 0;
|
||||
|
||||
public string name = "";
|
||||
|
||||
public virtual void OnGameSwitch()
|
||||
{
|
||||
//Below is a template that can be used for handling previous entities. There are multiple sections that have different functions, you don't need to use all of them
|
||||
|
||||
float beat = Conductor.instance.songPositionInBeats;
|
||||
List<Beatmap.Entity> prevEntities = GameManager.instance.Beatmap.entities.FindAll(c => c.beat <= beat && c.datamodel.Split(0) == name);
|
||||
|
||||
//Below is a template that can be used for handling previous entities.
|
||||
//section below is if you only want to look at entities that overlap the game switch
|
||||
/*
|
||||
float beat = Conductor.instance.songPositionInBeats;
|
||||
List<Beatmap.Entity> prevEntities = GameManager.instance.Beatmap.entities.FindAll(c => c.beat <= beat && c.datamodel.Split(0) == [insert game name]);
|
||||
foreach(Beatmap.Entity entity in prevEntities)
|
||||
{
|
||||
if(entity.beat + entity.length >= beat)
|
||||
{
|
||||
|
||||
EventCaller.instance.CallEvent(entity, true);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
public virtual void OnTimeChange()
|
||||
|
|
Loading…
Reference in a new issue