Domyno/Assets/Scripts/ButtonController.cs
Gerard Gascón 27755409e3 init
2025-04-24 17:33:35 +02:00

17 lines
356 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ButtonController : MonoBehaviour{
[SerializeField] ParticleSystem winParticles;
bool won;
void OnTriggerEnter(Collider other){
if (other.CompareTag("Piece") && !won){
winParticles.Play();
won = true;
GameManager.instance.ButtonPressed();
}
}
}