DIRECTION RING (full)
You sure know Ori games and how you can select the direction you want to jump or fire. This asset gives you something like that.
THIS IS WHAT IT DOES:
1) Once you press jump, or fire (or any button or key you define), an animated ring will appear around the player, and time will slow down (slow motion effect)
2) While you're holding the button, you'll be able to select a direction with the joystick or keyboard
3) When you release the button, camera will shake and the requested action will fire (and time goes back to normal again)
You can choose what it actually does when the button/key is released:
a) A force can be applied to player itself (like a jump) on selected direction
b) A force can be applied to any other object
c) A prefab can be instantiated and then a force applies to it
d) or... nothing, you can just respond to the events risen.
You can have as many rings as you want (In the demo scene there are 3 different rings, each one linked to a different joystick button).
_______________________________________________________________
THIS ASSET INCLUDES:
- Camera shake function
- Slow motion effect
- 18 ring sprites for you to choose
SLOW MOTION EFFECT
This asset includes a cool slow-motion effect while the ring is active. Obviously this is optional and you can configure as you want.
CAMERA SHAKE
This asset includes a camera shake effect for both moments: When the ring starts (button pressed) and when ring fires (button released). This is optional and you can configure both shakes magnitude. Also you can configure on which axes (X,Y,Z) camera should rotate and how long they should be.
TIME-OUT
You may not want the player to abuse the slow motion effect, so you could set a maximum time for the ring. If that time passes, the ring cancels. You can choose the time-out action, whether it should act as a cancelation (nothing happens) or as releasing the button, executing the action.
CANCELATION
Hasn't happened to you? You press the wrong button and activate a power... and now you have to waste it? Well, here the player can cancel the ring with another button or key. You can set which keys or buttons cancel the ring.
_______________________________________________________________
HOW TO USE
It depends on you, how customized you want it.
The simplest way to use it is just drag the ring prefab inside your Player, and that's it. Then you can play with the variables in the inspector (The inspector is user-friendly and self-explanatory. However, the documentation gives you details on every variable.)
A more advanced way would be extend its functionality (or override some of it) by listening (from any script) the events it fires.
EVENTS?
Yes, events will be risen whenever:
a) a ring starts
b) a ring cancels
c) a ring fires
Obviously you can ignore them and just use the jump this asset offers...
...Or, you can very easily subscribe and listen to these events an respond however you want in your own scripts, without having to touch the asset's scripts. These events provides useful information. For example, "ring_fired" event provides you:
- which ring is rising the event, useful if you have several of them
- which was the release action of that ring ("Jump", "InstantiateAndThrow", etc)
- the chosen direction, so you can act with it
- the new instance created from your prefab, so you can apply forces or effects to it
Subscribing to events it's only 1 line of code where you say what method (of your own) to call when an event occurs. It's all detailed in the documentation.
VARIABLES IN THE INSPECTOR
You can set many things in the inspector, as you can see in this screenshot:
In the documentation (link at the bottom) you can see all variables in the inspector and what they mean. They're a lot, so, to summarize, you can control:
- Exactly how the ring is activated (which buttons [like "Jump", "Fire1"] or keys [like "space", "enter"])
- Exactly with which buttons or keys the pl
Description sourced from the Unity Asset Store listing.