public static SplitCondition MusicChange(int oldMusicId, int newMusicId) { Music?oldMusic = StaticData.GetMusic(oldMusicId); Music?newMusic = StaticData.GetMusic(newMusicId); var oldMusicExtended = oldMusic.HasValue ? ExtendedOptions <Music> .Enum(oldMusic.Value) : ExtendedOptions <Music> .Option(ParameterOptions.Any); var newMusicExtended = newMusic.HasValue ? ExtendedOptions <Music> .Enum(newMusic.Value) : ExtendedOptions <Music> .Option(ParameterOptions.Any); return(new SplitCondition() { TriggerType = SplitTrigger.MusicChange, MusicTypeFrom = oldMusicExtended, MusicTypeTo = newMusicExtended }); }
public static SplitCondition MapChange(int oldMapId, int newMapId) { Map?oldMap = StaticData.GetMap(oldMapId); Map?newMap = StaticData.GetMap(newMapId); var oldMapExtended = oldMap.HasValue ? ExtendedOptions <Map> .Enum(oldMap.Value) : ExtendedOptions <Map> .Option(ParameterOptions.Any); var newMapExtended = newMap.HasValue ? ExtendedOptions <Map> .Enum(newMap.Value) : ExtendedOptions <Map> .Option(ParameterOptions.Any); return(new SplitCondition() { TriggerType = SplitTrigger.MapChange, MapTypeFrom = oldMapExtended, MapTypeTo = newMapExtended }); }