bingo 项目提交
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user