TweenBase.cs 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class TweenBase : MonoBehaviour
  5. {
  6. public LeanTweenType mLeanTweenType = LeanTweenType.animationCurve;
  7. [HideInInspector]
  8. public GameObject obj;
  9. public Transform StartPoint;
  10. public Transform EndPoint;
  11. public Color StartColor = Color.white;
  12. public Color EndColor = Color.white;
  13. public float duration = 0.5f;
  14. public float delaytime;
  15. public virtual void Init()
  16. {
  17. }
  18. public virtual void StartAction()
  19. {
  20. }
  21. protected virtual void Awake()
  22. {
  23. obj = gameObject;
  24. if(StartPoint == null)
  25. {
  26. StartPoint = transform;
  27. }
  28. if (EndPoint == null)
  29. {
  30. EndPoint = transform;
  31. }
  32. }
  33. void Start()
  34. {
  35. }
  36. // Update is called once per frame
  37. void Update()
  38. {
  39. }
  40. }