This library was made to make creating game feel and effects easily.
Licensed under MIT, feel free to use, contribute, make suggestions and critiques!
- Download the latest release available here.
- Unzip the files into your Unity project (The /Plugins/ShiroiFX directory is preferred, but not obligatory)
- Wait for Unity to import the library and you're good to go
- Clone the repository.
- Install TsukiSuite via NuGet.
- Compile using MSBuild.
- Include the follow
- 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
public class Projectile : MonoBehaviour {
public Effect OnHit;
public Effect OnShot;
public void Shoot(MonoBehaviour owner) {
// TODO: Execute launch here
// Null safe extension method, only executes if effect is not null
OnShot.PlayIfPresent(this, includePositionFeature: true);
}
// Bla bla bla
private void OnHitSomething(Collision col) {
// TODO: Apply damage somehow
var pos = col.contacts.First().point;
OnHit.PlayIfPresent(this, features: new PositionFeature(pos));
}
}
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
*/
Please refer to the Wiki for instructions on how to use ShiroiFX
This project is licensed under the MIT License - see the LICENSE.md file for details