特效范例
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -25,7 +25,8 @@ MonoBehaviour:
|
|||||||
type: 3}
|
type: 3}
|
||||||
elementFolder: {fileID: 5524510864018492689, guid: 5a9a2433580c2451b8200185cb45f867,
|
elementFolder: {fileID: 5524510864018492689, guid: 5a9a2433580c2451b8200185cb45f867,
|
||||||
type: 3}
|
type: 3}
|
||||||
gameCamera: {fileID: 0}
|
gameCamera: {fileID: 10333948111691042, guid: 5e49956564dfa491cb6aa8fe57c1b2d6,
|
||||||
|
type: 3}
|
||||||
track: {fileID: 8828428123186639208, guid: 20234a708961745eeafa459c79524348, type: 3}
|
track: {fileID: 8828428123186639208, guid: 20234a708961745eeafa459c79524348, type: 3}
|
||||||
pathNode: {fileID: 7248180033186031075, guid: 609cdf441cd2f4c78a430e7df78a40f4,
|
pathNode: {fileID: 7248180033186031075, guid: 609cdf441cd2f4c78a430e7df78a40f4,
|
||||||
type: 3}
|
type: 3}
|
||||||
@@ -35,7 +36,8 @@ MonoBehaviour:
|
|||||||
defaultTrailMaterial: {fileID: 2100000, guid: 8af6dd7f0725540388b84a4697118bb9,
|
defaultTrailMaterial: {fileID: 2100000, guid: 8af6dd7f0725540388b84a4697118bb9,
|
||||||
type: 2}
|
type: 2}
|
||||||
tapNote: {fileID: 8182686472733940155, guid: 9b2da5f6faa9c4d2abe557fc8f79f806, type: 3}
|
tapNote: {fileID: 8182686472733940155, guid: 9b2da5f6faa9c4d2abe557fc8f79f806, type: 3}
|
||||||
stayNote: {fileID: 0}
|
stayNote: {fileID: 8182686472733940155, guid: 42665ed72d40a4b349f0cb89f825437e,
|
||||||
|
type: 3}
|
||||||
holdNote: {fileID: 0}
|
holdNote: {fileID: 0}
|
||||||
flickNote: {fileID: 0}
|
flickNote: {fileID: 0}
|
||||||
tapNoteSound: {fileID: 0}
|
tapNoteSound: {fileID: 0}
|
||||||
|
|||||||
@@ -57,73 +57,10 @@ MonoBehaviour:
|
|||||||
- Name: elementGuid
|
- Name: elementGuid
|
||||||
Entry: 2
|
Entry: 2
|
||||||
Data: 702c793776b444d3ad481072561faaec
|
Data: 702c793776b444d3ad481072561faaec
|
||||||
- Name: timeDurationSubmodule
|
- Name: submoduleList
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 0|Ichni.RhythmGame.TimeDurationSubmodule, Assembly-CSharp
|
Data: 0|System.Collections.Generic.List`1[[Ichni.RhythmGame.SubmoduleBase,
|
||||||
- Name: isOverridingDuration
|
Assembly-CSharp]], mscorlib
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: startTime
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name: endTime
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: transformSubmodule
|
|
||||||
Entry: 7
|
|
||||||
Data: 1|Ichni.RhythmGame.TransformSubmodule, Assembly-CSharp
|
|
||||||
- Name: originalPosition
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: originalEulerAngles
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: originalScale
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: positionOffset
|
|
||||||
Entry: 7
|
|
||||||
Data: 2|System.Collections.Generic.List`1[[UnityEngine.Vector3, UnityEngine.CoreModule]],
|
|
||||||
mscorlib
|
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -133,107 +70,10 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
- Name: eulerAnglesOffset
|
|
||||||
Entry: 7
|
|
||||||
Data: 3|System.Collections.Generic.List`1[[UnityEngine.Vector3, UnityEngine.CoreModule]],
|
|
||||||
mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: scaleOffset
|
|
||||||
Entry: 7
|
|
||||||
Data: 4|System.Collections.Generic.List`1[[UnityEngine.Vector3, UnityEngine.CoreModule]],
|
|
||||||
mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: currentPosition
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: currentEulerAngles
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: currentScale
|
|
||||||
Entry: 7
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 4
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: positionDirtyMark
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: eulerAnglesDirtyMark
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: scaleDirtyMark
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: eulerAnglesOffsetLock
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: OnPositionChanged
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name: OnEulerAnglesChanged
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name: OnScaleChanged
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: colorSubmodule
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
elementName:
|
elementName:
|
||||||
serialNumber: 0
|
tags: []
|
||||||
parentElement: {fileID: 0}
|
parentElement: {fileID: 0}
|
||||||
|
connectedTab: {fileID: 0}
|
||||||
childElementList: []
|
childElementList: []
|
||||||
camera: {fileID: 1378655914364111770}
|
camera: {fileID: 1378655914364111770}
|
||||||
rotationPoint: {fileID: 373065448631755357}
|
rotationPoint: {fileID: 373065448631755357}
|
||||||
@@ -316,7 +156,6 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 4681825519897212372}
|
- component: {fileID: 4681825519897212372}
|
||||||
- component: {fileID: 1378655914364111770}
|
- component: {fileID: 1378655914364111770}
|
||||||
- component: {fileID: 7108567356200093580}
|
|
||||||
- component: {fileID: 2072332804138453357}
|
- component: {fileID: 2072332804138453357}
|
||||||
- component: {fileID: 8132557174609694425}
|
- component: {fileID: 8132557174609694425}
|
||||||
- component: {fileID: 854107432770048664}
|
- component: {fileID: 854107432770048664}
|
||||||
@@ -394,14 +233,6 @@ Camera:
|
|||||||
m_OcclusionCulling: 1
|
m_OcclusionCulling: 1
|
||||||
m_StereoConvergence: 10
|
m_StereoConvergence: 10
|
||||||
m_StereoSeparation: 0.022
|
m_StereoSeparation: 0.022
|
||||||
--- !u!81 &7108567356200093580
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8526474044217039555}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!114 &2072332804138453357
|
--- !u!114 &2072332804138453357
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -417,7 +248,7 @@ MonoBehaviour:
|
|||||||
m_RenderShadows: 1
|
m_RenderShadows: 1
|
||||||
m_RequiresDepthTextureOption: 2
|
m_RequiresDepthTextureOption: 2
|
||||||
m_RequiresOpaqueTextureOption: 2
|
m_RequiresOpaqueTextureOption: 2
|
||||||
m_CameraType: 0
|
m_CameraType: 1
|
||||||
m_Cameras: []
|
m_Cameras: []
|
||||||
m_RendererIndex: -1
|
m_RendererIndex: -1
|
||||||
m_VolumeLayerMask:
|
m_VolumeLayerMask:
|
||||||
|
|||||||
83
Assets/Prefabs/GameElements/Stay.prefab
Normal file
83
Assets/Prefabs/GameElements/Stay.prefab
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &8182686472733940155
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3154956539503596607}
|
||||||
|
- component: {fileID: -8416968328479360239}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Stay
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3154956539503596607
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8182686472733940155}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &-8416968328479360239
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8182686472733940155}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1ec53002feb264ae7b2bb0386ac37ad2, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
serializationData:
|
||||||
|
SerializedFormat: 2
|
||||||
|
SerializedBytes:
|
||||||
|
ReferencedUnityObjects: []
|
||||||
|
SerializedBytesString:
|
||||||
|
Prefab: {fileID: 0}
|
||||||
|
PrefabModificationsReferencedUnityObjects: []
|
||||||
|
PrefabModifications: []
|
||||||
|
SerializationNodes:
|
||||||
|
- Name: elementGuid
|
||||||
|
Entry: 2
|
||||||
|
Data: 00000000000000000000000000000000
|
||||||
|
- Name: submoduleList
|
||||||
|
Entry: 7
|
||||||
|
Data: 0|System.Collections.Generic.List`1[[Ichni.RhythmGame.SubmoduleBase,
|
||||||
|
Assembly-CSharp]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
elementName:
|
||||||
|
tags: []
|
||||||
|
parentElement: {fileID: 0}
|
||||||
|
connectedTab: {fileID: 0}
|
||||||
|
childElementList: []
|
||||||
|
exactJudgeTime: 0
|
||||||
|
isOnTrack: 0
|
||||||
|
track: {fileID: 0}
|
||||||
|
trackPositioner: {fileID: 0}
|
||||||
|
noteVisual: {fileID: 0}
|
||||||
|
noteScreenPosition: {x: 0, y: 0}
|
||||||
|
isJudged: 0
|
||||||
7
Assets/Prefabs/GameElements/Stay.prefab.meta
Normal file
7
Assets/Prefabs/GameElements/Stay.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 42665ed72d40a4b349f0cb89f825437e
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@ using Ichni.RhythmGame;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
using UnityEngine.UIElements.Experimental;
|
using UnityEngine.UIElements.Experimental;
|
||||||
|
|
||||||
@@ -34,5 +35,12 @@ namespace Ichni.Editor
|
|||||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newValue);
|
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newValue);
|
||||||
connectedBaseElement.Refresh();
|
connectedBaseElement.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddListenerFunction(UnityAction action)
|
||||||
|
{
|
||||||
|
inputFieldX.onEndEdit.AddListener(_ => action());
|
||||||
|
inputFieldY.onEndEdit.AddListener(_ => action());
|
||||||
|
inputFieldZ.onEndEdit.AddListener(_ => action());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,5 +112,74 @@ namespace Ichni.Editor
|
|||||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newFlexibleFloat);
|
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newFlexibleFloat);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetAsFlexibleInt()
|
||||||
|
{
|
||||||
|
void GenerateUnit(AnimatedInt content)
|
||||||
|
{
|
||||||
|
DynamicUIAnimatedIntUnit unit = Instantiate(unitPrefab, windowRect).GetComponent<DynamicUIAnimatedIntUnit>();
|
||||||
|
unitList.Add(unit);
|
||||||
|
unit.SetUnit(this, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
unitPrefab = EditorManager.instance.basePrefabs.animatedIntUnit;
|
||||||
|
|
||||||
|
FlexibleInt flexibleInt = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as FlexibleInt;
|
||||||
|
foreach (AnimatedInt animatedInt in flexibleInt.animations)
|
||||||
|
{
|
||||||
|
GenerateUnit(animatedInt);
|
||||||
|
}
|
||||||
|
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||||
|
|
||||||
|
addNewUnitButton.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
GenerateUnit(new AnimatedInt(0, 0));
|
||||||
|
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||||
|
});
|
||||||
|
|
||||||
|
ApplyParameters = () =>
|
||||||
|
{
|
||||||
|
FlexibleInt newFlexibleInt = new FlexibleInt();
|
||||||
|
foreach (var unit in unitList)
|
||||||
|
{
|
||||||
|
newFlexibleInt.animations.Add((unit as DynamicUIAnimatedIntUnit).GetValue());
|
||||||
|
}
|
||||||
|
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newFlexibleInt);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAsFlexibleBool()
|
||||||
|
{
|
||||||
|
void GenerateUnit(AnimatedBool content)
|
||||||
|
{
|
||||||
|
DynamicUIAnimatedBoolUnit unit = Instantiate(unitPrefab, windowRect).GetComponent<DynamicUIAnimatedBoolUnit>();
|
||||||
|
unitList.Add(unit);
|
||||||
|
unit.SetUnit(this, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
unitPrefab = EditorManager.instance.basePrefabs.animatedBoolUnit;
|
||||||
|
FlexibleBool flexibleBool = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as FlexibleBool;
|
||||||
|
foreach (AnimatedBool animatedBool in flexibleBool.animations)
|
||||||
|
{
|
||||||
|
GenerateUnit(animatedBool);
|
||||||
|
}
|
||||||
|
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||||
|
|
||||||
|
addNewUnitButton.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
GenerateUnit(new AnimatedBool(0, false));
|
||||||
|
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||||
|
});
|
||||||
|
|
||||||
|
ApplyParameters = () =>
|
||||||
|
{
|
||||||
|
FlexibleBool newFlexibleBool = new FlexibleBool();
|
||||||
|
foreach (var unit in unitList)
|
||||||
|
{
|
||||||
|
newFlexibleBool.animations.Add((unit as DynamicUIAnimatedBoolUnit).GetValue());
|
||||||
|
}
|
||||||
|
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newFlexibleBool);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,13 @@ namespace Ichni.Editor
|
|||||||
{
|
{
|
||||||
logTexts = new Queue<LogText>();
|
logTexts = new Queue<LogText>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Log(string text, Color color = default)
|
||||||
|
{
|
||||||
|
EditorManager.instance.uiManager.mainPage.logWindow.AddLog(text, color);
|
||||||
|
}
|
||||||
|
|
||||||
public void AddLog(string text, Color color = default)
|
private void AddLog(string text, Color color = default)
|
||||||
{
|
{
|
||||||
CheckLogTextCapacity();
|
CheckLogTextCapacity();
|
||||||
LogText logText = LeanPool.Spawn(logTextPrefab, textRect).GetComponent<LogText>();
|
LogText logText = LeanPool.Spawn(logTextPrefab, textRect).GetComponent<LogText>();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Ichni.Editor;
|
|||||||
using Ichni.RhythmGame.Beatmap;
|
using Ichni.RhythmGame.Beatmap;
|
||||||
using Sirenix.Utilities;
|
using Sirenix.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
namespace Ichni.RhythmGame
|
namespace Ichni.RhythmGame
|
||||||
{
|
{
|
||||||
@@ -83,6 +84,12 @@ namespace Ichni.RhythmGame
|
|||||||
public interface IHaveEffectSubmodule
|
public interface IHaveEffectSubmodule
|
||||||
{
|
{
|
||||||
public EffectSubmodule effectSubmodule { get; set; }
|
public EffectSubmodule effectSubmodule { get; set; }
|
||||||
|
|
||||||
|
public static Dictionary<string, EffectBase> EffectCollection { get; } =
|
||||||
|
new Dictionary<string, EffectBase>()
|
||||||
|
{
|
||||||
|
{"BloomShake", new BloomShake(1, 2)}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Beatmap
|
namespace Beatmap
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace Ichni.RhythmGame
|
|||||||
isOverridingDuration = false;
|
isOverridingDuration = false;
|
||||||
startTime = -32767;//TODO: 换为-delay
|
startTime = -32767;//TODO: 换为-delay
|
||||||
endTime = 32767;//TODO: 换为songLength
|
endTime = 32767;//TODO: 换为songLength
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeDurationSubmodule(GameElement attachedGameElement, bool isOverridingDuration, float startTime, float endTime) : base(attachedGameElement)
|
public TimeDurationSubmodule(GameElement attachedGameElement, bool isOverridingDuration, float startTime, float endTime) : base(attachedGameElement)
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ namespace Ichni.RhythmGame
|
|||||||
public bool scaleDirtyMark;
|
public bool scaleDirtyMark;
|
||||||
|
|
||||||
public bool eulerAnglesOffsetLock;
|
public bool eulerAnglesOffsetLock;
|
||||||
|
|
||||||
|
|
||||||
public TransformSubmodule(GameElement attachedGameElement) : base(attachedGameElement)
|
public TransformSubmodule(GameElement attachedGameElement) : base(attachedGameElement)
|
||||||
{
|
{
|
||||||
this.originalPosition = Vector3.zero;
|
this.originalPosition = Vector3.zero;
|
||||||
@@ -51,7 +50,8 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
eulerAnglesOffsetLock = false;
|
eulerAnglesOffsetLock = false;
|
||||||
|
|
||||||
// (attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
(attachedGameElement as IHaveTransformSubmodule).transformSubmodule = this;
|
||||||
|
(attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransformSubmodule(GameElement attachedGameElement,
|
public TransformSubmodule(GameElement attachedGameElement,
|
||||||
@@ -75,7 +75,8 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
eulerAnglesOffsetLock = false;
|
eulerAnglesOffsetLock = false;
|
||||||
|
|
||||||
// (attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
(attachedGameElement as IHaveTransformSubmodule).transformSubmodule = this;
|
||||||
|
(attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SaveBM()
|
public override void SaveBM()
|
||||||
@@ -98,6 +99,10 @@ namespace Ichni.RhythmGame
|
|||||||
inspector.GenerateParameterText(this, container, "Current Rotation", nameof(currentEulerAngles), true);
|
inspector.GenerateParameterText(this, container, "Current Rotation", nameof(currentEulerAngles), true);
|
||||||
var currentScaleText =
|
var currentScaleText =
|
||||||
inspector.GenerateParameterText(this, container, "Current Scale", nameof(currentScale), true);
|
inspector.GenerateParameterText(this, container, "Current Scale", nameof(currentScale), true);
|
||||||
|
|
||||||
|
originalPosInputField.AddListenerFunction(Refresh);
|
||||||
|
originalRotInputField.AddListenerFunction(Refresh);
|
||||||
|
originalScaleInputField.AddListenerFunction(Refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Refresh()
|
public override void Refresh()
|
||||||
@@ -119,7 +124,7 @@ namespace Ichni.RhythmGame
|
|||||||
public void SetTransformObserver()
|
public void SetTransformObserver()
|
||||||
{
|
{
|
||||||
GameElement attachedGameElement = transformSubmodule.attachedGameElement;
|
GameElement attachedGameElement = transformSubmodule.attachedGameElement;
|
||||||
|
|
||||||
Observable.EveryUpdate().Subscribe(_ =>
|
Observable.EveryUpdate().Subscribe(_ =>
|
||||||
{
|
{
|
||||||
if (transformSubmodule == null)
|
if (transformSubmodule == null)
|
||||||
@@ -197,6 +202,7 @@ namespace Ichni.RhythmGame
|
|||||||
public override void ExecuteBM()
|
public override void ExecuteBM()
|
||||||
{
|
{
|
||||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||||
|
Debug.Log(attachedElementGuid);
|
||||||
(attachedElement as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
|
(attachedElement as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
|
||||||
attachedElement.submoduleList.Add((attachedElement as IHaveTransformSubmodule).transformSubmodule);
|
attachedElement.submoduleList.Add((attachedElement as IHaveTransformSubmodule).transformSubmodule);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ namespace Ichni.RhythmGame
|
|||||||
var swirlButton = inspector.GenerateButton(this, container, "Swirl",
|
var swirlButton = inspector.GenerateButton(this, container, "Swirl",
|
||||||
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
|
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
|
||||||
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
|
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
|
||||||
|
var timeEffectsCollectionButton = inspector.GenerateButton(this, container, "Time Effects Collection",
|
||||||
|
() => TimeEffectsCollection.GenerateElement("New Time Effects Collection", Guid.NewGuid(),
|
||||||
|
new List<string>(), true, this, 0f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Dreamteck.Splines;
|
using Dreamteck.Splines;
|
||||||
|
using Ichni.Editor;
|
||||||
using Ichni.RhythmGame.Beatmap;
|
using Ichni.RhythmGame.Beatmap;
|
||||||
using Lean.Pool;
|
using Lean.Pool;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering.Universal;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
namespace Ichni.RhythmGame
|
namespace Ichni.RhythmGame
|
||||||
@@ -23,15 +25,28 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public TransformSubmodule transformSubmodule { get; set; }
|
public TransformSubmodule transformSubmodule { get; set; }
|
||||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||||
|
private static CameraManager cameraManager => EditorManager.instance.cameraManager;
|
||||||
|
|
||||||
public static GameCamera GenerateElement(string elementName, Guid id,
|
public static GameCamera GenerateElement(string elementName, Guid id,
|
||||||
List<string> tags, bool isFirstGenerated, GameElement parentElement,
|
List<string> tags, bool isFirstGenerated, GameElement parentElement,
|
||||||
CameraViewType cameraViewType, float perspectiveAngle, float orthographicSize)
|
CameraViewType cameraViewType, float perspectiveAngle, float orthographicSize)
|
||||||
{
|
{
|
||||||
|
if (EditorManager.instance.cameraManager.haveGameCamera)
|
||||||
|
{
|
||||||
|
LogWindow.Log("Only one GameCamera can be created", Color.red);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
GameCamera gameCamera =
|
GameCamera gameCamera =
|
||||||
Instantiate(EditorManager.instance.basePrefabs.gameCamera).GetComponent<GameCamera>();
|
Instantiate(EditorManager.instance.basePrefabs.gameCamera).GetComponent<GameCamera>();
|
||||||
|
|
||||||
gameCamera.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
|
gameCamera.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
|
||||||
|
|
||||||
|
cameraManager.gameCamera = gameCamera;
|
||||||
|
cameraManager.backgroundCamera.GetComponent<UniversalAdditionalCameraData>().cameraStack.Add(gameCamera.camera);
|
||||||
|
if (cameraManager.isSceneCameraActive) gameCamera.camera.enabled = false;
|
||||||
|
|
||||||
|
|
||||||
gameCamera.parentElement = parentElement;
|
gameCamera.parentElement = parentElement;
|
||||||
gameCamera.cameraViewType = cameraViewType;
|
gameCamera.cameraViewType = cameraViewType;
|
||||||
gameCamera.camera.orthographic = cameraViewType == CameraViewType.Orthographic;
|
gameCamera.camera.orthographic = cameraViewType == CameraViewType.Orthographic;
|
||||||
@@ -132,7 +147,7 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public override void ExecuteBM()
|
public override void ExecuteBM()
|
||||||
{
|
{
|
||||||
GameCamera.GenerateElement(elementName, elementGuid, tags, false,
|
matchedElement = GameCamera.GenerateElement(elementName, elementGuid, tags, false,
|
||||||
GetElement(attachedElementGuid), cameraViewType, perspectiveAngle, orthographicSize);
|
GetElement(attachedElementGuid), cameraViewType, perspectiveAngle, orthographicSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ namespace Ichni.RhythmGame
|
|||||||
if (isFirstGenerated) SetDefaultSubmodules();
|
if (isFirstGenerated) SetDefaultSubmodules();
|
||||||
SetParent(parentElement);
|
SetParent(parentElement);
|
||||||
EditorManager.instance.uiManager.hierarchy.GenerateTab(this, parentElement);
|
EditorManager.instance.uiManager.hierarchy.GenerateTab(this, parentElement);
|
||||||
|
|
||||||
//GameManager.beatMapContainer.beatMapElementList.Add(this);
|
//GameManager.beatMapContainer.beatMapElementList.Add(this);
|
||||||
//serialNumber = totalSerialNumber++;
|
//serialNumber = totalSerialNumber++;
|
||||||
//SetTransformObserver();
|
//SetTransformObserver();
|
||||||
|
|||||||
@@ -14,8 +14,14 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
public float bloomTime;
|
public float bloomTime;
|
||||||
public float bloomPeak;
|
public float bloomPeak;
|
||||||
|
|
||||||
[Button("Test Bloom Shake")]
|
public BloomShake(float bloomTime, float bloomPeak)
|
||||||
|
{
|
||||||
|
this.effectTime = 0;
|
||||||
|
this.bloomTime = bloomTime;
|
||||||
|
this.bloomPeak = bloomPeak;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Adjust()
|
public override void Adjust()
|
||||||
{
|
{
|
||||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomShake).GetComponent<MMF_Player>();
|
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomShake).GetComponent<MMF_Player>();
|
||||||
@@ -27,12 +33,40 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public override EffectBase_BM ConvertToBM()
|
public override EffectBase_BM ConvertToBM()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new BloomShake_BM(bloomTime, bloomPeak);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetUpInspector()
|
public override void SetUpInspector()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
var container = inspector.GenerateContainer("Bloom Shake");
|
||||||
|
var effectTimeField = inspector.GenerateInputField(this, container, "Bloom Time", nameof(bloomTime));
|
||||||
|
var bloomPeakField = inspector.GenerateInputField(this, container, "Bloom Peak", nameof(bloomPeak));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Beatmap
|
||||||
|
{
|
||||||
|
public class BloomShake_BM : EffectBase_BM
|
||||||
|
{
|
||||||
|
public float bloomTime;
|
||||||
|
public float bloomPeak;
|
||||||
|
|
||||||
|
public BloomShake_BM()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloomShake_BM(float bloomTime, float bloomPeak)
|
||||||
|
{
|
||||||
|
this.effectTime = 0;
|
||||||
|
this.bloomTime = bloomTime;
|
||||||
|
this.bloomPeak = bloomPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EffectBase ConvertToGameType()
|
||||||
|
{
|
||||||
|
return new BloomShake(bloomTime, bloomPeak);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Ichni.RhythmGame.Beatmap;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -11,10 +12,12 @@ namespace Ichni.RhythmGame
|
|||||||
public EffectSubmodule effectSubmodule { get; set; }
|
public EffectSubmodule effectSubmodule { get; set; }
|
||||||
public float time;
|
public float time;
|
||||||
|
|
||||||
public static TimeEffectsCollection CreateTimeEffectsCollection(float time)
|
public static TimeEffectsCollection GenerateElement(string name, Guid guid, List<string> tags,
|
||||||
|
bool isFirstGenerated, GameElement parentElement, float time)
|
||||||
{
|
{
|
||||||
TimeEffectsCollection timeEffectsCollection = Instantiate(EditorManager.instance.basePrefabs.emptyObject)
|
TimeEffectsCollection timeEffectsCollection = Instantiate(EditorManager.instance.basePrefabs.emptyObject)
|
||||||
.AddComponent<TimeEffectsCollection>();
|
.AddComponent<TimeEffectsCollection>();
|
||||||
|
timeEffectsCollection.Initialize(name, guid, tags, isFirstGenerated, parentElement);
|
||||||
timeEffectsCollection.time = time;
|
timeEffectsCollection.time = time;
|
||||||
return timeEffectsCollection;
|
return timeEffectsCollection;
|
||||||
}
|
}
|
||||||
@@ -34,18 +37,53 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
public override void SaveBM()
|
public override void SaveBM()
|
||||||
{
|
{
|
||||||
|
matchedBM = new TimeEffectsCollection_BM(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetUpInspector()
|
public override void SetUpInspector()
|
||||||
{
|
{
|
||||||
var container = inspector.GenerateContainer("Time Effects Collection");
|
var container = inspector.GenerateContainer("Time Effects Collection");
|
||||||
var timeInputField = inspector.GenerateInputField(this, container, "Time", nameof(time));
|
var timeInputField = inspector.GenerateInputField(this, container, "Time", nameof(time));
|
||||||
|
var addEffectButton = inspector.GenerateButton(this, container, "Add Effect", () =>
|
||||||
|
{
|
||||||
|
IHaveEffectSubmodule.EffectCollection.TryGetValue("BloomShake", out var effect);
|
||||||
|
effectSubmodule.effectCollection["Default"].Add(effect);
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var effect in effectSubmodule.effectCollection["Default"])
|
||||||
|
{
|
||||||
|
effect.SetUpInspector();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Beatmap
|
namespace Beatmap
|
||||||
{
|
{
|
||||||
|
public class TimeEffectsCollection_BM : GameElement_BM
|
||||||
|
{
|
||||||
|
public float time;
|
||||||
|
|
||||||
|
public TimeEffectsCollection_BM()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeEffectsCollection_BM(TimeEffectsCollection timeEffectsCollection)
|
||||||
|
{
|
||||||
|
time = timeEffectsCollection.time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ExecuteBM()
|
||||||
|
{
|
||||||
|
matchedElement = TimeEffectsCollection.GenerateElement("Time Effects Collection", elementGuid,
|
||||||
|
tags, false, GetElement(attachedElementGuid), time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override GameElement DuplicateBM(GameElement attached)
|
||||||
|
{
|
||||||
|
return TimeEffectsCollection.GenerateElement("Time Effects Collection", elementGuid,
|
||||||
|
tags, false, attached, time);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,6 +63,21 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
trackPositioner.SetPercent(trackPercent.value);
|
trackPositioner.SetPercent(trackPercent.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PasteTrackList()
|
||||||
|
{
|
||||||
|
List<Track> trackList = (parentElement as ElementFolder).trackList;
|
||||||
|
trackSwitch = new FlexibleInt();
|
||||||
|
trackPercent = new FlexibleFloat();
|
||||||
|
foreach (Track track in trackList)
|
||||||
|
{
|
||||||
|
TrackTimeSubmoduleMovable trackTimeSubmodule = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
||||||
|
trackSwitch.animations.Add(new AnimatedInt(trackTimeSubmodule.trackStartTime,
|
||||||
|
trackList.IndexOf(track)));
|
||||||
|
trackPercent.animations.Add(new AnimatedFloat(trackTimeSubmodule.trackStartTime,
|
||||||
|
trackTimeSubmodule.trackEndTime, 0, 1, trackTimeSubmodule.animationCurveType));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class CrossTrackPoint
|
public partial class CrossTrackPoint
|
||||||
@@ -72,6 +87,28 @@ namespace Ichni.RhythmGame
|
|||||||
matchedBM = new CrossTrackPoint_BM(elementName, elementGuid, tags,
|
matchedBM = new CrossTrackPoint_BM(elementName, elementGuid, tags,
|
||||||
parentElement.matchedBM as GameElement_BM, trackSwitch, trackPercent);
|
parentElement.matchedBM as GameElement_BM, trackSwitch, trackPercent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetUpInspector()
|
||||||
|
{
|
||||||
|
base.SetUpInspector();
|
||||||
|
var container = inspector.GenerateContainer("Cross Track Point");
|
||||||
|
var trackSwitchButton = inspector.GenerateButton(this, container, "Track Switch",
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
inspector.GenerateCompositeParameterWindow(this, "Track Switch", nameof(trackSwitch)).SetAsFlexibleInt();
|
||||||
|
});
|
||||||
|
var trackPercentButton = inspector.GenerateButton(this, container, "Track Percent",
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
inspector.GenerateCompositeParameterWindow(this, "Track Percent", nameof(trackPercent)).SetAsFlexibleFloat();
|
||||||
|
});
|
||||||
|
var pasteTrackListButton = inspector.GenerateButton(this, container, "Paste Track List", PasteTrackList);
|
||||||
|
|
||||||
|
var generateContainer = inspector.GenerateContainer("Generate");
|
||||||
|
var generateCameraButton = inspector.GenerateButton(this, generateContainer, "Game Camera",
|
||||||
|
() => GameCamera.GenerateElement("New Game Camera", Guid.NewGuid(), new List<string>(),
|
||||||
|
true, this, GameCamera.CameraViewType.Perspective, 60, 10));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Beatmap
|
namespace Beatmap
|
||||||
|
|||||||
@@ -3,25 +3,29 @@ using System.Collections.Generic;
|
|||||||
using Ichni.RhythmGame;
|
using Ichni.RhythmGame;
|
||||||
using Ichni.RhythmGame.Beatmap;
|
using Ichni.RhythmGame.Beatmap;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
namespace Ichni.Editor
|
namespace Ichni.Editor
|
||||||
{
|
{
|
||||||
public class CameraManager : MonoBehaviour, IBaseElement
|
public class CameraManager : MonoBehaviour, IBaseElement
|
||||||
{
|
{
|
||||||
|
public Camera backgroundCamera;
|
||||||
|
|
||||||
public bool isSceneCameraActive;
|
public bool isSceneCameraActive;
|
||||||
public SceneCamera sceneCamera;
|
public SceneCamera sceneCamera;
|
||||||
public float cameraMoveSpeed;
|
public float sceneCameraMoveSpeed;
|
||||||
|
|
||||||
public GameCamera gameCamera;
|
public GameCamera gameCamera;
|
||||||
private bool haveGameCamera => gameCamera != null;
|
public bool haveGameCamera => gameCamera != null;
|
||||||
|
|
||||||
public BaseElement_BM matchedBM { get; set; }
|
public BaseElement_BM matchedBM { get; set; }
|
||||||
|
|
||||||
public void SwitchCamera()
|
public void SwitchCamera()
|
||||||
{
|
{
|
||||||
if (!haveGameCamera)
|
if (!haveGameCamera)
|
||||||
{
|
{
|
||||||
throw new System.Exception("GameCamera is not assigned");
|
LogWindow.Log("GameCamera is not assigned", Color.red);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isSceneCameraActive = !isSceneCameraActive;
|
isSceneCameraActive = !isSceneCameraActive;
|
||||||
@@ -35,7 +39,7 @@ namespace Ichni.Editor
|
|||||||
var container = EditorManager.instance.uiManager.inspector.GenerateContainer("Camera Manager");
|
var container = EditorManager.instance.uiManager.inspector.GenerateContainer("Camera Manager");
|
||||||
var cameraTypeText = EditorManager.instance.uiManager.inspector.GenerateHintText(this, container, ShowCameraType);
|
var cameraTypeText = EditorManager.instance.uiManager.inspector.GenerateHintText(this, container, ShowCameraType);
|
||||||
var switchCameraButton = EditorManager.instance.uiManager.inspector.GenerateButton(this, container, "Switch Camera", SwitchCamera);
|
var switchCameraButton = EditorManager.instance.uiManager.inspector.GenerateButton(this, container, "Switch Camera", SwitchCamera);
|
||||||
var cameraMoveSpeedField = EditorManager.instance.uiManager.inspector.GenerateInputField(this, container, "Camera Move Speed", nameof(cameraMoveSpeed));
|
var cameraMoveSpeedField = EditorManager.instance.uiManager.inspector.GenerateInputField(this, container, "Scene Camera Move Speed", nameof(sceneCameraMoveSpeed));
|
||||||
sceneCamera.SetUpInspector();
|
sceneCamera.SetUpInspector();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using Ichni.RhythmGame.Beatmap;
|
|||||||
using Ichni.RhythmGame.ThemeBundles.Basic;
|
using Ichni.RhythmGame.ThemeBundles.Basic;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
|
||||||
|
|
||||||
namespace Ichni
|
namespace Ichni
|
||||||
{
|
{
|
||||||
@@ -55,11 +54,6 @@ namespace Ichni
|
|||||||
|
|
||||||
beatmapContainer.gameElementList.ForEach(gameElement =>
|
beatmapContainer.gameElementList.ForEach(gameElement =>
|
||||||
{
|
{
|
||||||
if (gameElement is IHaveTransformSubmodule transformedElement)
|
|
||||||
{
|
|
||||||
transformedElement.SetTransformObserver();
|
|
||||||
}
|
|
||||||
|
|
||||||
gameElement.AfterInitialize();
|
gameElement.AfterInitialize();
|
||||||
gameElement.Refresh();
|
gameElement.Refresh();
|
||||||
});
|
});
|
||||||
@@ -70,11 +64,18 @@ namespace Ichni
|
|||||||
var container = inspector.GenerateContainer("Editor Manager");
|
var container = inspector.GenerateContainer("Editor Manager");
|
||||||
var judgeTypeDropdown = inspector.GenerateDropdown(this, container, "Judge Type",
|
var judgeTypeDropdown = inspector.GenerateDropdown(this, container, "Judge Type",
|
||||||
typeof(NoteBase.NoteJudgeType), nameof(currentJudgeType));
|
typeof(NoteBase.NoteJudgeType), nameof(currentJudgeType));
|
||||||
var generateBackgroundSetterButton =
|
|
||||||
|
var generateFolderButton =
|
||||||
|
inspector.GenerateButton(this, container, "Generate Folder",
|
||||||
|
() => ElementFolder.GenerateElement("Folder", Guid.NewGuid(),
|
||||||
|
new List<string>(), true, null));
|
||||||
|
|
||||||
|
var generateBackgroundSetterButton =
|
||||||
inspector.GenerateButton(this, container, "Generate Background Setter",
|
inspector.GenerateButton(this, container, "Generate Background Setter",
|
||||||
() => BackgroundSetter.GenerateElement("Background Setter", Guid.NewGuid(),
|
() => BackgroundSetter.GenerateElement("Background Setter", Guid.NewGuid(),
|
||||||
new List<string>(), true, null, false,
|
new List<string>(), true, null, false,
|
||||||
"basic", "Skybox", "Background"));
|
"basic", "Skybox", "Background"));
|
||||||
|
|
||||||
projectInformation.SetUpInspector();
|
projectInformation.SetUpInspector();
|
||||||
songInformation.SetUpInspector();
|
songInformation.SetUpInspector();
|
||||||
cameraManager.SetUpInspector();
|
cameraManager.SetUpInspector();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Ichni.Editor
|
|||||||
{
|
{
|
||||||
if (EditorManager.instance.cameraManager.isSceneCameraActive)
|
if (EditorManager.instance.cameraManager.isSceneCameraActive)
|
||||||
{
|
{
|
||||||
float cameraSpeed = EditorManager.instance.cameraManager.cameraMoveSpeed * Time.deltaTime;
|
float cameraSpeed = EditorManager.instance.cameraManager.sceneCameraMoveSpeed * Time.deltaTime;
|
||||||
Transform sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
|
Transform sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
|
||||||
if (Keyboard.current.wKey.isPressed)
|
if (Keyboard.current.wKey.isPressed)
|
||||||
{
|
{
|
||||||
|
|||||||
18
Assets/Scripts/Manager/OperationManager.cs
Normal file
18
Assets/Scripts/Manager/OperationManager.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class OperationManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Manager/OperationManager.cs.meta
Normal file
11
Assets/Scripts/Manager/OperationManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 773c77098921d4c1a87dc6068b5253e8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Ichni.Editor;
|
||||||
using Ichni.RhythmGame;
|
using Ichni.RhythmGame;
|
||||||
using Ichni.RhythmGame.Beatmap;
|
using Ichni.RhythmGame.Beatmap;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -62,10 +63,14 @@ namespace Ichni
|
|||||||
string beatmapPath = exportPath + "/BeatMap.bytes";
|
string beatmapPath = exportPath + "/BeatMap.bytes";
|
||||||
string commandScriptsPath = exportPath + "/CommandScripts.bytes";
|
string commandScriptsPath = exportPath + "/CommandScripts.bytes";
|
||||||
|
|
||||||
|
LogWindow.Log("Start Exporting...");
|
||||||
|
|
||||||
ExportProjectInfo(projectInfoPath);
|
ExportProjectInfo(projectInfoPath);
|
||||||
ExportSongInfo(songInfoPath);
|
ExportSongInfo(songInfoPath);
|
||||||
ExportBeatMap(beatmapPath);
|
ExportBeatMap(beatmapPath);
|
||||||
ExportCommandScripts(commandScriptsPath);
|
ExportCommandScripts(commandScriptsPath);
|
||||||
|
|
||||||
|
LogWindow.Log("Export Complete", Color.green);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExportProjectInfo(string exportPath)
|
private void ExportProjectInfo(string exportPath)
|
||||||
@@ -101,10 +106,14 @@ namespace Ichni
|
|||||||
{
|
{
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
|
LogWindow.Log("Start Saving...");
|
||||||
|
|
||||||
SaveProjectInfo();
|
SaveProjectInfo();
|
||||||
SaveSongInfo();
|
SaveSongInfo();
|
||||||
SaveBeatMap();
|
SaveBeatMap();
|
||||||
SaveCommandScripts();
|
SaveCommandScripts();
|
||||||
|
|
||||||
|
LogWindow.Log("Save Complete", Color.green);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveProjectInfo()
|
private void SaveProjectInfo()
|
||||||
@@ -144,6 +153,8 @@ namespace Ichni
|
|||||||
LoadSongInfo();
|
LoadSongInfo();
|
||||||
LoadBeatMap();
|
LoadBeatMap();
|
||||||
LoadCommandScripts();
|
LoadCommandScripts();
|
||||||
|
|
||||||
|
LogWindow.Log("Load Complete", Color.green);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadProjectInfo(string projectName)
|
private void LoadProjectInfo(string projectName)
|
||||||
|
|||||||
@@ -520,7 +520,7 @@
|
|||||||
"attachedNoteID" : {
|
"attachedNoteID" : {
|
||||||
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
||||||
},
|
},
|
||||||
"effectTime" : 0
|
"effectTime" : 0.1
|
||||||
}
|
}
|
||||||
],"Good":[
|
],"Good":[
|
||||||
{
|
{
|
||||||
@@ -528,7 +528,7 @@
|
|||||||
"attachedNoteID" : {
|
"attachedNoteID" : {
|
||||||
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
||||||
},
|
},
|
||||||
"effectTime" : 0
|
"effectTime" : 0.1
|
||||||
}
|
}
|
||||||
],"Bad":[
|
],"Bad":[
|
||||||
{
|
{
|
||||||
@@ -536,7 +536,7 @@
|
|||||||
"attachedNoteID" : {
|
"attachedNoteID" : {
|
||||||
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
||||||
},
|
},
|
||||||
"effectTime" : 0
|
"effectTime" : 0.1
|
||||||
}
|
}
|
||||||
],"Miss":[
|
],"Miss":[
|
||||||
{
|
{
|
||||||
@@ -544,13 +544,88 @@
|
|||||||
"attachedNoteID" : {
|
"attachedNoteID" : {
|
||||||
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
"value" : "c5134d2c-c175-458c-99ff-07523169ec21"
|
||||||
},
|
},
|
||||||
"effectTime" : 0
|
"effectTime" : 0.2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"attachedElementGuid" : {
|
"attachedElementGuid" : {
|
||||||
"value" : "461ebb33-7c3d-47b2-bc0b-7c5ef2cd3e9e"
|
"value" : "461ebb33-7c3d-47b2-bc0b-7c5ef2cd3e9e"
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp",
|
||||||
|
"elementName" : "Folder",
|
||||||
|
"tags" : [
|
||||||
|
|
||||||
|
],
|
||||||
|
"elementGuid" : {
|
||||||
|
"value" : "48db0eab-2ed9-4179-8bdf-e90970d046ca"
|
||||||
|
},
|
||||||
|
"attachedElementGuid" : {
|
||||||
|
"value" : "00000000-0000-0000-0000-000000000000"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
|
||||||
|
"originalPosition" : {
|
||||||
|
"x" : 0,
|
||||||
|
"y" : 0,
|
||||||
|
"z" : 0
|
||||||
|
},
|
||||||
|
"originalEulerAngles" : {
|
||||||
|
"x" : 0,
|
||||||
|
"y" : 0,
|
||||||
|
"z" : 0
|
||||||
|
},
|
||||||
|
"originalScale" : {
|
||||||
|
"x" : 1,
|
||||||
|
"y" : 1,
|
||||||
|
"z" : 1
|
||||||
|
},
|
||||||
|
"attachedElementGuid" : {
|
||||||
|
"value" : "48db0eab-2ed9-4179-8bdf-e90970d046ca"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
||||||
|
"isOverridingDuration" : false,
|
||||||
|
"startTime" : -32767,
|
||||||
|
"endTime" : 32767,
|
||||||
|
"attachedElementGuid" : {
|
||||||
|
"value" : "48db0eab-2ed9-4179-8bdf-e90970d046ca"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"__type" : "Ichni.RhythmGame.Beatmap.GameCamera_BM,Assembly-CSharp",
|
||||||
|
"cameraViewType" : 0,
|
||||||
|
"perspectiveAngle" : 60,
|
||||||
|
"orthographicSize" : 10,
|
||||||
|
"elementName" : "New Camera",
|
||||||
|
"tags" : [
|
||||||
|
|
||||||
|
],
|
||||||
|
"elementGuid" : {
|
||||||
|
"value" : "90851003-b06b-4fee-8bd3-910abdbe53b1"
|
||||||
|
},
|
||||||
|
"attachedElementGuid" : {
|
||||||
|
"value" : "48db0eab-2ed9-4179-8bdf-e90970d046ca"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
|
||||||
|
"originalPosition" : {
|
||||||
|
"x" : 0,
|
||||||
|
"y" : 0,
|
||||||
|
"z" : 0
|
||||||
|
},
|
||||||
|
"originalEulerAngles" : {
|
||||||
|
"x" : 0,
|
||||||
|
"y" : 0,
|
||||||
|
"z" : 0
|
||||||
|
},
|
||||||
|
"originalScale" : {
|
||||||
|
"x" : 1,
|
||||||
|
"y" : 1,
|
||||||
|
"z" : 1
|
||||||
|
},
|
||||||
|
"attachedElementGuid" : {
|
||||||
|
"value" : "90851003-b06b-4fee-8bd3-910abdbe53b1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"createTime" : "2025-02-08",
|
"createTime" : "2025-02-08",
|
||||||
"lastSaveTime" : "2025-02-08",
|
"lastSaveTime" : "2025-02-08",
|
||||||
"selectedThemeBundleList" : [
|
"selectedThemeBundleList" : [
|
||||||
"basic", "departure_to_multiverse"
|
"basic","departure_to_multiverse"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user