Skip to content

TheBricktop/ShiroiFX

 
 

Repository files navigation

ShiroiFX

A library with Game Feel and ease of use, your designers will love you forever

ShiroiFX

This library was made to make creating game feel and effects easily.

Features

  • Created to be absurdly easy to use.
  • Ever wanted to affect something with multiple different values and then blend then all together in the final result? We present to you Services!
  • Documented

Quick Examples

Effects

public class Projectile : MonoBehaviour {
    public WorldEffect OnHit;
    public WorldEffect OnShot;

    public void Shoot(Entity owner) {
        // TODO: Execute launch here
        // Null safe extension method, only executes if effect is not null
        OnShot.ExecuteIfPresent(transform.position);
    }

    // Bla bla bla
        
    private void OnHitSomething(Collision col) {
        // TODO: Apply damage somehow
        var pos = col.contacts.First().point;
        OnHit.ExecuteIfPresent(pos);
    }
}

Services

var timeController = new GameObject().AddComponent<TimeController>();
var curve = AnimationCurve.EaseInOut(0, 0, 1, 1);
var serviceA = timeController.RegisterContinualService(meta: new ConstantTimeMeta(2), priority: 10);
var serviceB = timeController.RegisterTimedService(duration: 5, meta: new AnimatedTimeMeta(curve), priority: 20);
/* 
 * Services A and B are automatically blended by the   
 * TimeController based on their priorities
 */

Getting Started

Please refer to the Wiki for instructions on how to use ShiroiFX

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A Unity Game Feel library, made for designers with a big dose of love

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%