JReact Library
Code Style and Game Programming Patterns

Related skills: C#, Unity Development, Reactive Extensions, Game Design Patterns

Code Excerpt: J_State Control

Full Library: JReact

This code implements a State Machine .

This Scriptable Object acts as a State Machine, initially used to track menu screen, and later improved to work also on more complex event systems; it offers an architecture that relies on Dependency Injection (following the logic explained in this video) and Observer pattern.

It receives state changes through the SetNewState method that offers the basics for the Command pattern.

As a Scriptable Object it can be injected to scripts that require to follow state changes that may register/subscribe to OnStateTransition.

View Code