forked from akanyan/mu3-mods
feat: add infinite gp and skip premusic
Also, run the autoformatter. Also, the skip is now cleaner.
This commit is contained in:
@ -12,7 +12,7 @@ using UnityEngine;
|
||||
|
||||
namespace MU3.Sequence;
|
||||
|
||||
public class patch_PlayMusic : PlayMusic {
|
||||
public class patch_PlayMusic: PlayMusic {
|
||||
private static readonly TimeSpan HOLD_DURATION = TimeSpan.FromSeconds(1.0f);
|
||||
private static readonly TimeSpan ROLL_DURATION = TimeSpan.FromSeconds(0.5f);
|
||||
public static bool QuickSkip = false;
|
||||
@ -24,7 +24,7 @@ public class patch_PlayMusic : PlayMusic {
|
||||
private bool _isHoldingAck;
|
||||
private DateTime _holdingStartTime;
|
||||
private float enemyPosX;
|
||||
private patch_NotesManager ntMgr => (patch_NotesManager) _gameEngine?.notesManager;
|
||||
private patch_NotesManager ntMgr => (patch_NotesManager)_gameEngine?.notesManager;
|
||||
private extern void orig_Execute_Play();
|
||||
|
||||
public static double FadeOut(double progress, double min, double max) {
|
||||
@ -66,12 +66,12 @@ public class patch_PlayMusic : PlayMusic {
|
||||
private void Execute_Play() {
|
||||
if(_isRolling) {
|
||||
TimeSpan timeSpan = CustomDateTime.Now - _rollingStartTime;
|
||||
if (timeSpan <= ROLL_DURATION) {
|
||||
if(timeSpan <= ROLL_DURATION) {
|
||||
double num1 = FadeOut(timeSpan.TotalMilliseconds / ROLL_DURATION.TotalMilliseconds, 0.0, 1.0);
|
||||
double num2 = FadeIn(timeSpan.TotalMilliseconds / ROLL_DURATION.TotalMilliseconds, 0.0, 1.0);
|
||||
ntMgr.setFrameForce(_totalRollingFrame * (float)(1.0 - num1));
|
||||
ntMgr.enemyOffset = new Vector3(
|
||||
ntMgr.enemyOffset.x + (enemyPosX - ntMgr.getEnemyPos().x), 20f * (float) num2, 0.0f
|
||||
ntMgr.enemyOffset.x + (enemyPosX - ntMgr.getEnemyPos().x), 20f * (float)num2, 0.0f
|
||||
);
|
||||
} else {
|
||||
EndRolling();
|
||||
|
Reference in New Issue
Block a user