TweenUtil.cpp 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright 2021-2022, DearBing. All Rights Reserved.
  2. #include "TweenUtil.h"
  3. UTweenActor* UTweenUtil::DOLocalMoveSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FVector End /*= FVector(100, 100, 100)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  4. {
  5. return UTweenActor::DOLocalMove(DurTime, Actor, End, easeType, IsLoop);
  6. }
  7. UTweenActor* UTweenUtil::DOLocalRotationSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FRotator End /*= FRotator(0, 90, 0)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  8. {
  9. return UTweenActor::DOLocalRotation(DurTime, Actor, End, easeType, IsLoop);
  10. }
  11. UTweenActor* UTweenUtil::DOLocalScaleSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FVector End /*= FVector(2, 2, 2)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  12. {
  13. return UTweenActor::DOLocalScale(DurTime, Actor, End, easeType, IsLoop);
  14. }
  15. UTweenActor* UTweenUtil::DOMoveSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FVector End /*= FVector(100, 100, 100)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  16. {
  17. return UTweenActor::DOMove(DurTime, Actor, End, easeType, IsLoop);
  18. }
  19. UTweenActor* UTweenUtil::DORotationSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FRotator End /*= FRotator(0, 90, 0)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  20. {
  21. return UTweenActor::DORotation(DurTime, Actor, End, easeType, IsLoop);
  22. }
  23. UTweenActor* UTweenUtil::DOScaleSync(float DurTime /*= 1.f*/, AActor* Actor /*= nullptr*/, FVector End /*= FVector(2, 2, 2)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  24. {
  25. return UTweenActor::DOScale(DurTime, Actor, End, easeType, IsLoop);
  26. }
  27. UTweenColor* UTweenUtil::DOColorSync(float DurTime /*= 1*/, FLinearColor Start /*= FLinearColor(0, 0, 0, 1)*/, FLinearColor End /*= FLinearColor(1, 1, 1, 1)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  28. {
  29. return UTweenColor::DOColor(DurTime, Start, End, easeType, IsLoop);
  30. }
  31. UTweenFloat* UTweenUtil::DOFloatSync(float DurTime /*= 1*/, float Start /*= 0*/, float End /*= 1*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  32. {
  33. return UTweenFloat::DOFloat(DurTime, Start, End, easeType, IsLoop);
  34. }
  35. UTweenPath* UTweenUtil::DOPathSync(TArray<FVector> Path, float DurTime /*= 1*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  36. {
  37. return UTweenPath::DOPath(Path, DurTime, easeType, IsLoop);
  38. }
  39. UTweenVector2D* UTweenUtil::DOVector2DSync(float DurTime /*= 1*/, FVector2D Start /*= FVector2D(0, 0)*/, FVector2D End /*= FVector2D(100, 100)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  40. {
  41. return UTweenVector2D::DOVector2D(DurTime, Start, End, easeType, IsLoop);
  42. }
  43. UTweenVector3D* UTweenUtil::DOVector3DSync(float DurTime /*= 1.f*/, FVector Start /*= FVector(0, 0, 0)*/, FVector End /*= FVector(100, 100, 100)*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  44. {
  45. return UTweenVector3D::DOVector3D(DurTime, Start, End, easeType, IsLoop);
  46. }
  47. UTweenVector4D* UTweenUtil::DOVector4DSync(FVector4 Start, FVector4 End, float DurTime /*= 1.f*/, EaseType easeType /*= EaseType::Linear*/, bool IsLoop /*= false*/)
  48. {
  49. return UTweenVector4D::DOVector4D( Start, End, DurTime, easeType, IsLoop);
  50. }