Publisher | Damian Gonzalez |
---|---|
File size | 1.05MB |
Number of files | 34 |
Latest version | 1 |
Latest release date | 2020-04-01 02:59:13 |
First release date | 2020-04-17 07:56:11 |
Supported Unity versions | 2018.4.2 or higher |
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 player can manually cancel the ring
- The input method (either GetAxis or GetAxisRaw)
- What to do on release: Jump, ThrowObject, InstantiateAndThrow or JustFireEvent.
- How much impulse to apply to objects
- Which object to move, or which prefab to instantiate, the offset (where in the world) and the container (where in the hierarchy)
- Whether you want to invert the direction or not
- Camera Shake: How much on the ring start, how much on the ring release
- Freeze time while Ring is on: How much slow motion to apply, whether you want it or not
- Pulsing movement to the ring: How fast, how strong
- Time out: whether you want this or not, how much time, and what happens when time is up (should it be equivalent to canceling the ring or releasing the button)
Besides, you can configure the camera shake per se: Which axes camera will rotate.
This asset includes 18 different shapes for your ring, all in white color, so you can give them the color you want using the 'Color' variable in the Sprite Renderer.
_______________________________________________________________
TOO MUCH FOR NOW?
:D Keep in mind:
1) This seems complex, but implementing it is as easy as dragging a prefab inside your player.
2) There is a simpler version of this asset, called "Direction Ring (simplified)" and it has less functionalities (no camera shake, no time-out, no cancelling, no pulse)
LINKS
Full Documentation | More assets from Damian Gonzalez