-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
132 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
|
||
public class BaseUpdater : IUpdater | ||
{ | ||
public Action<string> onMessage; | ||
public void OnMessage(string msg) | ||
{ | ||
onMessage?.Invoke(msg); | ||
} | ||
|
||
public Action<float> onProgress; | ||
public void OnProgress(float progress) | ||
{ | ||
onProgress?.Invoke(progress); | ||
} | ||
|
||
public Action<string> onVersion; | ||
public void OnVersion(string ver) | ||
{ | ||
onVersion?.Invoke(ver); | ||
} | ||
|
||
public Action<float> onLoadSceneProgress; | ||
public void OnLoadSceneProgress(float progress) | ||
{ | ||
onLoadSceneProgress?.Invoke(progress); | ||
} | ||
|
||
public Action onLoadSceneFinish; | ||
public void OnLoadSceneFinish() | ||
{ | ||
onLoadSceneFinish?.Invoke(); | ||
} | ||
|
||
public Action onUpdateFailed; | ||
public void OnUpdateFailed() | ||
{ | ||
onUpdateFailed?.Invoke(); | ||
} | ||
|
||
|
||
public BaseUpdater(Action<string> onMessage, Action<float> onProgress, Action<string> onVersion, Action<float> onLoadSceneProgress, Action onLoadSceneFinish, Action onUpdateFailed) | ||
{ | ||
this.onMessage = onMessage; | ||
this.onProgress = onProgress; | ||
this.onVersion = onVersion; | ||
this.onLoadSceneProgress = onLoadSceneProgress; | ||
this.onLoadSceneFinish = onLoadSceneFinish; | ||
this.onUpdateFailed = onUpdateFailed; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
public interface IUpdater | ||
{ | ||
void OnMessage(string msg); | ||
|
||
void OnProgress(float progress); | ||
|
||
void OnVersion(string ver); | ||
|
||
void OnLoadSceneProgress(float progress); | ||
|
||
void OnLoadSceneFinish(); | ||
|
||
void OnUpdateFailed(); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.