Beispiel #1
0
    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;
        }
    }
Beispiel #2
0
 private void OnEnable()
 {
     if (CheckPointMaster.Instance() == null)
     {
         return;
     }
     if (CheckPointMaster.Instance().ExistCheckPoint())
     {
         GetComponent <Button>().interactable = true;
     }
     else
     {
         GetComponent <Button>().interactable = false;
     }
 }
Beispiel #3
0
 public void ContinueAction()
 {
     StartCoroutine(CheckPointMaster.Instance().LoadCheckPoint());
 }
Beispiel #4
0
 private void Start()
 {
     CheckPointMaster.Instance().savableObjects.Add(this);
 }