sth&文档

This commit is contained in:
2025-04-19 23:21:27 +08:00
parent a0f7ec7e15
commit f16ecbfbcf
12 changed files with 1889 additions and 62 deletions

View File

@@ -33,8 +33,8 @@ namespace Ichni.RhythmGame
{
public override void SaveBM()
{
matchedBM = parentElement != null ?
new ElementFolder_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM) :
matchedBM = parentElement != null ?
new ElementFolder_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM) :
new ElementFolder_BM(elementName, elementGuid, tags, null);
}
@@ -43,7 +43,7 @@ namespace Ichni.RhythmGame
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
base.SetUpInspector();
var container = inspector.GenerateContainer("Generate");
var generateBase = container.GenerateSubcontainer(3);
var folderButton = inspector.GenerateButton(this, generateBase, "Folder",
() => ElementFolder.GenerateElement("New Folder", Guid.NewGuid(), new List<string>(), true, this));
@@ -55,7 +55,7 @@ namespace Ichni.RhythmGame
var crossTrackPoint = inspector.GenerateButton(this, generateBase, "Cross Track Point",
() => CrossTrackPoint.GenerateElement("New Cross Track Point", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleInt(), new FlexibleFloat()));
var generateNote = container.GenerateSubcontainer(3);
var tapButton = inspector.GenerateButton(this, generateNote, "Tap",
() => Tap.GenerateElement("New Tap", Guid.NewGuid(), new List<string>(), true, this, 0f));
@@ -66,7 +66,7 @@ namespace Ichni.RhythmGame
var flickButton = inspector.GenerateButton(this, generateNote, "Flick",
() => Flick.GenerateElement("New Flick", Guid.NewGuid(), new List<string>(), true, this, 0f,
new List<Vector2>()));
var generateEnvironment = container.GenerateSubcontainer(3);
var environmentObjectButton = inspector.GenerateButton(this, generateEnvironment, "Environment Object",
() => TemporaryObject.GenerateElement("New Environment Object", Guid.NewGuid(), new List<string>(),
@@ -74,7 +74,7 @@ namespace Ichni.RhythmGame
var timeEffectsCollectionButton = inspector.GenerateButton(this, generateEnvironment, "Time Effects Collection",
() => TimeEffectsCollection.GenerateElement("New Time Effects Collection", Guid.NewGuid(),
new List<string>(), true, this, 0));
var generateAnimation = container.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
@@ -82,6 +82,11 @@ namespace Ichni.RhythmGame
var swirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var scaleButton = inspector.GenerateButton(this, generateAnimation, "Scale", () =>
{
Swirl.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
}
}
@@ -94,15 +99,15 @@ namespace Ichni.RhythmGame
}
public ElementFolder_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
public ElementFolder_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
: base(elementName, elementGuid, tags, attachedElement)
{
}
public override void ExecuteBM()
{
matchedElement = ElementFolder.GenerateElement(elementName, elementGuid, tags,false, GetElement(attachedElementGuid));
matchedElement = ElementFolder.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid));
}
public override GameElement DuplicateBM(GameElement parent)

View File

@@ -48,7 +48,7 @@ namespace Ichni.RhythmGame
public override void AfterInitialize()
{
base.AfterInitialize();
if (trackPathSubmodule != null && trackPathSubmodule.pathNodeList.Count > 3)
{
trackPathSubmodule.ClosePath();
@@ -173,7 +173,11 @@ namespace Ichni.RhythmGame
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //旋转
var scaleButton = inspector.GenerateButton(this, animationSubcontainer, "Scale", () =>
{
Swirl.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
if (trackPathSubmodule != null)
{
trackPathButton.button.interactable = false;

View File

@@ -50,7 +50,7 @@ namespace Ichni.RhythmGame
{
private void SetUpSplineComputer(Track.TrackSpaceType trackSpaceType, Track.TrackSamplingType trackSamplingType)
{
path.type = (Spline.Type)(int)trackSpaceType;
path.type = (Spline.Type)trackSpaceType;
path.sampleMode = (SplineComputer.SampleMode)(int)trackSamplingType;
path.space = SplineComputer.Space.Local;
}
@@ -69,8 +69,10 @@ namespace Ichni.RhythmGame
public void SetTrackSpaceType(int spaceType)
{
trackSpaceType = (Track.TrackSpaceType)spaceType;
path.type = (Spline.Type)spaceType;
int SpaceType = spaceType;
if (spaceType == 2) SpaceType++;
trackSpaceType = (Track.TrackSpaceType)SpaceType;
path.type = (Spline.Type)SpaceType;
}
public void SetPathNode(PathNode point)
@@ -86,17 +88,13 @@ namespace Ichni.RhythmGame
public override void Refresh()
{
if (trackSpaceType == Track.TrackSpaceType.Linear)
{
SetTrackSpaceType((int)Spline.Type.Linear);
path.type = Spline.Type.Linear;
}
else
{
SetTrackSpaceType((int)trackSpaceType);
SetUpSplineComputer(trackSpaceType, trackSamplingType);
}
SetTrackSpaceType((int)trackSpaceType);
SetUpSplineComputer(trackSpaceType, trackSamplingType);
foreach (var pathNode in pathNodeList)
{
@@ -117,7 +115,7 @@ namespace Ichni.RhythmGame
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Track Path");
var trackPathSubmoduleSettings = container.GenerateSubcontainer(3);
var trackSpaceDropdown =

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame