更新
This commit is contained in:
@@ -11,13 +11,13 @@ Material:
|
||||
m_Shader: {fileID: 4800000, guid: 44e8d6dab1446644688189717537509a, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION_ON
|
||||
- _USEREDASALPHA_ON
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _EMISSION_ON
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
- _RECEIVE_SHADOWS_OFF
|
||||
- _USEREDASALPHA_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
@@ -61,7 +61,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTexture:
|
||||
m_Texture: {fileID: 2800000, guid: fe0f51232d3c144e98a40dcef497dca2, type: 3}
|
||||
m_Texture: {fileID: 2800000, guid: d7b8dd640e42194458cd8292833fb86d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
@@ -173,6 +173,7 @@ Material:
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2523386628062252728
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
|
||||
@@ -247,7 +247,7 @@ Material:
|
||||
- _DissolveOffsetUC2Vec4: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _DissolveOffsetVC2Vec4: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _DistortFactorC2Vec4: {r: 0, g: 0, b: 1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 2, g: 2, b: 2, a: 1}
|
||||
- _MainColor: {r: 0.7490195, g: 0.7490195, b: 0.7490195, a: 1}
|
||||
- _MainOffsetUC2Vec4: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _MainOffsetVC2Vec4: {r: 0, g: 1, b: 0, a: 0}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e924a6166437ca14e93b0a5924bd989a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,9 +11,9 @@ GameObject:
|
||||
- component: {fileID: 5365034608843891105}
|
||||
- component: {fileID: 8311872776517609736}
|
||||
- component: {fileID: 8033154349789972278}
|
||||
- component: {fileID: 8823166546278708317}
|
||||
- component: {fileID: 3261533044593358599}
|
||||
m_Layer: 0
|
||||
m_Name: FramesPlaneIndigo
|
||||
m_Name: DTM_FramesFloor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -91,7 +91,7 @@ MeshRenderer:
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &8823166546278708317
|
||||
--- !u!114 &3261533044593358599
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -100,9 +100,9 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 8220859051912764878}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b73aa7982dc9e4261b2ff45db0112d48, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 677671f1d5140b2489dc52c18792b8f5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.DTMFramesFloor
|
||||
serializationData:
|
||||
SerializedFormat: 2
|
||||
SerializedBytes:
|
||||
@@ -135,3 +135,13 @@ MonoBehaviour:
|
||||
themeBundleName:
|
||||
objectName:
|
||||
isStatic: 0
|
||||
patternSizeX: 100
|
||||
patternSizeY: 100
|
||||
gridDensity: 1
|
||||
timeAngle: 0.2
|
||||
stepA: 0.25
|
||||
stepB: 0.24
|
||||
enableOuterBorder: 1
|
||||
outerBorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
outerBorderWidth: 0.05
|
||||
meshRenderer: {fileID: 8033154349789972278}
|
||||
@@ -0,0 +1,221 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3179206436116495739
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4482406025583957375}
|
||||
- component: {fileID: 6070709740743483777}
|
||||
- component: {fileID: 4940323506193584270}
|
||||
- component: {fileID: 7011043235044546540}
|
||||
- component: {fileID: 2448635691461890977}
|
||||
m_Layer: 0
|
||||
m_Name: DTM_GlobalFog
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &4482406025583957375
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3179206436116495739}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1000, y: 1000, z: 1000}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &6070709740743483777
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3179206436116495739}
|
||||
m_Enabled: 0
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &4940323506193584270
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3179206436116495739}
|
||||
m_Mesh: {fileID: 10200, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!114 &7011043235044546540
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3179206436116495739}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d8023d2ae1fcb2948a39527720c2087b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Boxophobic.AtmosphericHeightFog.Runtime::AtmosphericHeightFog.HeightFogGlobal
|
||||
styledBanner: 0
|
||||
categoryRender: 1
|
||||
renderMode: 10
|
||||
categoryScene: 1
|
||||
mainCamera: {fileID: 0}
|
||||
mainDirectional: {fileID: 0}
|
||||
categoryMode: 1
|
||||
fogMode: 10
|
||||
messagePreset: 0
|
||||
messageTimeOfDay: 0
|
||||
presetMaterial: {fileID: 0}
|
||||
presetDay: {fileID: 0}
|
||||
presetNight: {fileID: 0}
|
||||
timeOfDay: 0
|
||||
categoryFog: 1
|
||||
fogIntensity: 1
|
||||
fogAxisMode: 1
|
||||
fogLayersMode: 10
|
||||
fogCameraMode: 0
|
||||
fogColorStart: {r: 0.5, g: 0.75, b: 1, a: 1}
|
||||
fogColorEnd: {r: 0.75, g: 1, b: 1.25, a: 1}
|
||||
fogColorDuo: 0
|
||||
fogDistanceStart: 0
|
||||
fogDistanceEnd: 100
|
||||
fogDistanceFalloff: 1
|
||||
fogHeightStart: 0
|
||||
fogHeightEnd: 100
|
||||
fogHeightFalloff: 1
|
||||
farDistanceHeight: 0
|
||||
farDistanceOffset: 0
|
||||
categorySkybox: 1
|
||||
skyboxFogIntensity: 0.75
|
||||
skyboxFogHeight: 1
|
||||
skyboxFogFalloff: 8
|
||||
skyboxFogOffset: 0
|
||||
skyboxFogBottom: 0
|
||||
skyboxFogFill: 0
|
||||
categoryDirectional: 1
|
||||
directionalIntensity: 0
|
||||
directionalFalloff: 1
|
||||
directionalColor: {r: 1, g: 0.75, b: 0.5, a: 1}
|
||||
categoryNoise: 1
|
||||
noiseIntensity: 1
|
||||
noiseMin: 0
|
||||
noiseMax: 1
|
||||
noiseScale: 30
|
||||
noiseSpeed: {x: 0.5, y: 0, z: 0.5}
|
||||
noiseDistanceEnd: 200
|
||||
categoryAdvanced: 1
|
||||
jitterIntensity: 0
|
||||
renderPriority: 1
|
||||
manualPositionAndScale: 0
|
||||
styledSpace0: 0
|
||||
overrideMaterial: {fileID: 0}
|
||||
overrideCamToVolumeDistance: 1
|
||||
overrideVolumeDistanceFade: 0
|
||||
version: 0
|
||||
--- !u!114 &2448635691461890977
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3179206436116495739}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e8bab02f6d349f6418ccfe0674b93013, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::DTMGlobalFog
|
||||
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}
|
||||
childElementList: []
|
||||
themeBundleName:
|
||||
objectName:
|
||||
isStatic: 0
|
||||
heightFogGlobal: {fileID: 0}
|
||||
fogColorStartR: 0.5
|
||||
fogColorStartG: 0.75
|
||||
fogColorStartB: 1
|
||||
fogColorStartA: 1
|
||||
fogColorEndR: 0.75
|
||||
fogColorEndG: 1
|
||||
fogColorEndB: 1.25
|
||||
fogColorEndA: 1
|
||||
fogColorDuo: 0
|
||||
skyboxFogIntensity: 0
|
||||
skyboxFogHeight: 0
|
||||
skyboxFogFalloff: 0
|
||||
skyboxFogOffset: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b311dfab61c10f8429f6b9c87d141200
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -7,22 +7,17 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
|
||||
[System.Serializable]
|
||||
public class DTMGlobalFog_BM : EnvironmentObject_BM
|
||||
{
|
||||
public FlexibleFloat_BM fogColorStartR = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorStartG = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorStartB = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorStartA = new FlexibleFloat_BM();
|
||||
public float fogIntensity = 1f;
|
||||
public float fogColorStartR = 0.5f, fogColorStartG = 0.75f, fogColorStartB = 1.0f, fogColorStartA = 1.0f;
|
||||
public float fogColorEndR = 0.75f, fogColorEndG = 1.0f, fogColorEndB = 1.25f, fogColorEndA = 1.0f;
|
||||
public float fogColorDuo = 0f;
|
||||
|
||||
public FlexibleFloat_BM fogColorEndR = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorEndG = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorEndB = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM fogColorEndA = new FlexibleFloat_BM();
|
||||
|
||||
public FlexibleFloat_BM fogColorDuo = new FlexibleFloat_BM();
|
||||
|
||||
public FlexibleFloat_BM skyboxFogIntensity = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM skyboxFogHeight = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM skyboxFogFalloff = new FlexibleFloat_BM();
|
||||
public FlexibleFloat_BM skyboxFogOffset = new FlexibleFloat_BM();
|
||||
public float skyboxFogIntensity = 1f;
|
||||
public float skyboxFogHeight = 1f;
|
||||
public float skyboxFogFalloff = 1f;
|
||||
public float skyboxFogOffset = 0f;
|
||||
public float skyboxFogBottom = 0f;
|
||||
public float skyboxFogFill = 0f;
|
||||
|
||||
public DTMGlobalFog_BM()
|
||||
{
|
||||
@@ -33,11 +28,13 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
|
||||
{
|
||||
matchedElement = DTMGlobalFog.GenerateElement(elementName, elementGuid, tags, false,
|
||||
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic,
|
||||
fogColorStartR?.ConvertToGameType(), fogColorStartG?.ConvertToGameType(), fogColorStartB?.ConvertToGameType(), fogColorStartA?.ConvertToGameType(),
|
||||
fogColorEndR?.ConvertToGameType(), fogColorEndG?.ConvertToGameType(), fogColorEndB?.ConvertToGameType(), fogColorEndA?.ConvertToGameType(),
|
||||
fogColorDuo?.ConvertToGameType(),
|
||||
skyboxFogIntensity?.ConvertToGameType(), skyboxFogHeight?.ConvertToGameType(),
|
||||
skyboxFogFalloff?.ConvertToGameType(), skyboxFogOffset?.ConvertToGameType());
|
||||
fogIntensity,
|
||||
fogColorStartR, fogColorStartG, fogColorStartB, fogColorStartA,
|
||||
fogColorEndR, fogColorEndG, fogColorEndB, fogColorEndA,
|
||||
fogColorDuo,
|
||||
skyboxFogIntensity, skyboxFogHeight,
|
||||
skyboxFogFalloff, skyboxFogOffset,
|
||||
skyboxFogBottom, skyboxFogFill);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
using AtmosphericHeightFog;
|
||||
using FogMode = AtmosphericHeightFog.FogMode;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
public class DTMGlobalFog : EnvironmentObject
|
||||
{
|
||||
#region [暴露属性字段] Exposed Fields
|
||||
public HeightFogGlobal heightFogGlobal;
|
||||
|
||||
public FlexibleFloat fogColorStartR, fogColorStartG, fogColorStartB, fogColorStartA;
|
||||
public FlexibleFloat fogColorEndR, fogColorEndG, fogColorEndB, fogColorEndA;
|
||||
public FlexibleFloat fogColorDuo;
|
||||
|
||||
public FlexibleFloat skyboxFogIntensity;
|
||||
public FlexibleFloat skyboxFogHeight;
|
||||
public FlexibleFloat skyboxFogFalloff;
|
||||
public FlexibleFloat skyboxFogOffset;
|
||||
#endregion
|
||||
|
||||
#region [生命周期与工厂] Lifecycle & Factory
|
||||
public static DTMGlobalFog GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement,
|
||||
bool isStatic,
|
||||
FlexibleFloat fogColorStartR, FlexibleFloat fogColorStartG, FlexibleFloat fogColorStartB, FlexibleFloat fogColorStartA,
|
||||
FlexibleFloat fogColorEndR, FlexibleFloat fogColorEndG, FlexibleFloat fogColorEndB, FlexibleFloat fogColorEndA,
|
||||
FlexibleFloat fogColorDuo,
|
||||
FlexibleFloat skyboxFogIntensity, FlexibleFloat skyboxFogHeight,
|
||||
FlexibleFloat skyboxFogFalloff, FlexibleFloat skyboxFogOffset)
|
||||
{
|
||||
DTMGlobalFog globalFog = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMGlobalFog>();
|
||||
|
||||
globalFog.fogColorStartR = fogColorStartR;
|
||||
globalFog.fogColorStartG = fogColorStartG;
|
||||
globalFog.fogColorStartB = fogColorStartB;
|
||||
globalFog.fogColorStartA = fogColorStartA;
|
||||
|
||||
globalFog.fogColorEndR = fogColorEndR;
|
||||
globalFog.fogColorEndG = fogColorEndG;
|
||||
globalFog.fogColorEndB = fogColorEndB;
|
||||
globalFog.fogColorEndA = fogColorEndA;
|
||||
|
||||
globalFog.fogColorDuo = fogColorDuo;
|
||||
|
||||
globalFog.skyboxFogIntensity = skyboxFogIntensity;
|
||||
globalFog.skyboxFogHeight = skyboxFogHeight;
|
||||
globalFog.skyboxFogFalloff = skyboxFogFalloff;
|
||||
globalFog.skyboxFogOffset = skyboxFogOffset;
|
||||
|
||||
return globalFog;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
if (heightFogGlobal == null)
|
||||
{
|
||||
heightFogGlobal = GetComponentInChildren<HeightFogGlobal>();
|
||||
}
|
||||
|
||||
// Ensure fog mode is set to script settings so it accepts our overrides
|
||||
if (heightFogGlobal != null)
|
||||
{
|
||||
heightFogGlobal.fogMode = FogMode.UseScriptSettings;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [事件动画逻辑] Event Animation Logic
|
||||
private void Update()
|
||||
{
|
||||
if (heightFogGlobal == null) return;
|
||||
|
||||
float songTime = CoreServices.TimeProvider.SongTime;
|
||||
|
||||
fogColorStartR?.UpdateFlexibleFloat(songTime);
|
||||
fogColorStartG?.UpdateFlexibleFloat(songTime);
|
||||
fogColorStartB?.UpdateFlexibleFloat(songTime);
|
||||
fogColorStartA?.UpdateFlexibleFloat(songTime);
|
||||
|
||||
fogColorEndR?.UpdateFlexibleFloat(songTime);
|
||||
fogColorEndG?.UpdateFlexibleFloat(songTime);
|
||||
fogColorEndB?.UpdateFlexibleFloat(songTime);
|
||||
fogColorEndA?.UpdateFlexibleFloat(songTime);
|
||||
|
||||
fogColorDuo?.UpdateFlexibleFloat(songTime);
|
||||
skyboxFogIntensity?.UpdateFlexibleFloat(songTime);
|
||||
skyboxFogHeight?.UpdateFlexibleFloat(songTime);
|
||||
skyboxFogFalloff?.UpdateFlexibleFloat(songTime);
|
||||
skyboxFogOffset?.UpdateFlexibleFloat(songTime);
|
||||
|
||||
if (fogColorStartR != null && fogColorStartG != null && fogColorStartB != null && fogColorStartA != null)
|
||||
{
|
||||
heightFogGlobal.fogColorStart = new Color(fogColorStartR.value, fogColorStartG.value, fogColorStartB.value, fogColorStartA.value);
|
||||
}
|
||||
|
||||
if (fogColorEndR != null && fogColorEndG != null && fogColorEndB != null && fogColorEndA != null)
|
||||
{
|
||||
heightFogGlobal.fogColorEnd = new Color(fogColorEndR.value, fogColorEndG.value, fogColorEndB.value, fogColorEndA.value);
|
||||
}
|
||||
|
||||
if (fogColorDuo != null) heightFogGlobal.fogColorDuo = fogColorDuo.value;
|
||||
|
||||
if (skyboxFogIntensity != null) heightFogGlobal.skyboxFogIntensity = skyboxFogIntensity.value;
|
||||
if (skyboxFogHeight != null) heightFogGlobal.skyboxFogHeight = skyboxFogHeight.value;
|
||||
if (skyboxFogFalloff != null) heightFogGlobal.skyboxFogFalloff = skyboxFogFalloff.value;
|
||||
if (skyboxFogOffset != null) heightFogGlobal.skyboxFogOffset = skyboxFogOffset.value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,11 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
meshRenderer.InitializeShader(); // 实例化材质 / Instantiate material
|
||||
UpdateMaterialProperties();
|
||||
}
|
||||
|
||||
public override void OnDirtyRefresh(Dictionary<string, bool> flags)
|
||||
{
|
||||
UpdateMaterialProperties();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [效果核心逻辑] Core Effect Logic
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
using AtmosphericHeightFog;
|
||||
using FogMode = AtmosphericHeightFog.FogMode;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
public class DTMGlobalFog : EnvironmentObject
|
||||
{
|
||||
#region [暴露属性字段] Exposed Fields
|
||||
public HeightFogGlobal heightFogGlobal;
|
||||
|
||||
public float fogIntensity;
|
||||
public float fogColorStartR = 0.5f, fogColorStartG = 0.75f, fogColorStartB = 1f, fogColorStartA = 1f;
|
||||
public float fogColorEndR = 0.75f, fogColorEndG = 1f, fogColorEndB = 1.25f, fogColorEndA = 1f;
|
||||
public float fogColorDuo;
|
||||
|
||||
public float skyboxFogIntensity;
|
||||
public float skyboxFogHeight;
|
||||
public float skyboxFogFalloff;
|
||||
public float skyboxFogOffset;
|
||||
public float skyboxFogBottom;
|
||||
public float skyboxFogFill;
|
||||
#endregion
|
||||
|
||||
#region [生命周期与工厂] Lifecycle & Factory
|
||||
public static DTMGlobalFog GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement,
|
||||
bool isStatic,
|
||||
float fogIntensity,
|
||||
float fogColorStartR, float fogColorStartG, float fogColorStartB, float fogColorStartA,
|
||||
float fogColorEndR, float fogColorEndG, float fogColorEndB, float fogColorEndA,
|
||||
float fogColorDuo,
|
||||
float skyboxFogIntensity, float skyboxFogHeight,
|
||||
float skyboxFogFalloff, float skyboxFogOffset,
|
||||
float skyboxFogBottom, float skyboxFogFill)
|
||||
{
|
||||
DTMGlobalFog globalFog = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMGlobalFog>();
|
||||
|
||||
globalFog.fogIntensity = fogIntensity;
|
||||
|
||||
globalFog.fogColorStartR = fogColorStartR;
|
||||
globalFog.fogColorStartG = fogColorStartG;
|
||||
globalFog.fogColorStartB = fogColorStartB;
|
||||
globalFog.fogColorStartA = fogColorStartA;
|
||||
|
||||
globalFog.fogColorEndR = fogColorEndR;
|
||||
globalFog.fogColorEndG = fogColorEndG;
|
||||
globalFog.fogColorEndB = fogColorEndB;
|
||||
globalFog.fogColorEndA = fogColorEndA;
|
||||
|
||||
globalFog.fogColorDuo = fogColorDuo;
|
||||
|
||||
globalFog.skyboxFogIntensity = skyboxFogIntensity;
|
||||
globalFog.skyboxFogHeight = skyboxFogHeight;
|
||||
globalFog.skyboxFogFalloff = skyboxFogFalloff;
|
||||
globalFog.skyboxFogOffset = skyboxFogOffset;
|
||||
globalFog.skyboxFogBottom = skyboxFogBottom;
|
||||
globalFog.skyboxFogFill = skyboxFogFill;
|
||||
|
||||
return globalFog;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
if (heightFogGlobal == null)
|
||||
{
|
||||
heightFogGlobal = GetComponentInChildren<HeightFogGlobal>();
|
||||
heightFogGlobal.mainCamera = GameManager.Instance.cameraManager.gameCamera.cam;
|
||||
}
|
||||
|
||||
// Ensure fog mode is set to script settings so it accepts our overrides
|
||||
if (heightFogGlobal != null)
|
||||
{
|
||||
heightFogGlobal.fogMode = FogMode.UseScriptSettings;
|
||||
}
|
||||
|
||||
UpdateFogProperties();
|
||||
}
|
||||
|
||||
public override void OnDirtyRefresh(Dictionary<string, bool> flags)
|
||||
{
|
||||
UpdateFogProperties();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [效果核心逻辑] Core Effect Logic
|
||||
private void UpdateFogProperties()
|
||||
{
|
||||
if (heightFogGlobal == null) return;
|
||||
|
||||
heightFogGlobal.fogIntensity = fogIntensity;
|
||||
heightFogGlobal.fogColorStart = new Color(fogColorStartR, fogColorStartG, fogColorStartB, fogColorStartA);
|
||||
heightFogGlobal.fogColorEnd = new Color(fogColorEndR, fogColorEndG, fogColorEndB, fogColorEndA);
|
||||
|
||||
heightFogGlobal.fogColorDuo = fogColorDuo;
|
||||
heightFogGlobal.skyboxFogIntensity = skyboxFogIntensity;
|
||||
heightFogGlobal.skyboxFogHeight = skyboxFogHeight;
|
||||
heightFogGlobal.skyboxFogFalloff = skyboxFogFalloff;
|
||||
heightFogGlobal.skyboxFogOffset = skyboxFogOffset;
|
||||
heightFogGlobal.skyboxFogBottom = skyboxFogBottom;
|
||||
heightFogGlobal.skyboxFogFill = skyboxFogFill;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -94,12 +94,12 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
enableTimes.UpdateFlexibleBool(songTime);
|
||||
if(enableTimes.value && !isHeadEnabled)
|
||||
{
|
||||
EnableHead();
|
||||
//EnableHead();
|
||||
isHeadEnabled = true;
|
||||
}
|
||||
else if(!enableTimes.value && isHeadEnabled)
|
||||
{
|
||||
DisableHead();
|
||||
//DisableHead();
|
||||
isHeadEnabled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user