revert some MORE stuff

This commit is contained in:
AstrlJelly 2024-03-02 17:48:56 -05:00
parent 4aec45fd74
commit e8b2d21eba
10 changed files with 17 additions and 70 deletions

View file

@ -141,9 +141,7 @@ namespace HeavenStudio
public void SetBeat(double beat)
{
var gameManager = GameManager.instance;
var chart = gameManager.Beatmap;
var chart = GameManager.instance.Beatmap;
double offset = chart.data.offset;
startPos = GetSongPosFromBeat(beat);
@ -154,13 +152,9 @@ namespace HeavenStudio
SeekMusicToTime(startPos, offset);
var oldSongPosBeat = songPosBeat;
songPosBeat = GetBeatFromSongPos(time);
if (oldSongPosBeat != songPosBeat && gameManager.minigame != null) {
gameManager.minigame.OnTimelineChange(songPosBeat);
}
gameManager.SetCurrentEventToClosest(beat);
GameManager.instance.SetCurrentEventToClosest(beat);
}
public void PlaySetup(double beat)

View file

@ -213,7 +213,7 @@ namespace HeavenStudio.Games
}
}
public override void OnTimelineChange(double beat)
public override void OnTimeChange(double beat)
{
UpdateCameraZoom();
}

View file

@ -306,7 +306,6 @@ namespace HeavenStudio.Games.Loaders
new Param("startTexture", new Color(), "Start Texture Color", "Set the color at the start of the event."),
new Param("endTexture", new Color(), "End Texture Color", "Set the color at the end of the event."),
},
isVfx = true,
},
// new GameAction("set background effects", "Background Appearance (OLD)")
// {
@ -726,7 +725,6 @@ namespace HeavenStudio.Games
}
public override void OnStop(double beat) => EntityPreCheck(beat);
public override void OnTimelineChange(double beat) => EntityPreCheck(beat);
void EntityPreCheck(double beat)
{
if (gameManager == null) return;

View file

@ -290,7 +290,7 @@ namespace HeavenStudio.Games
{
}
public virtual void OnTimelineChange(double beat)
public virtual void OnTimeChange(double beat)
{
}

View file

@ -193,7 +193,7 @@ namespace HeavenStudio.Games
}
}
public override void OnTimelineChange(double beat)
public override void OnTimeChange(double beat)
{
UpdateCameraZoom();
}

View file

@ -123,7 +123,7 @@ namespace HeavenStudio.Games
Destroy(BallsHolder.transform.GetChild(i).gameObject);
}
public override void OnTimelineChange(double beat)
public override void OnTimeChange(double beat)
{
UpdateCameraZoom();
}

View file

@ -83,15 +83,7 @@ namespace HeavenStudio.Games
{
public class Tambourine : Minigame
{
private static Color _defaultBGColor;
public static Color defaultBGColor
{
get
{
ColorUtility.TryParseHtmlString("#388cd0", out _defaultBGColor);
return _defaultBGColor;
}
}
public static Color defaultBGColor = new Color(0.22f, 0.55f, 0.82f);
[Header("Components")]
[SerializeField] Animator handsAnimator;
@ -155,8 +147,6 @@ namespace HeavenStudio.Games
frogAnimator.Play("FrogExited", 0, 0);
handsAnimator.Play("Idle", 0, 0);
monkeyAnimator.Play("MonkeyIdle", 0, 0);
colorStart = defaultBGColor;
colorEnd = defaultBGColor;
}
void Update()
@ -475,11 +465,7 @@ namespace HeavenStudio.Games
}
}
private double colorStartBeat = -1;
private float colorLength = 0f;
private Color colorStart = Color.white; //obviously put to the default color of the game
private Color colorEnd = Color.white;
private Util.EasingFunction.Ease colorEase; //putting Util in case this game is using jukebox
private ColorEase bgColorEase = new();
//call this in update
private void BackgroundColorUpdate()
@ -487,13 +473,9 @@ namespace HeavenStudio.Games
bg.color = bgColorEase.GetColor();
}
public void BackgroundColor(double beat, float length, Color colorStartSet, Color colorEndSet, int ease)
public void BackgroundColor(double beat, float length, Color startColor, Color endColor, int ease)
{
colorStartBeat = beat;
colorLength = length;
colorStart = colorStartSet;
colorEnd = colorEndSet;
colorEase = (Util.EasingFunction.Ease)ease;
bgColorEase = new(beat, length, startColor, endColor, ease);
}
//call this in OnPlay(double beat) and OnGameSwitch(double beat)

View file

@ -179,7 +179,7 @@ namespace HeavenStudio.Games
}
}
public override void OnTimelineChange(double beat)
public override void OnTimeChange(double beat)
{
UpdateCameraZoom();
}

View file

@ -114,15 +114,7 @@ namespace HeavenStudio.Games
public class TossBoys : Minigame
{
private static Color _defaultBGColor;
public static Color defaultBGColor
{
get
{
ColorUtility.TryParseHtmlString("#62FDBB", out _defaultBGColor);
return _defaultBGColor;
}
}
public static Color defaultBGColor = new Color(0.38f, 0.99f, 0.73f);
public enum KidChoice
{
Akachan = 0,
@ -235,8 +227,6 @@ namespace HeavenStudio.Games
private void Awake()
{
instance = this;
colorStart = defaultBGColor;
colorEnd = defaultBGColor;
SetupBopRegion("tossBoys", "bop", "auto");
SetPassBallEvents();
}
@ -294,11 +284,7 @@ namespace HeavenStudio.Games
}
}
private double colorStartBeat = -1;
private float colorLength = 0f;
private Color colorStart = Color.white; //obviously put to the default color of the game
private Color colorEnd = Color.white;
private Util.EasingFunction.Ease colorEase; //putting Util in case this game is using jukebox
private ColorEase bgColorEase = new(defaultBGColor);
//call this in update
private void BackgroundColorUpdate()
@ -306,13 +292,9 @@ namespace HeavenStudio.Games
bg.color = bgColorEase.GetColor();
}
public void BackgroundColor(double beat, float length, Color colorStartSet, Color colorEndSet, int ease)
public void BackgroundColor(double beat, float length, Color startColor, Color endColor, int ease)
{
colorStartBeat = beat;
colorLength = length;
colorStart = colorStartSet;
colorEnd = colorEndSet;
colorEase = (Util.EasingFunction.Ease)ease;
bgColorEase = new(beat, length, startColor, endColor, ease);
}
//call this in OnPlay(double beat) and OnGameSwitch(double beat)

View file

@ -6,7 +6,6 @@ using Jukebox;
using TMPro;
using System.Linq;
using System.Collections.Generic;
using static HeavenStudio.Minigames;
namespace HeavenStudio.Editor.Track
{
@ -39,7 +38,6 @@ namespace HeavenStudio.Editor.Track
[Header("Properties")]
public RiqEntity entity;
public GameAction gameAction;
public float length;
private bool lastVisible;
public bool selected;
@ -99,7 +97,6 @@ namespace HeavenStudio.Editor.Track
if (action != null)
{
gameAction = action;
this.resizable = action.resizable;
if (action.resizable == false)
{
@ -329,15 +326,9 @@ namespace HeavenStudio.Editor.Track
if (Conductor.instance.NotStopped()) return;
if (Input.GetMouseButton(1) || Input.GetMouseButton(2)) return;
if (!moving) {
if (!altWhenClicked) {
if (!moving)
if (!altWhenClicked)
altWhenClicked = Input.GetKey(KeyCode.LeftAlt);
}
} else {
if (gameAction.isVfx) {
gameAction.function.Invoke();
}
}
if (!altWhenClicked)
{