24 lines
559 B
C#
24 lines
559 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.UI;
|
|
using DG.Tweening;
|
|
|
|
public abstract class ActionBase : MonoBehaviour
|
|
{
|
|
public abstract void Init();
|
|
public abstract void RegisterAction();
|
|
public abstract void RemoveAction();
|
|
|
|
public T GetChildComponent<T>(string path) where T : MonoBehaviour
|
|
{
|
|
GameObject go = transform.Find(path).gameObject;
|
|
T t = go.GetComponent<T>();
|
|
if (t == null)
|
|
{
|
|
t = go.AddComponent<T>();
|
|
}
|
|
return t;
|
|
}
|
|
}
|