改了什么呢,我不知道啊

This commit is contained in:
2025-04-13 14:04:17 +08:00
parent 1a83ba52d4
commit 422ef82187
14 changed files with 122 additions and 123353 deletions

7
.gitignore vendored
View File

@@ -81,3 +81,10 @@ Assets/StreamingAssets/Projects/cOin/Beatmap.json
Assets/StreamingAssets/Projects/cOin/cOin.wav
Assets/StreamingAssets/Projects/cOin/CommandScripts.json
Assets/StreamingAssets/Projects/cOin/ProjectInfo.json
Assets/StreamingAssets/Projects/cOin/SongInfo.json.meta
Assets/StreamingAssets/Projects/cOin/ProjectInfo.json.meta
Assets/StreamingAssets/Projects/cOin/CommandScripts.json.meta
Assets/StreamingAssets/Projects/cOin/cOin.wav.meta
Assets/StreamingAssets/Projects/cOin/Beatmap.json.meta
Assets/StreamingAssets/AutoSave/cOin/AutoSave_0.json
Assets/StreamingAssets/AutoSave/cOin/AutoSave_0.json

View File

@@ -167,8 +167,8 @@ namespace Ichni.Editor
functionInterpreter.SetFunction("lgp", (Action<int, float, float, float, float, float, float>)LGenPathNodes);
functionInterpreter.SetFunction("print", (Action<object>)print);
functionInterpreter.SetFunction("log", (Action<object>)Debug.Log);
functionInterpreter.SetFunction("tp", (Action<float, float, float>)Tp);
functionInterpreter.SetFunction("tp", (Action)Tp);
}
@@ -193,7 +193,22 @@ namespace Ichni.Editor
var f0 = ElementFolder.GenerateElement("Folder", Guid.NewGuid(), new List<string>(), true, null);
}
private void Tp(float x, float y, float z)
{
if (EditorManager.instance.cameraManager.isSceneCameraActive)
{
EditorManager.instance.cameraManager.sceneCamera.sceneCamera.transform.position =
new Vector3(x, y, z);
}
}
private void Tp()
{
if (EditorManager.instance.cameraManager.isSceneCameraActive)
{
EditorManager.instance.cameraManager.sceneCamera.sceneCamera.transform.position =
inspector.connectedGameElement.transform.position;
}
}

View File

@@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
using Michsky.MUIP;
using Sirenix.Utilities;
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;
@@ -68,6 +69,7 @@ namespace Ichni.Editor
d.GetComponent<RectTransform>().anchoredPosition = new Vector2(lineX, 0);
StartCoroutine(WindowAnim.ShowPanelOnScale(d.gameObject));
}
parentTab.SetStatus();
}
@@ -76,6 +78,12 @@ namespace Ichni.Editor
tabButton.onClick.AddListener(SelectGameElement);
expandButton.onClick.AddListener(ExpandOrFold);
deleteButton.onConfirm = () => EditorManager.instance.operationManager.CopyPasteDeleteModule.DeleteElement(connectedGameElement);
SetStatus();
}
public void SetStatus()
{
expandButton.interactable = !connectedGameElement.childElementList.IsNullOrEmpty();
}
}
@@ -111,7 +119,7 @@ namespace Ichni.Editor
EditorManager.instance.operationManager.ClearSelectedElements();
EditorManager.instance.operationManager.AddSelectElement(connectedGameElement);
}
EditorManager.instance.uiManager.inspector.SetInspector(connectedGameElement);
EditorManager.instance.timeline.SetTimeLine(connectedGameElement); // TODO: Error
}
@@ -124,7 +132,7 @@ namespace Ichni.Editor
if (isExpanded)
{
connectedGameElement.childElementList.Sort();//TODO: 后续可以让玩家手动快速排序
for (var index = 0; index < connectedGameElement.childElementList.Count; index++)
{
var childElement = connectedGameElement.childElementList[index];

View File

@@ -62,6 +62,7 @@ namespace Ichni.RhythmGame
trackPathSubmodule?.Refresh();
trackTimeSubmodule?.Refresh();
trackRendererSubmodule?.Refresh();
}
public override void OnDelete()
@@ -118,7 +119,7 @@ namespace Ichni.RhythmGame
trackRendererSubmodule = new TrackRendererSubmodulePathGenerator(this, false, 0);
inspectorMain.SetInspector(this);
});
var trackRenderTubeGeneratorButton = inspector.GenerateButton(this, trackSubmodulesContainer,
"Track Renderer Tube Generator",
() =>
@@ -218,7 +219,7 @@ namespace Ichni.RhythmGame
trackRenderTubeGeneratorButton.button.interactable = false;
trackRendererSurfaceButton.button.interactable = false;
}
var toolsContainerTrack = inspector.GenerateContainer("Track Tools"); //轨道(整体)快捷工具
var quickCopyButton = inspector.GenerateButton(this, toolsContainerTrack, "QuickCopy", () =>
{

View File

@@ -103,6 +103,7 @@ namespace Ichni.RhythmGame
SetPathNode(pathNode);
}
ClosePath();
path.Rebuild(true);
}
}

View File

@@ -20,14 +20,14 @@ namespace Ichni.RhythmGame
public TransformSubmodule transformSubmodule { get; set; }
public static Trail GenerateElement(string name, Guid id, List<string> tags, bool isFirstGenerated,
GameElement parentElement, float visibleTimeLength, bool isAutoOrient, float widthMultiplier,
GameElement parentElement, float visibleTimeLength, bool isAutoOrient, float widthMultiplier,
AnimationCurve widthCurve, Material material = null)
{
Trail trail = Instantiate(EditorManager.instance.basePrefabs.trail, parentElement.transform).GetComponent<Trail>();
trail.trailRenderer = trail.GetComponent<TrailRenderer>();
trail.Initialize(name, id, tags, isFirstGenerated, parentElement);
trail.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrailMaterial : material;
trail.trailRenderer.material = trail.renderMaterial;
trail.visibleTimeLength = visibleTimeLength;
@@ -60,19 +60,19 @@ namespace Ichni.RhythmGame
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Trail");
var visibleTimeLengthInputField = inspector.GenerateInputField(this, container, "Visible Time Length", nameof(visibleTimeLength));
visibleTimeLengthInputField.AddListenerFunction(() => trailRenderer.time = visibleTimeLength);
var isAutoOrientToggle = inspector.GenerateToggle(this, container, "Is Auto Orient", nameof(isAutoOrient));
isAutoOrientToggle.AddListenerFunction(() => trailRenderer.alignment = isAutoOrient ? LineAlignment.View : LineAlignment.TransformZ);
var widthMultiplierInputField = inspector.GenerateInputField(this, container, "Width Multiplier", nameof(widthMultiplier));
widthMultiplierInputField.AddListenerFunction(() => trailRenderer.widthMultiplier = widthMultiplier);
var widthCurveButton = inspector.GenerateButton(this, container, "Width Curve", () =>
{
var widthCurveWindow = inspector.GenerateCompositeParameterWindow(this, "Width Curve", nameof(widthCurve));
@@ -91,12 +91,13 @@ namespace Ichni.RhythmGame
if (x is IHaveTrail t)
{
t.trailRenderer.emitting = emitting;
if(willClear) t.trailRenderer.Clear();
t.trailRenderer.enabled = emitting;
if (willClear) t.trailRenderer.Clear();
}
}
}
}
public interface IHaveTrail
{
TrailRenderer trailRenderer { get; set; }
@@ -118,7 +119,7 @@ namespace Ichni.RhythmGame
}
public Trail_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
float visibleTimeLength, bool isAutoOrient, float widthMultiplier,
float visibleTimeLength, bool isAutoOrient, float widthMultiplier,
AnimationCurve widthCurve, Material renderMaterial) : base(elementName, elementGuid, tags,
attachedElement)
{
@@ -139,7 +140,7 @@ namespace Ichni.RhythmGame
public override GameElement DuplicateBM(GameElement parent)
{
return Trail.GenerateElement(elementName, Guid.NewGuid(), tags,
false, parent, visibleTimeLength,
false, parent, visibleTimeLength,
isAutoOrient, widthMultiplier, widthCurve);
}
}

View File

@@ -11,7 +11,7 @@ namespace Ichni.Editor
public List<GameElement> currentSelectedElements { get; private set; }
public CopyPasteDeleteModule CopyPasteDeleteModule;
public FindingModule FindingModule;
public OperationManager()
@@ -24,25 +24,25 @@ namespace Ichni.Editor
public void AddSelectElement(GameElement gameElement)
{
currentSelectedElements.Add(gameElement);
gameElement.connectedTab.isSelected = true;
if (gameElement.connectedTab.BgImage != null)
{
gameElement.connectedTab.BgImage.color = new Color(0.5f, 0.5f, 0.5f, 0.2f);
}
}
public void RemoveSelectElement(GameElement gameElement)
{
currentSelectedElements.Remove(gameElement);
gameElement.connectedTab.isSelected = false;
if (gameElement.connectedTab.BgImage != null)
{
gameElement.connectedTab.BgImage.color = new Color(0.5f, 0.5f, 0.5f, 0);
}
}
public void ClearSelectedElements()
{
currentSelectedElements.ForEach(gameElement =>
@@ -53,7 +53,7 @@ namespace Ichni.Editor
gameElement.connectedTab.BgImage.color = new Color(0.5f, 0.5f, 0.5f, 0);
}
});
currentSelectedElements.Clear();
}
}
@@ -69,7 +69,7 @@ namespace Ichni.Editor
return element;
}
}
LogWindow.Log("Element not found: " + elementName, Color.red);
return null;
}
@@ -107,6 +107,7 @@ namespace Ichni.Editor
{
gameElement.parentElement.childElementList.Remove(gameElement); //从父物体的子物体列表中移除避免报null
gameElement.parentElement.connectedTab.childTabList.Remove(gameElement.connectedTab);
gameElement.parentElement.connectedTab.SetStatus();
}
gameElement.Delete();

BIN
Document/GE0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
Document/GE1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
Document/GE2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

@@ -0,0 +1,33 @@
# 图形化动画编辑器
## 介绍
在一般的动画类中你应该可以看到除了三个动画表外的第四个按钮GraphicEditor
点击之后会打开当前动画的图形编辑器
在使用图形动画编辑器时需要注意的一点是它和一般的编辑表并不互通,所以请不要同时打开同一个动画的多个编辑窗口,这样很可能会导致吞动画或者报错
###### 编辑器界面↓
<img title="" src="file:///D:/ichniEditor-Source/IchniCreatorStudio/Document/GE0.png" alt="1.png" data-align="left">
## 使用
图形编辑器的时间轴和timeline同步
当你在空的地方按住`ctrl+左键`的时候那个地方会生成对应的事件并吸附在最近的细分时间里如果你在两个事件中间穿插其他事件那么这个事件的endtime会自动连接到下一个事件的starttime
按一个事件时,这个事件会体现在详情编辑中,在详情编辑中你可以改动这个时间的参数,就像在动画表中一样,按左上角的图标可以删除此事件
注意事件表和图形编辑器里的四个输入框<mark>第一列</mark>是时间<mark>第二列</mark>是值,图形编辑器~~懒得做更多提示了~~
图形的曲线预览和曲线幅度有关,幅度越大曲线拉伸越大,超出上下界的会表现为<mark>红色</mark>
<img title="" src="file:///D:/ichniEditor-Source/IchniCreatorStudio/Document/GE1.png" alt="GE1.png" data-align="inline" width="296">**就像这个**
当你按下`Shift+左键`的时候,对应事件会盖上黄色蒙版,此时这些事件会被放进**剪贴板**中,在按下`shift + v`的时候选中的事件会保持原来的**时间顺序放入鼠标所在的对应时间点**
<img src="file:///D:/ichniEditor-Source/IchniCreatorStudio/Document/GE2.png" title="" alt="GE2.png" width="549">**就像这个**
注意:由于该编辑器还处于测试阶段,请以编辑器内操作为主

31
Document/console.md Normal file
View File

@@ -0,0 +1,31 @@
# Console概要
Editor内有console系统用于执行某些方便的操作。
在编辑界面内按 **`** esc下面键可以唤出console输入框在其中输入完成后按enter键即可尝试执行框内的指令。
输入框配有上下文,在输入时按上下箭头可以跳转到上一次的指令。
输入格式按照 **指令 值 值 值** 的格式输入,其中值大多是数字值,如果是字符的话,需要带上双引号。
如果因为某种原因而导致指令执行失败的话会在下面的log window有提醒。
有一些指令是依托于右边的inspector窗口来获取物体的所以在执行操作前注意选中要执行的物体。
## 命令列表
(格式:命令名字 值1 值2 …值x
- **`lgp生成数 x轴开始 x轴结束 y轴开始 y轴结束 z轴开始 z轴结束 `**
loop Generate Pathnode输入全部是数字值用于批量生成pathnode记得选中track。
如:`lgp 10 0 0 0 5 0 100` 在track下生成10个pathnodey值从0到5z值从0到100
- **`tp x y z`**
将场景相机快速移动到某个地方如果不输入xyz那么会移动到所选项的位置。~~和mc里一个样~~
- 在做了
## 其他
在做了

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff