/////////////////////////////////////////////////////////////////////////////// // functions /////////////////////////////////////////////////////////////////////////////// // ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ void Awake() { exUIControl ctrl = GetComponent <exUIControl>(); if (ctrl) { if (scaleInfos != null) { for (int j = 0; j < scaleInfos.Count; ++j) { EffectInfo_Scale info = scaleInfos[j]; EffectState_Scale state = new EffectState_Scale(); state.info = info; state.func = info.GetCurveFunction(); AddState_Scale(ctrl, state); } } if (offsetInfos != null) { for (int j = 0; j < offsetInfos.Count; ++j) { EffectInfo_Offset info = offsetInfos[j]; EffectState_Offset state = new EffectState_Offset(); state.info = info; state.func = info.GetCurveFunction(); AddState_Offset(ctrl, state); } } if (colorInfos != null) { for (int j = 0; j < colorInfos.Count; ++j) { EffectInfo_Color info = colorInfos[j]; EffectState_Color state = new EffectState_Color(); state.info = info; state.func = info.GetCurveFunction(); AddState_Color(ctrl, state); } } } }
// ------------------------------------------------------------------ // 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_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 ); } }