forked from sin365/AxibugEmuOnline
为Rom下载完毕时增加一个闪光效果
This commit is contained in:
parent
67c0a47fe3
commit
e2da8ce405
@ -2,20 +2,24 @@
|
|||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!21 &2100000
|
--- !u!21 &2100000
|
||||||
Material:
|
Material:
|
||||||
serializedVersion: 6
|
serializedVersion: 8
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: UI-Effect-Shiny
|
m_Name: UI-Effect-Shiny
|
||||||
m_Shader: {fileID: 4800000, guid: 20ffe76c2439c403aabdd25bd94bf011, type: 3}
|
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_LightmapFlags: 1
|
||||||
m_EnableInstancingVariants: 0
|
m_EnableInstancingVariants: 0
|
||||||
m_DoubleSidedGI: 0
|
m_DoubleSidedGI: 0
|
||||||
m_CustomRenderQueue: -1
|
m_CustomRenderQueue: -1
|
||||||
stringTagMap: {}
|
stringTagMap: {}
|
||||||
disabledShaderPasses: []
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
@ -27,6 +31,7 @@ Material:
|
|||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
@ -38,3 +43,4 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
@ -813,6 +813,7 @@ MonoBehaviour:
|
|||||||
DownloadingFlag: {fileID: 1252956242765037133}
|
DownloadingFlag: {fileID: 1252956242765037133}
|
||||||
DownProgress: {fileID: 1484915906009859069}
|
DownProgress: {fileID: 1484915906009859069}
|
||||||
FileReadyFlag: {fileID: 6316945668089981796}
|
FileReadyFlag: {fileID: 6316945668089981796}
|
||||||
|
DownloadComplete: {fileID: 6633045760783967661}
|
||||||
--- !u!114 &5700455559359757662
|
--- !u!114 &5700455559359757662
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -998,6 +999,7 @@ GameObject:
|
|||||||
- component: {fileID: 8105925540140519754}
|
- component: {fileID: 8105925540140519754}
|
||||||
- component: {fileID: 1377401926964550360}
|
- component: {fileID: 1377401926964550360}
|
||||||
- component: {fileID: 67125096702760250}
|
- component: {fileID: 67125096702760250}
|
||||||
|
- component: {fileID: 6633045760783967661}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: RomImage
|
m_Name: RomImage
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -1065,6 +1067,39 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
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
|
--- !u!1 &5340761592919397836
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -79,6 +79,11 @@
|
|||||||
/// 当本机手柄渴望插入时触发
|
/// 当本机手柄渴望插入时触发
|
||||||
/// <para>参数: <see cref="int"/> 本地手柄序号[0,3]</para>
|
/// <para>参数: <see cref="int"/> 本地手柄序号[0,3]</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
OnLocalJoyDesireInvert
|
OnLocalJoyDesireInvert,
|
||||||
|
/// <summary>
|
||||||
|
/// 当Rom文件下载完毕时触发
|
||||||
|
/// <para><see cref="int"/>RomID</para>
|
||||||
|
/// </summary>
|
||||||
|
OnRomFileDownloaded,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
|
using AxibugEmuOnline.Client.Event;
|
||||||
using AxibugProtobuf;
|
using AxibugProtobuf;
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using System;
|
using System;
|
||||||
@ -79,6 +80,8 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
File.WriteAllBytes(LocalFilePath, bytes);
|
File.WriteAllBytes(LocalFilePath, bytes);
|
||||||
hasLocalFile = true;
|
hasLocalFile = true;
|
||||||
|
|
||||||
|
Eventer.Instance.PostEvent(EEvent.OnRomFileDownloaded, ID);
|
||||||
}
|
}
|
||||||
OnDownloadOver?.Invoke(this);
|
OnDownloadOver?.Invoke(this);
|
||||||
}));
|
}));
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
|
using AxibugEmuOnline.Client.Event;
|
||||||
using AxibugEmuOnline.Client.UI;
|
using AxibugEmuOnline.Client.UI;
|
||||||
|
using Coffee.UIExtensions;
|
||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
@ -16,12 +19,31 @@ namespace AxibugEmuOnline.Client
|
|||||||
Slider DownProgress;
|
Slider DownProgress;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
GameObject FileReadyFlag;
|
GameObject FileReadyFlag;
|
||||||
|
[SerializeField]
|
||||||
|
UIShiny DownloadComplete;
|
||||||
|
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
|
|
||||||
private RomLib m_romlib => App.nesRomLib;
|
private RomLib m_romlib => App.nesRomLib;
|
||||||
private RomFile m_romfile;
|
private RomFile m_romfile;
|
||||||
|
|
||||||
|
protected override void OnEnable()
|
||||||
|
{
|
||||||
|
Eventer.Instance.RegisterEvent<int>(EEvent.OnRomFileDownloaded, OnRomDownloaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDisable()
|
||||||
|
{
|
||||||
|
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRomFileDownloaded, OnRomDownloaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnRomDownloaded(int romID)
|
||||||
|
{
|
||||||
|
if (m_romfile == null || m_romfile.ID != romID) return;
|
||||||
|
|
||||||
|
DownloadComplete.Play();
|
||||||
|
}
|
||||||
|
|
||||||
public void SetData(object data)
|
public void SetData(object data)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user