/* This file is part of the "Simple Waypoint System" project by Rebound Games. * You are only allowed to use these resources if you've bought them from the Unity Asset Store. * You shall not license, sublicense, sell, resell, transfer, assign, distribute or * otherwise make available to any third party the Service or the Content. */ using UnityEngine; using System.Collections; using DG.Tweening; /// /// Simple helper script to rotate an object over a period of time. /// public class RotationHelper : MonoBehaviour { /// /// Total rotation duration. /// public float duration; /// /// Rotation value for rotating the object. /// public int rotation; void Start() { transform.DORotate(new Vector3(rotation, 0, 0), duration, RotateMode.LocalAxisAdd) .SetEase(Ease.Linear) .SetLoops(-1); } }