Quote from: cat on Sun 21/07/2019 19:41:50
(how would I go about climb animation anyway?)
An outfit is just a map from a string key to a directional animation, and you can add any animation you want, so you can do for example:
var clarkKentClimb = _game.Factory.Graphics.GetDirectionalAnimation(_baseFolder, "CK/Climb/Left", "CK/Climb/Right", "CK/Climb/Down", "CK/Climb/Up");
clarkKentOutfit["Climb"] = clarkKentClimb;
var supermanClimb = _game.Factory.Graphics.GetDirectionalAnimation(_baseFolder, "Superman/Climb/Left"); //no budget to animate all dirs, the left animation will always be used
supermanOutfit["Climb"] = supermanClimb;
//Then, when you want to animate:
_character.Outfit = supermanOutfit;
_character.StartAnimation(_character.Outfit["Climb"].Down);
...
_character.Outfit = clarkKentOutfit; //With the new addition, if superman was still climbing when changing the outfit, clark kent will be climbing now as the climb animation exists for it as well (and I guess if the climb animation doesn't exist, I'll rollback to the idle animation, and if the idle animation doesn't exist, I'll do nothing)
(But an animation doesn't have to be associated with an outfit, you can also start an animation directly).