bubble_shooter/Assets/Scripts/Bubble.cs
2025-05-20 10:03:01 +05:30

27 lines
546 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bubble : MonoBehaviour
{
public Vector2 gridPosition;
public BubblesGenerator bubblesGenerator;
public List<GameObject> neighbors;
public int lowestNeighborY;
public void processNeighbors(int lowestNeightbourY){
lowestNeighborY = lowestNeightbourY;
if(neighbors.Count == 0){
Destroy(gameObject);
}
if(lowestNeightbourY > 0){
Destroy(gameObject);
}
}
}