dronkowitz

BingoBoard.cs

Dec 26th, 2021 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.30 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class BingoBoard : MonoBehaviour
  7. {
  8.     public List<GameObject> boardNumbers;
  9.     public GameObject bingoBoard;
  10.     public bool addRingsFromBoard;
  11.     public bool removeRingsFromBoard;
  12.     public bool addRingBonus;
  13.     public bool showRings = true;
  14.     public int ringCount = 0;
  15.     public float ringBonus = 1f;
  16.     public float timer = 0;
  17.     public float maxRings = 0;
  18.     // Start is called before the first frame update
  19.     void Start()
  20.     {
  21.         boardNumbers = new List<GameObject>();
  22.     }
  23.  
  24.     // Update is called once per frame
  25.     void Update()
  26.     {
  27.         updateboard();
  28.     }
  29.  
  30.     private void OnTriggerEnter(Collider other)
  31.     {
  32.        
  33.     }
  34.     void updateboard()
  35.     {
  36.         int i = 0;
  37.         while (i < boardNumbers.Count)
  38.         {
  39.             if (boardNumbers[i].GetComponent<BingoBoardNumbers>().triggered == true)
  40.             {
  41.                 boardNumbers[i].GetComponent<BingoBoardNumbers>().boardNumberMesh.SetActive(true);
  42.             }
  43.             else
  44.             {
  45.                 boardNumbers[i].GetComponent<BingoBoardNumbers>().boardNumberMesh.SetActive(false);
  46.             }
  47.             i += 1;
  48.         }
  49.     }
  50.    
  51.  
  52.    
  53. }
  54.  
Add Comment
Please, Sign In to add comment