private void On_AlphaUI(EMEasingCallback p) { if (p.id == motionId) { cachedCanvasGroup.alpha = p.floatValue; } }
private void On_RotateUI(EMEasingCallback p) { if (p.id == motionId) { cachedTransform.localRotation = Quaternion.Euler(p.vector3Value); } }
private void On_ScaleUI(EMEasingCallback p) { if (p.id == motionId) { cachedTransform.localScale = p.vector3Value; } }
private void On_MoveUI(EMEasingCallback p) { if (p.id == motionId) { cachedTransform.anchoredPosition = p.vector3Value; } }
private void SendUpdate(float v1, float v2, float v3, float v4) { EMEasingCallback value = new EMEasingCallback(); value.id = motionId; switch (variableType) { // float case VariableType.Float: if (!string.IsNullOrEmpty(updateCallBack)) { value.floatValue = v1; target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver); } break; // Vector2 case VariableType.V2: if (!string.IsNullOrEmpty(updateCallBack)) { value.vector2Value = new Vector2(v1, v2); target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver); } break; // Vector3 case VariableType.V3: if (!string.IsNullOrEmpty(updateCallBack)) { value.vector3Value = new Vector3(v1, v2, v3); target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver); } break; // Color case VariableType.Color: if (!string.IsNullOrEmpty(updateCallBack)) { value.colorValue = new Color(v1, v2, v3, v4); target.SendMessage(updateCallBack, value, SendMessageOptions.DontRequireReceiver); } break; } }
private void SendUpdate(float v1, float v2, float v3,float v4){ EMEasingCallback value = new EMEasingCallback(); value.id = motionId; switch ( variableType){ // float case VariableType.Float: if (!string.IsNullOrEmpty(updateCallBack)){ value.floatValue = v1; target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver); } break; // Vector2 case VariableType.V2: if (!string.IsNullOrEmpty(updateCallBack)){ value.vector2Value = new Vector2(v1,v2); target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver); } break; // Vector3 case VariableType.V3: if (!string.IsNullOrEmpty(updateCallBack)){ value.vector3Value = new Vector3(v1,v2,v3); target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver); } break; // Color case VariableType.Color: if (!string.IsNullOrEmpty(updateCallBack)){ value.colorValue = new Color(v1,v2,v3,v4); target.SendMessage( updateCallBack,value,SendMessageOptions.DontRequireReceiver); } break; } }
private void On_AlphaUI(EMEasingCallback p){ if (p.id == motionId){ cachedCanvasGroup.alpha = p.floatValue; } }
private void On_ScaleUI(EMEasingCallback p){ if (p.id == motionId){ cachedTransform.localScale = p.vector3Value; } }
private void On_RotateUI(EMEasingCallback p){ if (p.id == motionId){ cachedTransform.localRotation = Quaternion.Euler(p.vector3Value); } }
private void On_MoveUI( EMEasingCallback p){ if (p.id == motionId){ cachedTransform.anchoredPosition = p.vector3Value; } }