特效范例
This commit is contained in:
@@ -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