27 lines
546 B
C#
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);
|
|
}
|
|
}
|
|
}
|