Pull up IChartDetail.
This commit is contained in:
34
Assets/Cryville/Crtr/Browsing/Legacy/LegacyChartDetail.cs
Normal file
34
Assets/Cryville/Crtr/Browsing/Legacy/LegacyChartDetail.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Cryville.Common;
|
||||
using Cryville.Crtr.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.Crtr.Browsing.Legacy {
|
||||
public class LegacyChartDetail : IChartDetail, IResourceMeta {
|
||||
public AsyncDelivery<Texture2D> Cover { get; set; }
|
||||
public ChartMeta Meta { get; set; }
|
||||
|
||||
public string RulesetId { get { return Meta.ruleset; } }
|
||||
public string Name { get { return Meta.name; } }
|
||||
public string SongName { get { return Meta.song.name; } }
|
||||
public TimeSpan Length { get { return TimeSpan.FromSeconds(Meta.length); } }
|
||||
|
||||
public IEnumerable<MetaProperty> Properties {
|
||||
get {
|
||||
if (Meta == null) yield break;
|
||||
yield return new MetaProperty("Name", new Dictionary<string, object> {
|
||||
{ "", string.Format("{0} - {1}", SongName, Name) },
|
||||
{ "short", Name },
|
||||
{ "distinct-primary", SongName },
|
||||
{ "distinct-secondary", Name },
|
||||
});
|
||||
yield return new MetaProperty("Image", Cover);
|
||||
yield return new MetaProperty("Song.Author", Meta.song.author);
|
||||
yield return new MetaProperty("Author", Meta.author);
|
||||
yield return new MetaProperty("Length", Length);
|
||||
yield return new MetaProperty("NoteCount", Meta.note_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f9870328bccefa4d8d4f6d5e3cef591
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
305
Assets/Cryville/Crtr/Browsing/Legacy/LegacyResourceManager.cs
Normal file
305
Assets/Cryville/Crtr/Browsing/Legacy/LegacyResourceManager.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aac40491bc6619e47a5b81e6d9f1a5d3
|
||||
timeCreated: 1637975898
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user