【本地化】不在播放闪屏
parent
59cfcff035
commit
b72a502a9f
|
@ -87,34 +87,47 @@ public class GameStart : MonoBehaviour
|
|||
|
||||
void playSplash()
|
||||
{
|
||||
string path = AppConst.PersistentDataPath + "lz4/splashpanel.unity3d";
|
||||
if (!File.Exists(path))
|
||||
bool isShowSplash = false;
|
||||
if (isShowSplash)
|
||||
{
|
||||
path = AppConst.StreamPath + "lz4/splashpanel.unity3d";
|
||||
}
|
||||
bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength);
|
||||
GameObject gameObj = bundle.LoadAsset<GameObject>("SplashPanel");
|
||||
GameObject gameObj2 = Instantiate(gameObj, Vector3.zero, Quaternion.identity);
|
||||
Image image = gameObj2.transform.Find("Canvas/image").GetComponent<Image>();
|
||||
Image image2 = gameObj2.transform.Find("Canvas/image2").GetComponent<Image>();
|
||||
string path = AppConst.PersistentDataPath + "lz4/splashpanel.unity3d";
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
path = AppConst.StreamPath + "lz4/splashpanel.unity3d";
|
||||
}
|
||||
bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength);
|
||||
GameObject gameObj = bundle.LoadAsset<GameObject>("SplashPanel");
|
||||
GameObject gameObj2 = Instantiate(gameObj, Vector3.zero, Quaternion.identity);
|
||||
Image image = gameObj2.transform.Find("Canvas/image").GetComponent<Image>();
|
||||
Image image2 = gameObj2.transform.Find("Canvas/image2").GetComponent<Image>();
|
||||
|
||||
image2.DOFade(1, 0).OnComplete(() =>{
|
||||
image2.DOFade(0, 0).SetDelay(2).OnComplete(() =>{
|
||||
image.color = new Color(image.color.r, image.color.g, image.color.b, 0);
|
||||
image.DOFade(1, 1).OnComplete(() => {
|
||||
image.DOFade(0, 1).SetDelay(2).OnComplete(() => {
|
||||
DestroyImmediate(gameObj2);
|
||||
if (bundle != null) bundle.Unload(true);
|
||||
bundle = null;
|
||||
App.Instance.Initialize();
|
||||
UpdateManager.Instance.StartUp();
|
||||
//StartCoroutine(playMovice());
|
||||
image2.DOFade(1, 0).OnComplete(() => {
|
||||
image2.DOFade(0, 0).SetDelay(2).OnComplete(() => {
|
||||
image.color = new Color(image.color.r, image.color.g, image.color.b, 0);
|
||||
image.DOFade(1, 1).OnComplete(() => {
|
||||
image.DOFade(0, 1).SetDelay(2).OnComplete(() => {
|
||||
DestroyImmediate(gameObj2);
|
||||
if (bundle != null) bundle.Unload(true);
|
||||
bundle = null;
|
||||
StartGame();
|
||||
//StartCoroutine(playMovice());
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
StartGame();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void StartGame()
|
||||
{
|
||||
App.Instance.Initialize();
|
||||
UpdateManager.Instance.StartUp();
|
||||
}
|
||||
//IEnumerator playMovice()
|
||||
//{
|
||||
// Handheld.PlayFullScreenMovie("PV_v5_0521_1.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput);
|
||||
|
|
Loading…
Reference in New Issue