65 lines
2.8 KiB
C#
65 lines
2.8 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 NoteBase.NoteJudgeType currentJudgeType;
|
|
public BasePrefabsCollection basePrefabs;
|
|
|
|
public List<BaseElement> elementList = new List<BaseElement>();
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
//currentJudgeType = NoteBase.NoteJudgeType.Perfect;
|
|
|
|
var f0 = ElementFolder.GenerateElement("Folder", Guid.NewGuid(), new List<string>(), 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", Guid.NewGuid(), new List<string>(), 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.OutQuad);
|
|
var pp0 = TrackPercentPoint.GenerateElement("TrackPercentPoint-0", Guid.NewGuid(), new List<string>(), t0,
|
|
new FlexibleFloat(new List<AnimatedFloat>() { new(0, 2, 0, 1, AnimationCurveType.OutQuad) }));
|
|
var tr0 = Trail.GenerateElement("Trail-0", Guid.NewGuid(), new List<string>(), pp0, 5);
|
|
// t0.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(t0);
|
|
var p0 = PathNode.GenerateElement("PathNode-0", Guid.NewGuid(), new List<string>(), t0,
|
|
new Vector3(-5, 5, 10), Vector3.forward, 1, Color.white);
|
|
var p1 = PathNode.GenerateElement("PathNode-1", Guid.NewGuid(), new List<string>(), t0,
|
|
new Vector3(5, -5, 10), Vector3.forward, 0, Color.red);
|
|
var n0 = Tap.GenerateElement("Note-0", Guid.NewGuid(), new List<string>(), 1f, t0);
|
|
var n0v = BasicNoteVisual.GenerateElement("Note-0-V", Guid.NewGuid(), new List<string>(), "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;
|
|
}
|
|
} |