This commit is contained in:
Gerard Gascón 2025-04-24 14:23:29 +02:00
commit bd5b1556ff
269 changed files with 6249829 additions and 0 deletions

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CheckPoint : MonoBehaviour{
public Transform checkpointPos;
void OnTriggerEnter2D(Collider2D col){
if (col.CompareTag("Player")){
col.GetComponent<PlayerController>().lastCheckpoint = checkpointPos.position;
}
}
void OnDrawGizmos(){
Gizmos.color = Color.green;
BoxCollider2D col = GetComponent<BoxCollider2D>();
Gizmos.DrawWireCube(col.transform.position, col.size);
}
}