mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2024-12-18 21:44:51 +01:00
21 lines
451 B
C#
21 lines
451 B
C#
using UnityEngine;
|
|
|
|
public class PipeMiddleScript : MonoBehaviour
|
|
{
|
|
public LogicManagerScript logicManager;
|
|
|
|
public void Start()
|
|
{
|
|
logicManager = GameObject.FindGameObjectWithTag("Logic").GetComponent<LogicManagerScript>();
|
|
}
|
|
|
|
public void OnTriggerEnter2D(Collider2D collision)
|
|
{
|
|
if (collision.gameObject.layer == LayerMask.NameToLayer("Bird"))
|
|
{
|
|
|
|
logicManager.AddScore();
|
|
}
|
|
}
|
|
}
|