//Color Property public static IAni To <T>(T target, string colorPropertyName, XColorHash hash, float time = 1.0f, IEasing easing = null, uint frameSkip = 0, bool realTime = false) { ITimer tick = _ticker; ITimer tickReal = _tickerReal; ObjectTween tween = new ObjectTween(realTime ? tickReal : tick); ColorUpdater <T> updater = (ColorUpdater <T>)UpdaterFactory.Create <T>(target, colorPropertyName, hash, hash.GetStart()); tween.FrameSkip = frameSkip; tween.updater = updater; tween.ClassicHandlers = hash; tween.time = time; tween.easing = (easing != null) ? easing : Linear.easeNone; return(tween); }
public Settings() { // // To add event handlers for saving and changing settings, uncomment the lines below: // this.SettingChanging += this.SettingChangingEventHandler; // this.SettingsSaving += this.SettingsSavingEventHandler; // FYSimSpeedSetting = new SensorUpdater(); SWSetColorTrainOccupied = new ColorUpdater(); SWSetColorTrackNotInitialized = new ColorUpdater(); SWSetColorTrackNotActive = new ColorUpdater(); SWSetColorTrackDisabled = new ColorUpdater(); SWSetColorTrackDisabledNotOccupied = new ColorUpdater(); }
//Color Property public static IXTween ToColor <T>(T target, string colorPropertyName, XColorHash hash, float time, IEasing easing = null, bool realTime = false) { ITimer tick = _ticker; ITimer tickReal = _tickerReal; ObjectTween tween = Pool <ObjectTween> .Pop(); ColorUpdater <T> updater = UpdaterFactory.Create <T>(target, colorPropertyName, hash, hash.GetStart()); tween.Initialize(realTime ? tickReal : tick, 0); tween.Updater = updater; tween.ClassicHandlers = hash; tween.Time = time; tween.Easing = (easing != null) ? easing : Linear.easeNone; return(tween); }