change: Finished MushroomVillage

This includes changes such as putting enemies in levels, adding
projectiles, and finalizing the bounces for the moving platforms

The cymbal has been implemented, and provides a short immunity to
projectiles

Every section is playable, and includes a final ending object, although there
is no transistion to the level from the previous level yet
This commit is contained in:
Nicholas Novak
2023-05-05 10:44:42 -07:00
parent ba01db1051
commit d3dfe2acac
10 changed files with 2458 additions and 221 deletions

View File

@@ -10,21 +10,26 @@ public class GameUIController : MonoBehaviour
public GameObject trumpetBackground;
public GameObject tambourineBackground;
public GameObject clarinetBackground;
public GameObject cymbalBackground;
[HideInInspector] public GameObject trumpetUI;
[HideInInspector] public GameObject tambourineUI;
[HideInInspector] public GameObject clarinetUI;
[HideInInspector] public GameObject cymbalUI;
void Awake()
{
this.trumpetUI = trumpetBackground.transform.GetChild(0).gameObject;
this.tambourineUI = tambourineBackground.transform.GetChild(0).gameObject;
this.clarinetUI = clarinetBackground.transform.GetChild(0).gameObject;
this.cymbalUI = this.cymbalBackground.transform.GetChild(0).gameObject;
}
void Start() {
void Start()
{
this.trumpetBackground.SetActive(StateController.Instance.HasTrumpet());
this.tambourineBackground.SetActive(StateController.Instance.HasTambourine());
this.clarinetBackground.SetActive(StateController.Instance.HasClarinet());
this.cymbalBackground.SetActive(StateController.Instance.HasCymbal());
}
public void ToggleTrumpet(bool toggleState)
@@ -54,10 +59,20 @@ public class GameUIController : MonoBehaviour
}
}
public void ToggleCymbal(bool desiredState)
{
bool curEnabled = clarinetUI.GetComponent<Image>().enabled;
if (curEnabled != desiredState)
{
cymbalUI.GetComponent<Image>().enabled = desiredState;
}
}
public void UpdateInstrumentUI()
{
this.ToggleTrumpet(StateController.Instance.HasTrumpet());
this.ToggleTambourine(StateController.Instance.HasTambourine());
this.ToggleClarinet(StateController.Instance.HasClarinet());
this.ToggleCymbal(StateController.Instance.HasCymbal());
}
}