diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect-Shiny.mat b/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect-Shiny.mat
index 5ddad0b0..45a05a66 100644
--- a/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect-Shiny.mat
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Coffee/UIExtensions/UIEffect/Materials/UI-Effect-Shiny.mat
@@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
- serializedVersion: 6
+ serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI-Effect-Shiny
m_Shader: {fileID: 4800000, guid: 20ffe76c2439c403aabdd25bd94bf011, type: 3}
- m_ShaderKeywords:
+ m_Parent: {fileID: 0}
+ m_ModifiedSerializedProperties: 0
+ m_ValidKeywords: []
+ m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
+ m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@@ -27,6 +31,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
+ m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
@@ -38,3 +43,4 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
+ m_AllowLocking: 1
diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/VirtualItemTemplates/RomItemTemplate.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/VirtualItemTemplates/RomItemTemplate.prefab
index 85316e28..e90a36b5 100644
--- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/VirtualItemTemplates/RomItemTemplate.prefab
+++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/VirtualItemTemplates/RomItemTemplate.prefab
@@ -813,6 +813,7 @@ MonoBehaviour:
DownloadingFlag: {fileID: 1252956242765037133}
DownProgress: {fileID: 1484915906009859069}
FileReadyFlag: {fileID: 6316945668089981796}
+ DownloadComplete: {fileID: 6633045760783967661}
--- !u!114 &5700455559359757662
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -998,6 +999,7 @@ GameObject:
- component: {fileID: 8105925540140519754}
- component: {fileID: 1377401926964550360}
- component: {fileID: 67125096702760250}
+ - component: {fileID: 6633045760783967661}
m_Layer: 5
m_Name: RomImage
m_TagString: Untagged
@@ -1065,6 +1067,39 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
+--- !u!114 &6633045760783967661
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4643603390456494410}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: f19b7e2285c104f6ca47d583f3e5444f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Version: 300
+ m_EffectMaterial: {fileID: 2100000, guid: 9dc7e810a87b444ab96919f3215c2fe5, type: 2}
+ m_EffectFactor: 0
+ m_Width: 0.25
+ m_Rotation: -41
+ m_Softness: 1
+ m_Brightness: 1
+ m_Gloss: 1
+ m_EffectArea: 0
+ m_Player:
+ play: 0
+ initialPlayDelay: 0
+ duration: 0.5
+ loop: 0
+ loopDelay: 1
+ updateMode: 0
+ m_Play: 0
+ m_Loop: 0
+ m_Duration: 1
+ m_LoopDelay: 1
+ m_UpdateMode: 0
--- !u!1 &5340761592919397836
GameObject:
m_ObjectHideFlags: 0
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Event/EEvent.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Event/EEvent.cs
index 2814d838..f8ce5994 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Event/EEvent.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Event/EEvent.cs
@@ -79,6 +79,11 @@
/// 当本机手柄渴望插入时触发
/// 参数: 本地手柄序号[0,3]
///
- OnLocalJoyDesireInvert
+ OnLocalJoyDesireInvert,
+ ///
+ /// 当Rom文件下载完毕时触发
+ /// RomID
+ ///
+ OnRomFileDownloaded,
}
}
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
index 425828bd..73b7059f 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
@@ -1,4 +1,5 @@
using AxibugEmuOnline.Client.ClientCore;
+using AxibugEmuOnline.Client.Event;
using AxibugProtobuf;
using ICSharpCode.SharpZipLib.Zip;
using System;
@@ -79,6 +80,8 @@ namespace AxibugEmuOnline.Client
File.WriteAllBytes(LocalFilePath, bytes);
hasLocalFile = true;
+
+ Eventer.Instance.PostEvent(EEvent.OnRomFileDownloaded, ID);
}
OnDownloadOver?.Invoke(this);
}));
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs
index 9cba870d..297c4304 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomItem.cs
@@ -1,5 +1,8 @@
using AxibugEmuOnline.Client.ClientCore;
+using AxibugEmuOnline.Client.Event;
using AxibugEmuOnline.Client.UI;
+using Coffee.UIExtensions;
+using System;
using UnityEngine;
using UnityEngine.UI;
@@ -16,12 +19,31 @@ namespace AxibugEmuOnline.Client
Slider DownProgress;
[SerializeField]
GameObject FileReadyFlag;
+ [SerializeField]
+ UIShiny DownloadComplete;
public int Index { get; set; }
private RomLib m_romlib => App.nesRomLib;
private RomFile m_romfile;
+ protected override void OnEnable()
+ {
+ Eventer.Instance.RegisterEvent(EEvent.OnRomFileDownloaded, OnRomDownloaded);
+ }
+
+ protected override void OnDisable()
+ {
+ Eventer.Instance.UnregisterEvent(EEvent.OnRomFileDownloaded, OnRomDownloaded);
+ }
+
+ private void OnRomDownloaded(int romID)
+ {
+ if (m_romfile == null || m_romfile.ID != romID) return;
+
+ DownloadComplete.Play();
+ }
+
public void SetData(object data)
{
Reset();