Skip to content

This is still in development and in beta state. So names can be changed and cause error.

Notifications You must be signed in to change notification settings

MaZyGer/Event-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Still in development. Name or other things can get changed.

Event-Framework

Event Framework is Event-Based-ScriptableObject Framework which allows to make fast and easy way to communicate between multiple components.

Player

You can use ScriptableObject directly without generic type like EventActionInt and handle changes at your own. Or you use EventActionValue which will add values like in this example (above image).

public class Player : MonoBehaviour
{
    public EventActionValue<int> Mana;
    public EventActionValue<Player> TargetSelection;
    
    void Start()
    {
        // Fire just the event to update the value
        Mana.Raise()
    }
    
    void UseMana()
    {
        // Will also fire event while changing the value
        Mana.Value -= 10;
    }
    
    void SelectSelfAsTarget()
    {
        TargetSelection.Value = this;
    }
}

Update without problems your UI with the event listener component. Also the ConverToEvent is an helper which includes convertion between different types like int to float. Text Updater

About

This is still in development and in beta state. So names can be changed and cause error.

Resources

Stars

Watchers

Forks

Languages