Route editor actions by active target
This commit is contained in:
74
managed/GameScripts/LifecycleProbe.cs
Normal file
74
managed/GameScripts/LifecycleProbe.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using XCEngine;
|
||||
|
||||
namespace Gameplay
|
||||
{
|
||||
public abstract class AbstractLifecycleProbe : MonoBehaviour
|
||||
{
|
||||
}
|
||||
|
||||
public sealed class LifecycleProbe : MonoBehaviour
|
||||
{
|
||||
public int AwakeCount;
|
||||
public int EnableCount;
|
||||
public int StartCount;
|
||||
public int FixedUpdateCount;
|
||||
public int UpdateCount;
|
||||
public int LateUpdateCount;
|
||||
public int DisableCount;
|
||||
public int DestroyCount;
|
||||
|
||||
public float Speed;
|
||||
public string Label = string.Empty;
|
||||
public bool WasAwakened;
|
||||
public Vector3 SpawnPoint;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
AwakeCount += 1;
|
||||
WasAwakened = true;
|
||||
Label = Label + "|Awake";
|
||||
}
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
EnableCount += 1;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
StartCount += 1;
|
||||
}
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
FixedUpdateCount += 1;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
UpdateCount += 1;
|
||||
Speed += 1.0f;
|
||||
}
|
||||
|
||||
public void LateUpdate()
|
||||
{
|
||||
LateUpdateCount += 1;
|
||||
SpawnPoint = new Vector3(SpawnPoint.X + 1.0f, SpawnPoint.Y, SpawnPoint.Z);
|
||||
}
|
||||
|
||||
public void OnDisable()
|
||||
{
|
||||
DisableCount += 1;
|
||||
}
|
||||
|
||||
public void OnDestroy()
|
||||
{
|
||||
DestroyCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UtilityHelper
|
||||
{
|
||||
public int Value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user