Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Breather : MonoBehaviour
- {
- private void Awake()
- {
- Color color = Color.white;
- color.a = 0;
- GetComponent<Image>().DOColor(color, 1).SetLoops(-1, LoopType.Yoyo).Play();
- }
- }
- public class Rotator : MonoBehaviour
- {
- Tween rotator;
- private void Awake()
- {
- rotator = transform.DORotate(new Vector3(0, 180, 0), 2).SetLoops(-1, LoopType.Restart);
- }
- private void OnMouseEnter()
- {
- rotator.Play();
- }
- }
- public class Scaler : MonoBehaviour
- {
- private Tween scaleTween;
- private void Awake()
- {
- scaleTween = transform.DOScale(1.5f, 1).SetLoops(-1, LoopType.Yoyo);
- }
- public void Scale()
- {
- scaleTween.Play();
- }
- }
- public class Mover : MonoBehaviour
- {
- public Vector3 offset;
- public Vector3 destination;
- public Transform waypoint;
- private void Awake()
- {
- Vector3 movementDestination = transform.position + offset;
- transform.DOMove(movementDestination, 3).Play().onComplete += OnMoveCompleted;
- }
- private void OnMoveCompleted()
- {
- Debug.Log("Completed Movement!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement