CowsinsUtilities
Last updated
Last updated
Contains different utilities and functions that are accessible to use from any script.
If you want to use Cowsins Utilities, ensure you are using the cowsins library by adding the next snippet on top of your script:
GetSpreadDirection (float amount, Camera camera)
Returns a Vector3 that applies spread to the bullets. This is used in
amount: Amount of Spread to apply.
camera: Camera to calculate spread from.
PlayAnim (string anim, Animator animator)
Plays the specified animation on the specified Animator using Triggers.
anim: Name of the Animation To Play
animator: Animator to play the anim on.
ForcePlayAnim (string anim, Animator animator)
Force to play the specified animation on the specified Animator ignoring transitions
anim: Name of the Animation To Play
animator: Animator to play the anim on.
StartAnim (string anim, Animator animator)
Plays the specified animation on the specified Animator using Booleans.
anim: Name of the Animation To Play
animator: Animator to play the anim on.
StartAnim (string anim, Animator animator)
Stops the specified animation on the specified Animator using Booleans.
anim: Name of the Animation To Play
animator: Animator to play the anim on.
SavePreset (Object source, string name)
Saves a Preset.
source: Preset to save. This can be any object.
name: Names the Preset.
ApplyPreset(Preset preset, Object target)
Loads a Preset onto an object
preset: Preset to load.
target: Object to apply the preset to. This can be any object.
EmptyString(string string_)
Returns true if the string is empty
string_: String to verify.
GetDamageableParent(Transform child)
Given an object, finds if there is a parent that is an IDamageable
child: Transform to verify.