Merge branch 'release_1'

This commit is contained in:
minenice55 2024-01-02 10:53:30 -05:00
commit cb6d1c5fc8
2 changed files with 45 additions and 28 deletions

View file

@ -98,7 +98,7 @@ namespace HeavenStudio.Games.Loaders
defaultLength = 0.5f
}
},
new List<string>() { "ntr", "keep" },
new List<string>() { "rvl", "keep" },
"rvlseal", "en",
new List<string>() { "en" }
);

View file

@ -122,45 +122,52 @@ namespace HeavenStudio
selectedDisplayAnim.DoNormalizedAnimation("Idle", GetPositionFromBeat(0, 2));
}
if (logoRevealed && !menuMode)
if (!menuMode && songPosBeat >= 0.5)
{
var controllers = PlayerInput.GetInputControllers();
foreach (var newController in controllers)
{
if (newController.GetLastButtonDown(true) > 0)
{
menuMode = true;
firstPress = true;
currentSelectable = defaultSelectable;
SetSelectableRectTarget(currentSelectable);
selectableLerpTimer = 1;
menuAnim.Play("Revealed", 0, 0);
pressAnyKeyAnim.Play("PressKeyFadeOut", 0, 0);
SoundByte.PlayOneShot("ui/UIEnter");
Debug.Log("Assigning controller: " + newController.GetDeviceName());
var lastController = PlayerInput.GetInputController(1);
if (lastController != newController)
if (logoRevealed)
{
lastController.SetPlayer(null);
newController.SetPlayer(1);
PlayerInput.CurrentControlStyle = newController.GetDefaultStyle();
usingMouse = PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch;
selectedDisplayIcon.SetActive(!usingMouse);
menuMode = true;
firstPress = true;
currentSelectable = defaultSelectable;
SetSelectableRectTarget(currentSelectable);
selectableLerpTimer = 1;
if ((lastController as InputJoyshock) != null)
{
(lastController as InputJoyshock)?.UnAssignOtherHalf();
}
menuAnim.Play("Revealed", 0, 0);
pressAnyKeyAnim.Play("PressKeyFadeOut", 0, 0);
SoundByte.PlayOneShot("ui/UIEnter");
if ((newController as InputJoyshock) != null)
Debug.Log("Assigning controller: " + newController.GetDeviceName());
var lastController = PlayerInput.GetInputController(1);
if (lastController != newController)
{
newController.OnSelected();
(newController as InputJoyshock)?.UnAssignOtherHalf();
lastController.SetPlayer(null);
newController.SetPlayer(1);
PlayerInput.CurrentControlStyle = newController.GetDefaultStyle();
usingMouse = PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch;
selectedDisplayIcon.SetActive(!usingMouse);
if ((lastController as InputJoyshock) != null)
{
(lastController as InputJoyshock)?.UnAssignOtherHalf();
}
if ((newController as InputJoyshock) != null)
{
newController.OnSelected();
(newController as InputJoyshock)?.UnAssignOtherHalf();
}
}
}
else
{
SkipToBeat(5);
}
}
}
}
@ -418,6 +425,16 @@ namespace HeavenStudio
return a;
}
public void SkipToBeat(double beat)
{
if (songPosBeat >= beat) return;
double seconds = BeatsToSecs(beat, bpm);
time = seconds;
songPos = time + offset;
songPosBeat = SecsToBeats(songPos);
musicSource.time = (float)time;
}
public void CreatePressed()
{
if (exiting) return;