Play Mode Features Part 1 (#413)

* add pause menu assets

* layout and animation for pause

* make play mode prefab function

re-assign unused class inheritance

* remove filepath

* don't init medals twice

* remove PlayerActionObject

* initial attempt at anti-note lock

TODO: circumvent inputs clearing themselves making the functionality not work

* properly implement input lock prevention

* fix error on editor open

* functional pause menu

* bugfix

* make unpausing not reset current play statistics

* serialize initializer components in inspector instead of procedurally generating

* sanity check

* note for fade

* make flashes in the camera prefabs instead of in world space

remove / reorganize script files
address issue #411

* fix bug with perfect campaign

make minigame transitions hide the game canvas
adjust animation of the song credits textbox

* fully functional intro scene (placeholder for future title screen)

refactored entire game loading procedure
re-organized some files

* add interaction query to disclaimer text

* reword legal

* anchor section medals to section display

more tempo change placement controls

* operation order bugfix

* prep for future ratings and stats

* loading text

* autoload opening scene

* splash screen adjustments

added setting to force enable splash screen

* adjust setting entry
This commit is contained in:
minenice55
2023-05-07 16:33:15 -04:00
committed by GitHub
parent 6c0fcca922
commit caf7d9465f
183 changed files with 17863 additions and 2247 deletions

View File

@ -85,11 +85,12 @@ namespace HeavenStudio.Common
return;
}
GameProfiler.instance.perfect = false;
texAnim.Play("GoForAPerfect_Miss");
pAnim.Play("PerfectIcon_Miss", -1, 0);
Jukebox.PlayOneShot("perfectMiss");
if (GameProfiler.instance != null)
GameProfiler.instance.perfect = false;
}
public void Enable(double startBeat)

View File

@ -19,17 +19,24 @@ namespace HeavenStudio.Common
[SerializeField] GameObject TimingDisplayPrefab;
[SerializeField] GameObject SkillStarPrefab;
[SerializeField] GameObject ChartSectionPrefab;
[SerializeField] SectionMedalsManager SectionMedalsManager;
[Header("Components")]
[SerializeField] Transform ComponentHolder;
List<OverlaysManager.OverlayOption> lytElements = new List<OverlaysManager.OverlayOption>();
public static bool OverlaysReady {get { return instance != null &&
TimingAccuracyDisplay.instance != null &&
SkillStarManager.instance != null &&
SectionMedalsManager.instance != null &&
HeavenStudio.Games.Global.Textbox.instance != null;}}
// Start is called before the first frame update
void Start()
public void Start()
{
instance = this;
RefreshOverlaysLayout();
instance = this;
}
// Update is called once per frame
@ -82,12 +89,15 @@ namespace HeavenStudio.Common
{
if (c is TimingDisplayComponent) {
c.CreateElement(TimingDisplayPrefab, ComponentHolder);
Debug.Log("Create TimingDisplayComponent");
}
else if (c is SkillStarComponent) {
c.CreateElement(SkillStarPrefab, ComponentHolder);
Debug.Log("Create SkillStarComponent");
}
else if (c is SectionComponent) {
c.CreateElement(ChartSectionPrefab, ComponentHolder);
Debug.Log("Create SectionComponent");
}
c.PositionElement();
}
@ -225,6 +235,8 @@ namespace HeavenStudio.Common
go.transform.localScale = Vector3.one * scale;
go.transform.localRotation = Quaternion.Euler(0, 0, rotation);
go.SetActive(enable && OverlaysManager.OverlaysEnabled);
HeavenStudio.Common.SectionMedalsManager.instance?.AnchorToOverlay(go);
}
}

View File

@ -20,9 +20,13 @@ namespace HeavenStudio.Common
bool isMedalsEligible = true;
// Start is called before the first frame update
void Start()
public void Awake()
{
instance = this;
}
public void Start()
{
cond = Conductor.instance;
GameManager.instance.onSectionChange += OnSectionChange;
}
@ -33,6 +37,13 @@ namespace HeavenStudio.Common
}
public void AnchorToOverlay(GameObject overlay)
{
transform.position = overlay.transform.position;
transform.rotation = overlay.transform.rotation;
transform.localScale = overlay.transform.localScale;
}
public void MakeIneligible()
{
isMedalsEligible = false;
@ -42,7 +53,7 @@ namespace HeavenStudio.Common
{
isMedalsStarted = false;
isMedalsEligible = true;
foreach (Transform child in MedalsHolder.transform)
foreach (Transform child in MedalsHolder?.transform)
{
Destroy(child.gameObject);
}
@ -59,6 +70,7 @@ namespace HeavenStudio.Common
}
else
{
GameManager.instance.ClearedSection = isMedalsEligible;
GameObject medal = Instantiate(isMedalsEligible ? MedalOkPrefab : MedalMissPrefab, MedalsHolder.transform);
medal.SetActive(true);
isMedalsEligible = true;
@ -70,6 +82,7 @@ namespace HeavenStudio.Common
if (!PersistentDataManager.gameSettings.isMedalOn) return;
if (PersistentDataManager.gameSettings.isMedalOn && isMedalsStarted)
{
GameManager.instance.ClearedSection = isMedalsEligible;
GameObject medal = Instantiate(isMedalsEligible ? MedalOkPrefab : MedalMissPrefab, MedalsHolder.transform);
medal.SetActive(true);
}

View File

@ -22,6 +22,7 @@ namespace HeavenStudio.Common
public float StarTargetTime { get { return starStart + starLength; } }
public bool IsEligible { get; private set; }
public bool IsCollected { get { return state == StarState.Collected; } }
float starStart = float.MaxValue;
float starLength = float.MaxValue;
@ -29,10 +30,10 @@ namespace HeavenStudio.Common
Conductor cond;
// Start is called before the first frame update
void Start()
public void Start()
{
instance = this;
cond = Conductor.instance;
instance = this;
}
// Update is called once per frame

View File

@ -35,7 +35,7 @@ namespace HeavenStudio.Common
float targetArrowPos = 0f;
// Start is called before the first frame update
void Start()
public void Start()
{
instance = this;
}