/// <summary> /// Create start data for platform like path, start position, type path move... /// </summary> /// <param name="obj"></param> public void Init(PlatformObj obj) { Trans.position = obj.Position; if (!_tweenPath) { _tweenPath = GetComponent <DOTweenPath>(); } if (obj.Path != null && obj.Path.Count > 0) { Trans.DOPath(obj.Path.ToArray(), 5, PathType.Linear, PathMode.TopDown2D) .SetSpeedBased().SetLoops(-1, obj.LoopType).SetUpdate(UpdateType.Fixed) .SetEase(obj.EaseType); } }