// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ public void AddEffect_Scale(Transform _target, EffectEventType _type, exEase.Type _curveType, Vector3 _to, float _duration) { exUIControl ctrl = GetComponent <exUIControl>(); if (ctrl) { EffectInfo_Scale info = new EffectInfo_Scale(); info.duration = _duration; info.target = _target; info.normal = _target.localScale; info.curveType = _curveType; EffectInfo_Scale.PropInfo propInfo = new EffectInfo_Scale.PropInfo(); propInfo.type = _type; propInfo.val = _to; info.propInfos.Add(propInfo); EffectState_Scale state = new EffectState_Scale(); state.info = info; state.func = info.GetCurveFunction(); AddState_Scale(ctrl, state); } }
// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ public void AddEffect_Offset(exSpriteBase _target, EffectEventType _type, exEase.Type _curveType, Vector2 _to, float _duration) { exUIControl ctrl = GetComponent <exUIControl>(); if (ctrl) { EffectInfo_Offset info = new EffectInfo_Offset(); info.duration = _duration; info.target = _target; info.normal = _target.offset; info.curveType = _curveType; EffectInfo_Offset.PropInfo propInfo = new EffectInfo_Offset.PropInfo(); propInfo.type = _type; propInfo.val = _to; info.propInfos.Add(propInfo); EffectState_Offset state = new EffectState_Offset(); state.info = info; state.func = info.GetCurveFunction(); AddState_Offset(ctrl, state); } }
public static easeCallback TypeToFunction(exEase.Type _type) { exEase.Init(); // NOTE: this can make sure we initialized the typeToCallback table. return(typeToCallback[_type]); }
// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ public static System.Func <float, float> GetEaseFunc(exEase.Type _type) { exEase.Init(); // NOTE: this can make sure we initialized the easeFunctions table. return(easeFunctions[_type]); }