public static void AssignFast(ITickable tickable, UnityTick tick_type) { switch (tick_type) { case UnityTick.UPDATE: update_tickable_list.Add(tickable); break; case UnityTick.FIXED_UPDATE: fixed_update_tickable_list.Add(tickable); break; case UnityTick.LATE_UPDATE: late_update_tickable_list.Add(tickable); break; } }
public Tween( T start_value, UnityTick tick_type = UnityTick.UPDATE, Easing.Ease.Interpolation <T> ease_fuction = null, float time_factor = 1, System.Action change_callback = null ) { this.target_value = this.current_value = start_value; this.tick_type = tick_type; this.time_factor = time_factor; this.ease_fuction = ease_fuction; this.change_callback = change_callback; if (this.tick_type != UnityTick.MANUAL) { TickManager.AssignFast(this, this.tick_type); } }
public static void ReassignFast(ITickable tickable, UnityTick from_tick_type, UnityTick to_tick_type) { // Remove switch (from_tick_type) { case UnityTick.UPDATE: update_tickable_list.Remove(tickable); break; case UnityTick.FIXED_UPDATE: fixed_update_tickable_list.Remove(tickable); break; case UnityTick.LATE_UPDATE: late_update_tickable_list.Remove(tickable); break; } // Add AssignFast(tickable, to_tick_type); }