36 lines
792 B
C#
36 lines
792 B
C#
|
using System;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace ZC
|
|||
|
{
|
|||
|
abstract class ProcedureBase : IProcedure
|
|||
|
{
|
|||
|
private ProcedureType _procedureType;
|
|||
|
|
|||
|
public ProcedureType procedureType => this._procedureType;
|
|||
|
|
|||
|
public virtual void Init()
|
|||
|
{
|
|||
|
var value = this.GetType().ToString().Split(".");
|
|||
|
this._procedureType = Enum.Parse<ProcedureType>(value[^1]);
|
|||
|
}
|
|||
|
|
|||
|
public virtual void OnEnter()
|
|||
|
{
|
|||
|
Debug.Log($"Enter {procedureType} procedure !!!");
|
|||
|
}
|
|||
|
|
|||
|
public virtual void OnUpdate(float dateTime)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public virtual void OnLeave()
|
|||
|
{
|
|||
|
Debug.Log($"Leave {procedureType} procedure !!!");
|
|||
|
}
|
|||
|
|
|||
|
public virtual void Dispose()
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|