1
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace BITKit
|
||||
{
|
||||
public abstract class Mono : MonoBehaviour, IMonoProxy
|
||||
{
|
||||
protected virtual void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
protected virtual void Start()
|
||||
{
|
||||
}
|
||||
protected virtual void Update()
|
||||
{
|
||||
}
|
||||
protected virtual void FixedUpdate()
|
||||
{
|
||||
}
|
||||
protected virtual void LateUpdate()
|
||||
{
|
||||
}
|
||||
protected virtual void OnDestroy()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13003171a12d81c4eaee9c516471992a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,40 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
namespace BITKit
|
||||
{
|
||||
public class MonoEvents : Mono
|
||||
{
|
||||
public UnityEvent OnAwake = new();
|
||||
public UnityEvent OnStart = new();
|
||||
public UnityEvent<float> OnUpdate = new();
|
||||
public UnityEvent<float> OnFixexUpdate = new();
|
||||
public UnityEvent<float> OnLateUpdate = new();
|
||||
public UnityEvent OnDestroyComponent = new();
|
||||
protected override void Awake()
|
||||
{
|
||||
OnAwake.Invoke();
|
||||
}
|
||||
protected override void Start()
|
||||
{
|
||||
OnStart.Invoke();
|
||||
}
|
||||
protected override void Update()
|
||||
{
|
||||
OnUpdate.Invoke(Time.deltaTime);
|
||||
}
|
||||
protected override void FixedUpdate()
|
||||
{
|
||||
OnFixexUpdate.Invoke(Time.deltaTime);
|
||||
}
|
||||
protected override void LateUpdate()
|
||||
{
|
||||
OnLateUpdate.Invoke(Time.deltaTime);
|
||||
}
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
OnDestroyComponent.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e8903c9eaac98b4788b121973994a29
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -9,7 +9,8 @@ namespace BITKit
|
||||
public abstract class StateBasedMonoBehaviour<T> : MonoBehaviour, IStateMachine<T> where T : IState
|
||||
{
|
||||
[SerializeField] private MonoStateMachine<T> stateMachine;
|
||||
|
||||
protected Transform Transform => _transform ? _transform : _transform = transform;
|
||||
private Transform _transform;
|
||||
public bool Enabled
|
||||
{
|
||||
get => stateMachine.Enabled;
|
||||
|
Reference in New Issue
Block a user