mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
BTSDS: Implemented upscale hit graphic. Tweezers: Added background color events.
This commit is contained in:
parent
0625c066ae
commit
e2a278f7eb
3 changed files with 45 additions and 0 deletions
|
@ -2185,6 +2185,7 @@ MonoBehaviour:
|
||||||
Vegetable: {fileID: 6331401567023014501}
|
Vegetable: {fileID: 6331401567023014501}
|
||||||
VegetableDupe: {fileID: 9096051369561297840}
|
VegetableDupe: {fileID: 9096051369561297840}
|
||||||
VegetableAnimator: {fileID: 3603513546661280919}
|
VegetableAnimator: {fileID: 3603513546661280919}
|
||||||
|
bg: {fileID: 5813499711658895221}
|
||||||
Tweezers: {fileID: 3391455012319192365}
|
Tweezers: {fileID: 3391455012319192365}
|
||||||
hairBase: {fileID: 4104508031135416673}
|
hairBase: {fileID: 4104508031135416673}
|
||||||
longHairBase: {fileID: 2904820922900361117}
|
longHairBase: {fileID: 2904820922900361117}
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
public SpriteRenderer Vegetable;
|
public SpriteRenderer Vegetable;
|
||||||
public SpriteRenderer VegetableDupe;
|
public SpriteRenderer VegetableDupe;
|
||||||
public Animator VegetableAnimator;
|
public Animator VegetableAnimator;
|
||||||
|
public SpriteRenderer bg;
|
||||||
public Tweezers Tweezers;
|
public Tweezers Tweezers;
|
||||||
public GameObject hairBase;
|
public GameObject hairBase;
|
||||||
public GameObject longHairBase;
|
public GameObject longHairBase;
|
||||||
|
@ -42,6 +43,7 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
|
|
||||||
Tween transitionTween;
|
Tween transitionTween;
|
||||||
bool transitioning = false;
|
bool transitioning = false;
|
||||||
|
Tween bgColorTween;
|
||||||
|
|
||||||
private static Color _defaultOnionColor;
|
private static Color _defaultOnionColor;
|
||||||
public static Color defaultOnionColor
|
public static Color defaultOnionColor
|
||||||
|
@ -63,6 +65,16 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Color _defaultBgColor;
|
||||||
|
public static Color defaultBgColor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
ColorUtility.TryParseHtmlString("#D8FFC1", out _defaultBgColor);
|
||||||
|
return _defaultBgColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static RhythmTweezers instance { get; set; }
|
public static RhythmTweezers instance { get; set; }
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -171,6 +183,29 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
VegetableDupe.color = newColor;
|
VegetableDupe.color = newColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ChangeBackgroundColor(Color color, float beats)
|
||||||
|
{
|
||||||
|
var seconds = Conductor.instance.secPerBeat * beats;
|
||||||
|
|
||||||
|
if (bgColorTween != null)
|
||||||
|
bgColorTween.Kill(true);
|
||||||
|
|
||||||
|
if (seconds == 0)
|
||||||
|
{
|
||||||
|
bg.color = color;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bgColorTween = bg.DOColor(color, seconds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FadeBackgroundColor(Color start, Color end, float beats)
|
||||||
|
{
|
||||||
|
ChangeBackgroundColor(start, 0f);
|
||||||
|
ChangeBackgroundColor(end, beats);
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused && intervalStarted)
|
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused && intervalStarted)
|
||||||
|
|
|
@ -216,6 +216,15 @@ namespace RhythmHeavenMania
|
||||||
} ),
|
} ),
|
||||||
new GameAction("set tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = eventCaller.currentEntity.length; }, 1f, true),
|
new GameAction("set tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = eventCaller.currentEntity.length; }, 1f, true),
|
||||||
new GameAction("reset tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = 0f; }, 0.5f),
|
new GameAction("reset tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = 0f; }, 0.5f),
|
||||||
|
new GameAction("set background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e.colorA, 0f); }, 0.5f, false, new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("colorA", RhythmTweezers.defaultBgColor, "Background Color")
|
||||||
|
} ),
|
||||||
|
new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); }, 1f, true, new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("colorA", Color.white, "Start Color"),
|
||||||
|
new Param("colorB", RhythmTweezers.defaultBgColor, "End Color")
|
||||||
|
} ),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new Minigame("rhythmRally", "Rhythm Rally \n<color=#eb5454>[WIP don't use]</color>", "B888F8", true, false, new List<GameAction>()
|
new Minigame("rhythmRally", "Rhythm Rally \n<color=#eb5454>[WIP don't use]</color>", "B888F8", true, false, new List<GameAction>()
|
||||||
|
|
Loading…
Reference in a new issue