49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni
|
|
{
|
|
public class EditorManager : SerializedMonoBehaviour
|
|
{
|
|
public static EditorManager instance;
|
|
|
|
public SongModule songModule;
|
|
public BasePrefabsCollection basePrefabs;
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
var f0 = ElementFolder.GenerateElement("Folder", null);
|
|
var t0 = Track.GenerateElement("Track", f0, Vector3.left * 5f);
|
|
t0.trackPathSubmodule = new TrackPathSubmodule();
|
|
t0.trackTimeSubmodule = new TrackTimeSubmoduleMovable();
|
|
t0.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient();
|
|
(t0.trackPathSubmodule).NewInitialize(t0, false, Track.TrackSpaceType.Linear, Track.TrackSamplingType.TimeDistributed);
|
|
(t0.trackTimeSubmodule as TrackTimeSubmoduleMovable).NewInitialize(t0, 0, 1, 1, AnimationCurveType.Linear);
|
|
(t0.trackRendererSubmodule as TrackRendererSubmoduleAutoOrient).NewInitialize(t0);
|
|
var p0 = PathNode.GeneratePathNode("PathNode-0", t0, 0, Vector3.zero, Vector3.forward, 1, Color.white);
|
|
var p1 = PathNode.GeneratePathNode("PathNode-1", t0, 1, Vector3.one * 10f, Vector3.left, 0, Color.red);
|
|
|
|
t0.AfterInitialize();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
songModule.songTime += Time.deltaTime;
|
|
}
|
|
}
|
|
|
|
public class SongModule
|
|
{
|
|
public float songTime;
|
|
public float songBeat;
|
|
}
|
|
} |