Added in tilemaps and started blocking the level out
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user