Scripting References
Everything is controlled by the RanksAnimationController.cs file.
Public Variables
The default animation that plays when this GameObject spawns or becomes active. 0 is none, 1 is breathing, and others are different spawn animations.
List of all Ranks.
When a new rank is applied, its index in the ranks list is compared to this value and is used to determine whether to call Upgrade or Downgrade particles.
It is a copy of the last applied rank, plus any modifications made manually. When applying a new rank, some rank variables don't need to be copied from the ranks list. So, if you require accurate information, getting the rank from the ranks list is better.
A list of all borders with their supported insides and correct position, and rotation for wings.
A list of everything required for wings to work.
An array of materials that are available as a shortcut in the Customize tab. Different methods can use the index of these materials to set them to the border, the inside, and the wings.
Methods
Plays an animation on the animator on the root of the game object.
Retrieves the rank from the ranks list at the specified index and applies it.
If an invalid index is passed, it logs a warning message and returns. Doesn't print an error.
Applies a rank from the ranks list by its exact name. If the rank is not found or the name is invalid, a warning is logged.
Applies the rank passed as parameter.
Applies icon with the target rank's settings.
Applies icon with the currentRank's animation settings.
Removes icon. This is same as calling SetIcon(0);
It applies the icon skipping any animation settings in the current rank.
Retrieves the appropriate material from the materials list based on the given index and applies it to the icon.
Applies the material passed as parameter to the icon.
Retrieves the appropriate material from the materials list based on the given index and applies it to the icon.
Applies the material passed as parameter to the icon.
Removes border and inside.
Updates the border with the currentRank's border animation setting. Parameters: int newBorder Will disable the border if a negative value is passed as a parameter. bool autoUpdateInside = true If the current inside isn't viable for the new border, auto update will assign a new one. bool autoUpdateWingsPosition = true If wings are changed along with this, set it false so that this doesn't handle updating the position and changing wings updates that.
Retrieves the appropriate material from the materials list based on the given index and applies it to the border
Applies the material passed as parameter to the border.
Removes inside.
Applies new inside according to currentRank's animation settings.
Applies new inside according to currentRank's animation settings.
Retrieves the appropriate material from the materials list based on the given index and applies it to the inside
Applies the material passed as parameter to the inside.
Removes Wings
Retrieves the appropriate material from the materials list based on the given index and applies it to the wings
Applies the material passed as parameter to the wings.
Removes icon, border, inside and wings.
Last updated