|
Post by hawaiiand on Jun 22, 2018 20:32:34 GMT
Are particle effects a good approach for starting to add some effects when an ability is used? Also, where would they belong? Do they need to be pooled? My initial thought is that abilities probably have some animation components to them. I know it was mentioned a few times throughout the tutorial where we might insert calls to animators. My latest thought is that perhaps each Tile should have a component. Since abilities generally apply to a tile, if for example a Unit casts "Heal", maybe the targeted Tiles could run their animated particle effects to create a "swirling" type of effect around any Unit that happens to be standing on top of it. Similarly, if a Magic ability "Blast" is cast, I would in theory set the Particle Effect properties and execute its animation on top of the tile that was targeted.
Any info/insight/direction that anyone can offer would be very appreciated. Everything about Unity and gamdev is new to me, so I won't be offended if someone tells me that I'm approaching this all wrong.
Thanks!
|
|
|
Post by hawaiiand on Jun 23, 2018 7:24:12 GMT
Delete that, its not even close. The animation belongs on the ability, and PerformAbilityState would loop through the turn.targets and play the animation at the .center... This should be deleted, unless Im still wrong, then I would definitely be all ears.
|
|
|
Post by Cerulea 1st on Jun 23, 2018 15:40:06 GMT
Take this with a grain of salt, but perhaps you could make a new state for the animation, after the ability is selected and targeting the enemy or ally unity, before the numbers pop up on the field. In the state simply check what ability was used last, maybe set a string using a listener to the battle controller to keep track. Then play that animation/effect to the targeted unit. I think particles or a sprite based animation could work fine, depending on if it was a magic spell, or more like a summon. Maybe even darken the screen and have lightning dance around and hit the target square. (The square should be targeted by the selection indicator, making it easy to know where to play the effect.)
Again, I might be far off, so wait for someone more experienced to respond!
|
|
|
Post by Admin on Jun 24, 2018 23:58:18 GMT
There are a ton of ways to implement animation and special fx. One common way is to use the animator controller (see here: docs.unity3d.com/Manual/class-AnimatorController.html) which can have scripts tied to states and has a lot of features and control over the ways states transition between each other etc. Many setups will probably use this in combination with the rest of their game state machine code.
|
|