using System.Collections; using System.Collections.Generic; using System.Linq; using Ichni; using Ichni.Editor; using Ichni.RhythmGame; using TMPro; using UnityEngine; using UnityEngine.UI; public class SubTab : MonoBehaviour { public List connectObj = new(); public Button button; private SongInformation songInformation; private TimePointerModule timePointerModule; private Timeline timeline; public float Time; public void Set(GameElement Objs, float time) { songInformation = EditorManager.instance.songInformation; timePointerModule = EditorManager.instance.uiManager.timeline.timePointerModule; timeline = EditorManager.instance.uiManager.timeline; Time = time; connectObj.Add(Objs); button.GetComponentInChildren().text = connectObj.Count().ToString(); transform.position = new Vector3( Time / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset , transform.position.y, 0 ); } // public void Update() // { // if (Time - timePointerModule.leftSideSongTime < 0) // { // transform.localScale = Vector3.zero; // return; // } // else // { // transform.localScale = Vector3.one; // float devideTime = Time - timePointerModule.leftSideSongTime; // transform.position = new Vector3( // devideTime / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset // , transform.position.y, 0 // ); // } // } public void GetClick() { EditorManager.instance.uiManager.hierarchy.FindTab(connectObj[0]); } }