public class ActorPlayer : Actor, ITick
{
[FoldoutGroup("Setup")] public DataMove dataMove;
protected override void Setup()
{
Add(dataMove);
Add<BehaviorInput>();
}
}
[System.Serializable]
public class DataMove : IData
{
public float x;
public float y;
public void Dispose()
{
}
}
public class BehaviorInput : Behavior, ITick
{
[Bind] private DataMove dataMove;
public override void OnTick()
{
dataMove.x = Input.GetAxis("Horizontal");
dataMove.y = Input.GetAxis("Vertical");
}
}
The framework includes:
- Time management
-
Custom Update Management.
While Monobehavior update method can be used only with inherited mono components, you can use framework Update method in ANY script.
public class MyCustomClass : ITick{ public MyCustomClass(){ ProcessingUpdate.Default.Add(this); } public void Tick(){ } }
- Object pooling both for game objects and plain c# objects
- Signal-event system
- Toolbox-singleton ( a simple servie locator )
- Simple ECS for actors
- Unity additive scenes solution
- Blueprints - scriptable objects to define common actors data
- Extended tags system
- Timers for delayed action
-
Timer.Add(0.75f, () => actor.tags.Remove(Tag.StateImmortal));
FoldGroup attribute to make your inspector look more organized:
-
Bind attribute for lazy initialization of components inside of behaviors
[Bind] private DataMove dataMove;
Currently I'm working on documentation and example projects. I use framework in my working projects and always keep it updated.