private void ClearAnimation(EquipmentSlotType slot) { Animator anim = AnimatorFromEquipmentType(slot); EquipmentAnimatorMapping map = MappingFromEquipmentType(slot); map.current = EquipmentAnimationControllerName.NOT_SET; anim.runtimeAnimatorController = null; anim.GetComponent <SpriteRenderer> ().sprite = null; }
public void UnequippedUpdateMapping(Sheet s, EquipmentSlotType slotType, Equipment e) { EquipmentAnimatorMapping map = MappingFromEquipmentType(slotType); if (map != null) //can be null if the slot type is not a weapon, body, or head gear type as of 04/2017 // Debug.Log(slotType + ": will remove"); { ClearAnimation(slotType); RefreshAnimations(); } }
public void EquippedUpdateMapping(Sheet s, EquipmentSlotType slotType, Equipment e) { EquipmentAnimatorMapping map = MappingFromEquipmentType(slotType); if (map != null) //can be null if the slot type is not a weapon, body, or head gear type as of 04/2017 // Debug.Log(slotType + ": will add!"); { map.animator = AnimatorFromEquipmentType(slotType); map.current = e.AnimationControllerName; RefreshAnimations(); } }