27 lines
612 B
C#
27 lines
612 B
C#
using BingoBrain.Asset;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace BingoBrain
|
|
{
|
|
public class GameCell
|
|
{
|
|
public GameObject gameObject;
|
|
public Transform transform;
|
|
|
|
public void InitByPath(string path, string name, UnityAction action)
|
|
{
|
|
if (gameObject != null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
BetKit.Instance.LoadGameObjectAndClone(path, name, go =>
|
|
{
|
|
gameObject = go;
|
|
transform = gameObject.transform;
|
|
action?.Invoke();
|
|
});
|
|
}
|
|
}
|
|
} |