FiE-Game/src/Fie.Manager/FieManagerBase.cs

35 lines
571 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using Photon;
using UnityEngine;
namespace Fie.Manager
{
[FieManagerExists(FieManagerExistSceneFlag.ANYTIME_DESTROY)]
public abstract class FieManagerBase : Photon.MonoBehaviour
{
private bool _isEndStartup;
private bool _isDestroyed;
public bool isDestroyed => _isDestroyed;
protected virtual void StartUpEntity()
{
}
public void StartUp()
{
if (!_isEndStartup)
{
StartUpEntity();
_isEndStartup = true;
}
}
public void Destroy()
{
UnityEngine.Object.Destroy(base.transform.gameObject);
_isDestroyed = true;
}
}
}