Added in tilemaps and started blocking the level out

This commit is contained in:
Nicholas Novak
2023-05-03 15:18:21 -07:00
parent 9f70008657
commit ee0b076ba7
1138 changed files with 46413 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ public class GameUIController : MonoBehaviour
[HideInInspector] public GameObject tambourineUI;
[HideInInspector] public GameObject clarinetUI;
void Start()
void Awake()
{
this.trumpetUI = trumpetBackground.transform.GetChild(0).gameObject;
this.tambourineUI = tambourineBackground.transform.GetChild(0).gameObject;

View File

@@ -5,7 +5,7 @@ using UnityEngine;
public class SpawnPointBehavior : MonoBehaviour
{
// set in inspector
// set in inspector
[Header("Sprites")]
[SerializeField] private Sprite deactivatedSprite;
[SerializeField] private Sprite activatedSprite;
@@ -15,24 +15,25 @@ public class SpawnPointBehavior : MonoBehaviour
// not set in inspector
private SpriteRenderer _sr;
private StateController stateController;
// Start is called before the first frame update
void Start()
{
_sr = this.gameObject.GetComponent<SpriteRenderer>();
stateController = GameObject.Find("StateController").GetComponent<StateController>();
if (firstSpawnPoint) {
ActivateSpawnPoint();
}
_sr = this.gameObject.GetComponent<SpriteRenderer>();
if (firstSpawnPoint)
{
ActivateSpawnPoint();
}
}
public void ActivateSpawnPoint() {
public void ActivateSpawnPoint()
{
_sr.sprite = activatedSprite;
stateController.spawnPoint = this.gameObject;
StateController.Instance.spawnPoint = this.gameObject;
}
public void DeactivateSpawnPoint() {
public void DeactivateSpawnPoint()
{
_sr.sprite = deactivatedSprite;
}
}

View File

@@ -48,7 +48,7 @@ public class StateController : MonoBehaviour
{
Instance = this;
}
//DontDestroyOnLoad(this.gameObject);
DontDestroyOnLoad(this.gameObject);
SceneManager.sceneLoaded += OnSceneLoaded;
if (this.inDebugMode)
@@ -123,9 +123,12 @@ public class StateController : MonoBehaviour
case "GrenouilleVillage":
this.itemProgression = UnlockedItems.None;
break;
case "GrappleScene":
case "Brasslands":
this.itemProgression = UnlockedItems.Trumpet;
break;
case "GrappleScene":
this.itemProgression = UnlockedItems.Tambourine;
break;
case "ClarinetScene":
this.itemProgression = UnlockedItems.Clarinet;
break;