修改本体,添加CrossTrackPoint兼容层,兼容StaticTrack Hold,为难度选项扩增全屏可选,添加和调整某些谱面
Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
8
Assets/Scripts/DataCore/DataTypes/ES3Types.meta
Normal file
8
Assets/Scripts/DataCore/DataTypes/ES3Types.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d864bbb5c0709643b7ac651fbf00311
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
|
||||
namespace ES3Types
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
public class ES3Type_FlexibleBool_BM : ES3ObjectType
|
||||
{
|
||||
public static ES3Type Instance = null;
|
||||
|
||||
public ES3Type_FlexibleBool_BM() : base(typeof(FlexibleBool_BM))
|
||||
{
|
||||
Instance = this;
|
||||
priority = 1;
|
||||
}
|
||||
|
||||
protected override void WriteObject(object obj, ES3Writer writer)
|
||||
{
|
||||
var instance = (FlexibleBool_BM)obj;
|
||||
writer.WriteProperty("animatedBoolList", instance.animatedBoolList);
|
||||
}
|
||||
|
||||
protected override void ReadObject<T>(ES3Reader reader, object obj)
|
||||
{
|
||||
var instance = (FlexibleBool_BM)obj;
|
||||
foreach (string propertyName in reader.Properties)
|
||||
{
|
||||
switch (propertyName)
|
||||
{
|
||||
case "animatedBoolList":
|
||||
case "animations":
|
||||
instance.animatedBoolList = reader.Read<List<AnimatedBool>>();
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
instance.animatedBoolList ??= new List<AnimatedBool>();
|
||||
}
|
||||
|
||||
protected override object ReadObject<T>(ES3Reader reader)
|
||||
{
|
||||
var instance = new FlexibleBool_BM();
|
||||
ReadObject<T>(reader, instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d28b97050e8b4b418d3cb79369e51a2
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
|
||||
namespace ES3Types
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
public class ES3Type_FlexibleFloat_BM : ES3ObjectType
|
||||
{
|
||||
public static ES3Type Instance = null;
|
||||
|
||||
public ES3Type_FlexibleFloat_BM() : base(typeof(FlexibleFloat_BM))
|
||||
{
|
||||
Instance = this;
|
||||
priority = 1;
|
||||
}
|
||||
|
||||
protected override void WriteObject(object obj, ES3Writer writer)
|
||||
{
|
||||
var instance = (FlexibleFloat_BM)obj;
|
||||
writer.WriteProperty("animatedFloatList", instance.animatedFloatList);
|
||||
}
|
||||
|
||||
protected override void ReadObject<T>(ES3Reader reader, object obj)
|
||||
{
|
||||
var instance = (FlexibleFloat_BM)obj;
|
||||
foreach (string propertyName in reader.Properties)
|
||||
{
|
||||
switch (propertyName)
|
||||
{
|
||||
case "animatedFloatList":
|
||||
case "animations":
|
||||
instance.animatedFloatList = reader.Read<List<AnimatedFloat>>();
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
instance.animatedFloatList ??= new List<AnimatedFloat>();
|
||||
}
|
||||
|
||||
protected override object ReadObject<T>(ES3Reader reader)
|
||||
{
|
||||
var instance = new FlexibleFloat_BM();
|
||||
ReadObject<T>(reader, instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44246e8e433f04748926353a4242ef0b
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
|
||||
namespace ES3Types
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
public class ES3Type_FlexibleInt_BM : ES3ObjectType
|
||||
{
|
||||
public static ES3Type Instance = null;
|
||||
|
||||
public ES3Type_FlexibleInt_BM() : base(typeof(FlexibleInt_BM))
|
||||
{
|
||||
Instance = this;
|
||||
priority = 1;
|
||||
}
|
||||
|
||||
protected override void WriteObject(object obj, ES3Writer writer)
|
||||
{
|
||||
var instance = (FlexibleInt_BM)obj;
|
||||
writer.WriteProperty("animatedIntList", instance.animatedIntList);
|
||||
}
|
||||
|
||||
protected override void ReadObject<T>(ES3Reader reader, object obj)
|
||||
{
|
||||
var instance = (FlexibleInt_BM)obj;
|
||||
foreach (string propertyName in reader.Properties)
|
||||
{
|
||||
switch (propertyName)
|
||||
{
|
||||
case "animatedIntList":
|
||||
case "animations":
|
||||
instance.animatedIntList = reader.Read<List<AnimatedInt>>();
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
instance.animatedIntList ??= new List<AnimatedInt>();
|
||||
}
|
||||
|
||||
protected override object ReadObject<T>(ES3Reader reader)
|
||||
{
|
||||
var instance = new FlexibleInt_BM();
|
||||
ReadObject<T>(reader, instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 526f6c8e10ef19448b07a14433c76b5c
|
||||
8
Assets/Scripts/DataCore/ES3Types.meta
Normal file
8
Assets/Scripts/DataCore/ES3Types.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3fedf623afb11744ad76c6d4fb5994c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
106
Assets/Scripts/DataCore/ES3Types/ES3Type_CrossTrackPoint_BM.cs
Normal file
106
Assets/Scripts/DataCore/ES3Types/ES3Type_CrossTrackPoint_BM.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
|
||||
namespace ES3Types
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
[ES3Properties("attachedElementGuid", "elementName", "tags", "elementGuid", "trackSwitch", "trackPercent")]
|
||||
public class ES3Type_CrossTrackPoint_BM : ES3ObjectType
|
||||
{
|
||||
public static ES3Type Instance = null;
|
||||
|
||||
public ES3Type_CrossTrackPoint_BM() : base(typeof(CrossTrackPoint_BM))
|
||||
{
|
||||
Instance = this;
|
||||
priority = 1;
|
||||
}
|
||||
|
||||
protected override void WriteObject(object obj, ES3Writer writer)
|
||||
{
|
||||
var instance = (CrossTrackPoint_BM)obj;
|
||||
instance.NormalizeFlexibleFields();
|
||||
|
||||
writer.WriteProperty("attachedElementGuid", instance.attachedElementGuid, ES3Type_Guid.Instance);
|
||||
writer.WriteProperty("elementName", instance.elementName, ES3Type_string.Instance);
|
||||
writer.WriteProperty("tags", instance.tags);
|
||||
writer.WriteProperty("elementGuid", instance.elementGuid, ES3Type_Guid.Instance);
|
||||
writer.WriteProperty("trackSwitch", instance.trackSwitch);
|
||||
writer.WriteProperty("trackPercent", instance.trackPercent);
|
||||
}
|
||||
|
||||
protected override void ReadObject<T>(ES3Reader reader, object obj)
|
||||
{
|
||||
var instance = (CrossTrackPoint_BM)obj;
|
||||
foreach (string propertyName in reader.Properties)
|
||||
{
|
||||
switch (propertyName)
|
||||
{
|
||||
case "attachedElementGuid":
|
||||
instance.attachedElementGuid = reader.Read<Guid>(ES3Type_Guid.Instance);
|
||||
break;
|
||||
case "elementName":
|
||||
instance.elementName = reader.Read<string>(ES3Type_string.Instance);
|
||||
break;
|
||||
case "tags":
|
||||
instance.tags = reader.Read<List<string>>();
|
||||
break;
|
||||
case "elementGuid":
|
||||
instance.elementGuid = reader.Read<Guid>(ES3Type_Guid.Instance);
|
||||
break;
|
||||
case "trackSwitch":
|
||||
instance.trackSwitch = ReadFlexibleIntBM(reader);
|
||||
break;
|
||||
case "trackPercent":
|
||||
instance.trackPercent = ReadFlexibleFloatBM(reader);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
instance.NormalizeFlexibleFields();
|
||||
}
|
||||
|
||||
protected override object ReadObject<T>(ES3Reader reader)
|
||||
{
|
||||
var instance = new CrossTrackPoint_BM();
|
||||
ReadObject<T>(reader, instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static FlexibleInt_BM ReadFlexibleIntBM(ES3Reader reader)
|
||||
{
|
||||
return EnsureFlexibleIntBM(reader.Read<FlexibleInt_BM>() ?? new FlexibleInt_BM());
|
||||
}
|
||||
|
||||
private static FlexibleFloat_BM ReadFlexibleFloatBM(ES3Reader reader)
|
||||
{
|
||||
return EnsureFlexibleFloatBM(reader.Read<FlexibleFloat_BM>() ?? new FlexibleFloat_BM());
|
||||
}
|
||||
|
||||
private static FlexibleInt_BM EnsureFlexibleIntBM(FlexibleInt_BM value)
|
||||
{
|
||||
value.animatedIntList ??= new List<AnimatedInt>();
|
||||
return value;
|
||||
}
|
||||
|
||||
private static FlexibleFloat_BM EnsureFlexibleFloatBM(FlexibleFloat_BM value)
|
||||
{
|
||||
value.animatedFloatList ??= new List<AnimatedFloat>();
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public class ES3Type_CrossTrackPoint_BMArray : ES3ArrayType
|
||||
{
|
||||
public static ES3Type Instance;
|
||||
|
||||
public ES3Type_CrossTrackPoint_BMArray() : base(typeof(CrossTrackPoint_BM[]), ES3Type_CrossTrackPoint_BM.Instance)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89971996fb6f16743b057517ae4b87a7
|
||||
@@ -21,7 +21,7 @@ namespace Ichni.RhythmGame.Beatmap
|
||||
#if UNITY_STANDALONE
|
||||
return new FullScreenNearTimeJudgeUnit(attachedNote);
|
||||
#elif UNITY_ANDROID || UNITY_IOS
|
||||
if (SettingsManager.instance.gameSettings.judgeType)
|
||||
if (SettingsManager.instance.gameSettings.ShouldUseFullScreenJudge())
|
||||
{
|
||||
return new FullScreenNearTimeJudgeUnit(attachedNote);
|
||||
}
|
||||
@@ -29,6 +29,10 @@ namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
return new TouchAreaJudgeUnit(attachedNote, areaRadius);
|
||||
}
|
||||
#else
|
||||
return SettingsManager.instance.gameSettings.ShouldUseFullScreenJudge()
|
||||
? new FullScreenNearTimeJudgeUnit(attachedNote)
|
||||
: new TouchAreaJudgeUnit(attachedNote, areaRadius);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class CrossTrackPoint_BM : GameElement_BM
|
||||
{
|
||||
public FlexibleInt trackSwitch;
|
||||
public FlexibleFloat trackPercent;
|
||||
public FlexibleInt_BM trackSwitch;
|
||||
public FlexibleFloat_BM trackPercent;
|
||||
|
||||
public CrossTrackPoint_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CrossTrackPoint_BM(string elementName, Guid elementGuid, System.Collections.Generic.List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleInt trackSwitch, FlexibleFloat trackPercent)
|
||||
public CrossTrackPoint_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleInt_BM trackSwitch, FlexibleFloat_BM trackPercent)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.trackSwitch = trackSwitch;
|
||||
this.trackPercent = trackPercent;
|
||||
}
|
||||
|
||||
public CrossTrackPoint_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleInt trackSwitch, FlexibleFloat trackPercent)
|
||||
: this(elementName, elementGuid, tags, attachedElement, trackSwitch?.ConvertToBM(), trackPercent?.ConvertToBM())
|
||||
{
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
NormalizeFlexibleFields();
|
||||
matchedElement = CrossTrackPoint.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid) as ElementFolder, trackSwitch, trackPercent);
|
||||
GetElement(attachedElementGuid) as ElementFolder,
|
||||
trackSwitch?.ConvertToGameType() ?? new FlexibleInt(),
|
||||
trackPercent?.ConvertToGameType() ?? new FlexibleFloat());
|
||||
}
|
||||
|
||||
internal void NormalizeFlexibleFields()
|
||||
{
|
||||
trackSwitch ??= new FlexibleInt_BM();
|
||||
trackSwitch.animatedIntList ??= new List<AnimatedInt>();
|
||||
|
||||
trackPercent ??= new FlexibleFloat_BM();
|
||||
trackPercent.animatedFloatList ??= new List<AnimatedFloat>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user