LevelCheckPoint.cs 557 B

12345678910111213141516171819202122
  1. using System;
  2. using CIS;
  3. using UnityEngine;
  4. public class LevelCheckPoint : MonoBehaviour
  5. {
  6. private void OnTriggerEnter2D(Collider2D other)
  7. {
  8. if (other.CompareTag("Player"))
  9. {
  10. SingletonMonoBehaviourClass<GameLogicMgr>.instance.playerController.SetRespawnPoint(base.transform.position);
  11. if (this.levelBlock != null && !this.levelBlock.IsEntered())
  12. {
  13. SingletonMonoBehaviourClass<GameLogicMgr>.instance.currGameSection.SetCurrentBlock(this.levelBlock);
  14. }
  15. }
  16. }
  17. public int index;
  18. public LevelBlock levelBlock;
  19. }