private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Player") && !active) { active = true; anim.enabled = true; CheckPointMaster.Instance().AddCheckPoint(this); GetComponent <BoxCollider2D>().enabled = false; GetComponent <Checkpoint>().enabled = false; } }
private void OnEnable() { if (CheckPointMaster.Instance() == null) { return; } if (CheckPointMaster.Instance().ExistCheckPoint()) { GetComponent <Button>().interactable = true; } else { GetComponent <Button>().interactable = false; } }
public void ContinueAction() { StartCoroutine(CheckPointMaster.Instance().LoadCheckPoint()); }
private void Start() { CheckPointMaster.Instance().savableObjects.Add(this); }