55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame;
|
|
using Ichni.RhythmGame.ThemeBundles.Basic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni
|
|
{
|
|
public class EditorManager : SerializedMonoBehaviour
|
|
{
|
|
public static EditorManager instance;
|
|
|
|
public SongModule songModule;
|
|
public BasePrefabsCollection basePrefabs;
|
|
|
|
public List<BaseElement> elementList = new List<BaseElement>();
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
var f0 = ElementFolder.GenerateElement("Folder", null);
|
|
var dis0 = Displacement.GenerateElement("Displacement-0", f0,
|
|
new FlexibleFloat(),
|
|
new FlexibleFloat(new List<AnimatedFloat>(){new (0,2,0,2, AnimationCurveType.Linear)}),
|
|
new FlexibleFloat());
|
|
var t0 = Track.GenerateElement("Track", f0, Vector3.left * 5f);
|
|
t0.trackPathSubmodule = new TrackPathSubmodule(t0, Track.TrackSpaceType.Linear, Track.TrackSamplingType.TimeDistributed, false);
|
|
t0.trackTimeSubmodule = new TrackTimeSubmoduleMovable(t0, 0, 2, 1, AnimationCurveType.Linear);
|
|
t0.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(t0);
|
|
var p0 = PathNode.GenerateElement("PathNode-0", t0, 0, new Vector3(-5,5,10), Vector3.forward, 1, Color.white);
|
|
var p1 = PathNode.GenerateElement("PathNode-1", t0, 1, new Vector3(5,-5,10), Vector3.forward, 0, Color.red);
|
|
var n0 = Tap.GenerateElement("Note-0", 1f, t0);
|
|
var n0v = BasicNoteVisual.GenerateElement("Note-0-V", "basic", "BasicNoteTap3D", Vector3.zero, Vector3.zero, Vector3.one, n0);
|
|
|
|
elementList.ForEach(e => e.AfterInitialize());
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
songModule.songTime += Time.deltaTime;
|
|
}
|
|
}
|
|
|
|
public class SongModule
|
|
{
|
|
public float songTime;
|
|
public float songBeat;
|
|
}
|
|
} |