init
This commit is contained in:
commit
27755409e3
195 changed files with 146336 additions and 0 deletions
17
Assets/Scripts/ButtonController.cs
Normal file
17
Assets/Scripts/ButtonController.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue