特效范例
This commit is contained in:
@@ -4,6 +4,7 @@ using Ichni.RhythmGame;
|
||||
using JetBrains.Annotations;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UIElements.Experimental;
|
||||
|
||||
@@ -34,5 +35,12 @@ namespace Ichni.Editor
|
||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newValue);
|
||||
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);
|
||||
};
|
||||
}
|
||||
|
||||
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>();
|
||||
}
|
||||
|
||||
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();
|
||||
LogText logText = LeanPool.Spawn(logTextPrefab, textRect).GetComponent<LogText>();
|
||||
|
||||
@@ -4,6 +4,7 @@ using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Sirenix.Utilities;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
@@ -83,6 +84,12 @@ namespace Ichni.RhythmGame
|
||||
public interface IHaveEffectSubmodule
|
||||
{
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
|
||||
public static Dictionary<string, EffectBase> EffectCollection { get; } =
|
||||
new Dictionary<string, EffectBase>()
|
||||
{
|
||||
{"BloomShake", new BloomShake(1, 2)}
|
||||
};
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Ichni.RhythmGame
|
||||
isOverridingDuration = false;
|
||||
startTime = -32767;//TODO: 换为-delay
|
||||
endTime = 32767;//TODO: 换为songLength
|
||||
|
||||
}
|
||||
|
||||
public TimeDurationSubmodule(GameElement attachedGameElement, bool isOverridingDuration, float startTime, float endTime) : base(attachedGameElement)
|
||||
|
||||
@@ -29,8 +29,7 @@ namespace Ichni.RhythmGame
|
||||
public bool scaleDirtyMark;
|
||||
|
||||
public bool eulerAnglesOffsetLock;
|
||||
|
||||
|
||||
|
||||
public TransformSubmodule(GameElement attachedGameElement) : base(attachedGameElement)
|
||||
{
|
||||
this.originalPosition = Vector3.zero;
|
||||
@@ -51,7 +50,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
eulerAnglesOffsetLock = false;
|
||||
|
||||
// (attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||
(attachedGameElement as IHaveTransformSubmodule).transformSubmodule = this;
|
||||
(attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||
}
|
||||
|
||||
public TransformSubmodule(GameElement attachedGameElement,
|
||||
@@ -75,7 +75,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
eulerAnglesOffsetLock = false;
|
||||
|
||||
// (attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||
(attachedGameElement as IHaveTransformSubmodule).transformSubmodule = this;
|
||||
(attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
|
||||
}
|
||||
|
||||
public override void SaveBM()
|
||||
@@ -98,6 +99,10 @@ namespace Ichni.RhythmGame
|
||||
inspector.GenerateParameterText(this, container, "Current Rotation", nameof(currentEulerAngles), true);
|
||||
var currentScaleText =
|
||||
inspector.GenerateParameterText(this, container, "Current Scale", nameof(currentScale), true);
|
||||
|
||||
originalPosInputField.AddListenerFunction(Refresh);
|
||||
originalRotInputField.AddListenerFunction(Refresh);
|
||||
originalScaleInputField.AddListenerFunction(Refresh);
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
@@ -119,7 +124,7 @@ namespace Ichni.RhythmGame
|
||||
public void SetTransformObserver()
|
||||
{
|
||||
GameElement attachedGameElement = transformSubmodule.attachedGameElement;
|
||||
|
||||
|
||||
Observable.EveryUpdate().Subscribe(_ =>
|
||||
{
|
||||
if (transformSubmodule == null)
|
||||
@@ -197,6 +202,7 @@ namespace Ichni.RhythmGame
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
Debug.Log(attachedElementGuid);
|
||||
(attachedElement as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
|
||||
attachedElement.submoduleList.Add((attachedElement as IHaveTransformSubmodule).transformSubmodule);
|
||||
}
|
||||
|
||||
@@ -73,6 +73,9 @@ namespace Ichni.RhythmGame
|
||||
var swirlButton = inspector.GenerateButton(this, container, "Swirl",
|
||||
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
|
||||
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.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
@@ -23,15 +25,28 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public TransformSubmodule transformSubmodule { get; set; }
|
||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||
private static CameraManager cameraManager => EditorManager.instance.cameraManager;
|
||||
|
||||
public static GameCamera GenerateElement(string elementName, Guid id,
|
||||
List<string> tags, bool isFirstGenerated, GameElement parentElement,
|
||||
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 =
|
||||
Instantiate(EditorManager.instance.basePrefabs.gameCamera).GetComponent<GameCamera>();
|
||||
|
||||
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.cameraViewType = cameraViewType;
|
||||
gameCamera.camera.orthographic = cameraViewType == CameraViewType.Orthographic;
|
||||
@@ -132,7 +147,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
GameCamera.GenerateElement(elementName, elementGuid, tags, false,
|
||||
matchedElement = GameCamera.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), cameraViewType, perspectiveAngle, orthographicSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace Ichni.RhythmGame
|
||||
if (isFirstGenerated) SetDefaultSubmodules();
|
||||
SetParent(parentElement);
|
||||
EditorManager.instance.uiManager.hierarchy.GenerateTab(this, parentElement);
|
||||
|
||||
//GameManager.beatMapContainer.beatMapElementList.Add(this);
|
||||
//serialNumber = totalSerialNumber++;
|
||||
//SetTransformObserver();
|
||||
|
||||
@@ -14,8 +14,14 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public float bloomTime;
|
||||
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()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomShake).GetComponent<MMF_Player>();
|
||||
@@ -27,12 +33,40 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return new BloomShake_BM(bloomTime, bloomPeak);
|
||||
}
|
||||
|
||||
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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -11,10 +12,12 @@ namespace Ichni.RhythmGame
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
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)
|
||||
.AddComponent<TimeEffectsCollection>();
|
||||
timeEffectsCollection.Initialize(name, guid, tags, isFirstGenerated, parentElement);
|
||||
timeEffectsCollection.time = time;
|
||||
return timeEffectsCollection;
|
||||
}
|
||||
@@ -34,18 +37,53 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
|
||||
matchedBM = new TimeEffectsCollection_BM(this);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
var container = inspector.GenerateContainer("Time Effects Collection");
|
||||
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
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
@@ -72,6 +87,28 @@ namespace Ichni.RhythmGame
|
||||
matchedBM = new CrossTrackPoint_BM(elementName, elementGuid, tags,
|
||||
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
|
||||
|
||||
@@ -3,25 +3,29 @@ using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class CameraManager : MonoBehaviour, IBaseElement
|
||||
{
|
||||
public Camera backgroundCamera;
|
||||
|
||||
public bool isSceneCameraActive;
|
||||
public SceneCamera sceneCamera;
|
||||
public float cameraMoveSpeed;
|
||||
public float sceneCameraMoveSpeed;
|
||||
|
||||
public GameCamera gameCamera;
|
||||
private bool haveGameCamera => gameCamera != null;
|
||||
public bool haveGameCamera => gameCamera != null;
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public void SwitchCamera()
|
||||
{
|
||||
if (!haveGameCamera)
|
||||
{
|
||||
throw new System.Exception("GameCamera is not assigned");
|
||||
{
|
||||
LogWindow.Log("GameCamera is not assigned", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
isSceneCameraActive = !isSceneCameraActive;
|
||||
@@ -35,7 +39,7 @@ namespace Ichni.Editor
|
||||
var container = EditorManager.instance.uiManager.inspector.GenerateContainer("Camera Manager");
|
||||
var cameraTypeText = EditorManager.instance.uiManager.inspector.GenerateHintText(this, container, ShowCameraType);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Ichni
|
||||
{
|
||||
@@ -55,11 +54,6 @@ namespace Ichni
|
||||
|
||||
beatmapContainer.gameElementList.ForEach(gameElement =>
|
||||
{
|
||||
if (gameElement is IHaveTransformSubmodule transformedElement)
|
||||
{
|
||||
transformedElement.SetTransformObserver();
|
||||
}
|
||||
|
||||
gameElement.AfterInitialize();
|
||||
gameElement.Refresh();
|
||||
});
|
||||
@@ -70,11 +64,18 @@ namespace Ichni
|
||||
var container = inspector.GenerateContainer("Editor Manager");
|
||||
var judgeTypeDropdown = inspector.GenerateDropdown(this, container, "Judge Type",
|
||||
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",
|
||||
() => BackgroundSetter.GenerateElement("Background Setter", Guid.NewGuid(),
|
||||
new List<string>(), true, null, false,
|
||||
() => BackgroundSetter.GenerateElement("Background Setter", Guid.NewGuid(),
|
||||
new List<string>(), true, null, false,
|
||||
"basic", "Skybox", "Background"));
|
||||
|
||||
projectInformation.SetUpInspector();
|
||||
songInformation.SetUpInspector();
|
||||
cameraManager.SetUpInspector();
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Ichni.Editor
|
||||
{
|
||||
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;
|
||||
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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
@@ -62,10 +63,14 @@ namespace Ichni
|
||||
string beatmapPath = exportPath + "/BeatMap.bytes";
|
||||
string commandScriptsPath = exportPath + "/CommandScripts.bytes";
|
||||
|
||||
LogWindow.Log("Start Exporting...");
|
||||
|
||||
ExportProjectInfo(projectInfoPath);
|
||||
ExportSongInfo(songInfoPath);
|
||||
ExportBeatMap(beatmapPath);
|
||||
ExportCommandScripts(commandScriptsPath);
|
||||
|
||||
LogWindow.Log("Export Complete", Color.green);
|
||||
}
|
||||
|
||||
private void ExportProjectInfo(string exportPath)
|
||||
@@ -101,10 +106,14 @@ namespace Ichni
|
||||
{
|
||||
public void Save()
|
||||
{
|
||||
LogWindow.Log("Start Saving...");
|
||||
|
||||
SaveProjectInfo();
|
||||
SaveSongInfo();
|
||||
SaveBeatMap();
|
||||
SaveCommandScripts();
|
||||
|
||||
LogWindow.Log("Save Complete", Color.green);
|
||||
}
|
||||
|
||||
private void SaveProjectInfo()
|
||||
@@ -144,6 +153,8 @@ namespace Ichni
|
||||
LoadSongInfo();
|
||||
LoadBeatMap();
|
||||
LoadCommandScripts();
|
||||
|
||||
LogWindow.Log("Load Complete", Color.green);
|
||||
}
|
||||
|
||||
private void LoadProjectInfo(string projectName)
|
||||
|
||||
Reference in New Issue
Block a user