mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2024-12-18 21:44:51 +01:00
28 lines
490 B
C#
28 lines
490 B
C#
using UnityEngine;
|
|
|
|
public class ObstacleSafe : MonoBehaviour
|
|
{
|
|
public PlayerScript playerScript;
|
|
public GameObject playerObject;
|
|
|
|
public void Start()
|
|
{
|
|
playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>();
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnCollisionEnter()
|
|
{
|
|
playerScript.isColliding = true;
|
|
}
|
|
|
|
public void OnCollisionExit()
|
|
{
|
|
playerScript.isColliding = false;
|
|
}
|
|
}
|