using System; using SHADE; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SHADE_Scripting.UI { public class ScrollingCredits: Script { public float endY = 4000.0f; public float duration = 30.0f; [NonSerialized] TweenThread thread; protected override void awake() { base.awake(); } protected override void start() { base.start(); Transform transform = GetComponent(); if(transform != null) { thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.LINEAR); thread.SetResetOnInactive(GameObject); } } protected override void update() { base.update(); Transform transform = GetComponent(); if(thread != null && transform != null) { transform.LocalPosition = new Vector3( transform.LocalPosition.x ,thread.GetValue() , transform.LocalPosition.z); } } } }