// Helper method that hides a sprite using the method // set for this animation (hiding vs deactivation). protected void HideSprite(SpriteBase sp, bool tf) { if (deactivateNonPlaying) if (deactivateRecursively) sp.gameObject.SetActiveRecursively(!tf); else sp.gameObject.active = !tf; else sp.Hide(tf); }
// Helper method that hides a sprite using the method // set for this animation (hiding vs deactivation). protected void HideSprite(SpriteBase sp, bool tf) { if (deactivateNonPlaying) { #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 sp.gameObject.SetActive(!tf); #else if (deactivateRecursively) sp.gameObject.SetActiveRecursively(!tf); else sp.gameObject.active = !tf; #endif } else sp.Hide(tf); }