using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RoomEntity : MonoBehaviour
{
[HideInInspector]
public ProgressController pc;
[HideInInspector]
public PlatformController platformController;
[SerializeField]
private bool contributesToProgress;
private bool contributed = false;
private void Start()
{
pc = transform.parent.GetComponent<ProgressController>();
if(contributesToProgress)
IncreaseTotalProgress();
}
public void IncreaseTotalProgress()
{
pc.AddToUpdatables(gameObject);
pc.totalProgress += 1;
}
public void UpdateRoomInfo()
{
if(pc != null && !contributed)
{
if(contributesToProgress)
pc.UpdateProgress();
contributed= true;
}
}
}