111
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
|
||||
public class CopyHotDll
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
using static UnityEngine.Rendering.VirtualTexturing.Debugging;
|
||||
|
||||
public class Boot : MonoBehaviour
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
public class MainOperation
|
||||
@@ -48,7 +46,7 @@ public class MainOperation
|
||||
private void OnDownloadUpdate(DownloadUpdateData downloadUpdateData)
|
||||
{
|
||||
float progress = (float)downloadUpdateData.CurrentDownloadBytes / downloadUpdateData.TotalDownloadBytes;
|
||||
string sizeText = $"{(downloadUpdateData.CurrentDownloadBytes / 1024f / 1024f):F1}MB / {(downloadUpdateData.TotalDownloadBytes / 1024f / 1024f):F1}MB";
|
||||
string sizeText = $"{operation.FormatFileSize(downloadUpdateData.CurrentDownloadBytes)} / {operation.FormatFileSize(downloadUpdateData.TotalDownloadBytes)}";
|
||||
PatchEvent.UpdateProgress(progress);
|
||||
PatchEvent.UpdateDownloadSize(sizeText);
|
||||
PatchEvent.UpdateStatus($"{data.packageName} 资源下载中...");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public static class PatchEvent
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using UnityEngine;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using YooAsset;
|
||||
public class PatchManager : Singleton<PatchManager>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public class Singleton<T> where T:class,new()
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using R3;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SimpleR3Test : MonoBehaviour
|
||||
{
|
||||
BindableReactiveProperty<float> value = new(0);
|
||||
public SerializableReactiveProperty<float> value = new(0);
|
||||
|
||||
public InputField inputField;
|
||||
public Scrollbar scrollbar;
|
||||
|
||||
@@ -8,15 +8,15 @@ namespace R3
|
||||
{
|
||||
public static class UnityUIBindings
|
||||
{
|
||||
public static IDisposable SubscribeToScrollbar(this Observable<float> source, Scrollbar scrollbar)
|
||||
public static IDisposable SubscribeToScrollbar(this ReactiveProperty<float> source, Scrollbar scrollbar)
|
||||
{
|
||||
return source.Subscribe(scrollbar, static (x, s) => s.value = x);
|
||||
}
|
||||
public static IDisposable SubscribeToText(this Observable<float> source, InputField inputField)
|
||||
public static IDisposable SubscribeToText(this ReactiveProperty<float> source, InputField inputField)
|
||||
{
|
||||
return source.Subscribe(inputField, static (x, t) => t.text = x.ToString());
|
||||
}
|
||||
public static IDisposable BindToScrollbar(this BindableReactiveProperty<float> source, Scrollbar scrollbar)
|
||||
public static IDisposable BindToScrollbar(this ReactiveProperty<float> source, Scrollbar scrollbar)
|
||||
{
|
||||
var disposable = new CompositeDisposable();
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace R3
|
||||
|
||||
return disposable;
|
||||
}
|
||||
public static IDisposable BindToInputField(this BindableReactiveProperty<float> source, InputField inputField)
|
||||
public static IDisposable BindToInputField(this ReactiveProperty<float> source, InputField inputField)
|
||||
{
|
||||
var disposable = new CompositeDisposable();
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user