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