private void buildSettingData() { setting.platformURLPrefix = "https://dl.dropboxusercontent.com/u/86805032/AssetBundle"; setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.Android, "Android")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.BlackBerryPlayer, "BlackBerry")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.NaCl, "GoogleNative")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.IPhonePlayer, "iOS")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.LinuxPlayer, "Linux")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.MetroPlayerARM, "Metro")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.OSXDashboardPlayer, "OSXIntel")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.OSXWebPlayer, "WebPlayer")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.WindowsPlayer, "Windows")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.WP8Player, "WindowsPhone8")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.FlashPlayer, "Flash")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.TizenPlayer, "Tizen")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.PS3, "PS3")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.XBOX360, "XBOX360")); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.MetroPlayerX64, setting.GetPlatformURL(RuntimePlatform.MetroPlayerARM))); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.MetroPlayerX86, setting.GetPlatformURL(RuntimePlatform.MetroPlayerARM))); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.WindowsWebPlayer, setting.GetPlatformURL(RuntimePlatform.OSXWebPlayer))); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.OSXEditor, setting.GetPlatformURL(RuntimePlatform.OSXDashboardPlayer))); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.OSXPlayer, setting.GetPlatformURL(RuntimePlatform.OSXDashboardPlayer))); setting.platformURL.Add(new Pair <RuntimePlatform, string>(RuntimePlatform.WindowsEditor, setting.GetPlatformURL(RuntimePlatform.WindowsPlayer))); { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Boot).FullName, null); scene.files.Add("Mapchip"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Base).FullName, "Adv-1"); scene.files.Add("System"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Base).FullName, "Adv-2"); scene.files.Add("Prefab"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Title).FullName, null); sceneList.Add(scene); } { SerializeData.Sequence sequence = new SerializeData.Sequence("Boot"); sequence.sceneList.Add(sceneList[0].name); sequence.sceneList.Add(sceneList[3].name); sequence.Next("LoopDemo"); sequenceList.Add(sequence); } { SerializeData.Sequence sequence = new SerializeData.Sequence("LoopDemo"); sequence.sceneList.Add(sceneList[1].name); sequence.sceneList.Add(sceneList[2].name); sequence.isLoop = true; sequenceList.Add(sequence); } }
private void buildSettingData() { setting.platformURLPrefix = "https://dl.dropboxusercontent.com/u/86805032/AssetBundle"; setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.Android ,"Android")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.BlackBerryPlayer ,"BlackBerry")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.NaCl ,"GoogleNative")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.IPhonePlayer ,"iOS")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.LinuxPlayer ,"Linux")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.MetroPlayerARM ,"Metro")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.OSXDashboardPlayer ,"OSXIntel")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.OSXWebPlayer ,"WebPlayer")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.WindowsPlayer ,"Windows")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.WP8Player ,"WindowsPhone8")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.FlashPlayer ,"Flash")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.TizenPlayer ,"Tizen")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.PS3 ,"PS3")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.XBOX360 ,"XBOX360")); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.MetroPlayerX64 ,setting.GetPlatformURL(RuntimePlatform.MetroPlayerARM))); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.MetroPlayerX86 ,setting.GetPlatformURL(RuntimePlatform.MetroPlayerARM))); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.WindowsWebPlayer ,setting.GetPlatformURL(RuntimePlatform.OSXWebPlayer))); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.OSXEditor ,setting.GetPlatformURL(RuntimePlatform.OSXDashboardPlayer))); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.OSXPlayer ,setting.GetPlatformURL(RuntimePlatform.OSXDashboardPlayer))); setting.platformURL.Add(new Pair<RuntimePlatform,string>(RuntimePlatform.WindowsEditor ,setting.GetPlatformURL(RuntimePlatform.WindowsPlayer))); { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Boot).FullName, null); scene.files.Add("Mapchip"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Base).FullName, "Adv-1"); scene.files.Add("System"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Base).FullName, "Adv-2"); scene.files.Add("Prefab"); sceneList.Add(scene); } { SerializeData.Scene scene = new SerializeData.Scene(typeof(Scene.Title).FullName, null); sceneList.Add(scene); } { SerializeData.Sequence sequence = new SerializeData.Sequence("Boot"); sequence.sceneList.Add(sceneList[0].name); sequence.sceneList.Add(sceneList[3].name); sequence.Next("LoopDemo"); sequenceList.Add(sequence); } { SerializeData.Sequence sequence = new SerializeData.Sequence("LoopDemo"); sequence.sceneList.Add(sceneList[1].name); sequence.sceneList.Add(sceneList[2].name); sequence.isLoop = true; sequenceList.Add(sequence); } }
public void Initialize(SerializeData.Scene serializeData) { count = 0; endStatus = EndStatus.NEXT; data = serializeData; }
/// <summary> /// シーケンス実体 </summary> private IEnumerator Coroutine() { for (;;) { Debug.Log(currentSequence.data.sceneList[currentSequence.sceneIndex] + " index:" + currentSequence.sceneIndex); { SerializeData.Scene data = Resource.Instance.sceneList.Find(delegate(SerializeData.Scene s) { return(s.name == currentSequence.data.sceneList[currentSequence.sceneIndex]); }); currentScene = (Scene.Base)Activator.CreateInstance(WrapClass.GetType(data.functionName)); currentScene.Initialize(data); } currentScene.RequestLoad(ref GetComponent <FileAssetBundle> ().blockList); do { yield return(null); } while (GetComponent <FileAssetBundle> ().blockList.Find(delegate(Asset.Block block) { return(block.IsRead() == false); }) != null); currentScene.RequestStart(); do { if (currentScene.IsDone()) { break; } yield return(null); } while (true); currentScene.RequestUnload(); do { if (currentScene.IsUnload()) { break; } yield return(null); } while (true); switch (currentScene.endStatus) { case Scene.EndStatus.NEXT: if (currentSequence.sceneIndex < currentSequence.data.sceneList.Count - 1) { ++currentSequence.sceneIndex; } else { if (currentSequence.data.isLoop) { currentSequence.sceneIndex = 0; } else { if (currentSequence.data.next != string.Empty) { SerializeData.Sequence tmp = Resource.Instance.sequenceList.Find(delegate(SerializeData.Sequence seq) { return(seq.name == currentSequence.data.next); }); if (tmp != null) { currentSequence = new SequenceInfo(tmp); myStack.Push(currentSequence); } else { Debug.Log("no sequence"); } } else { if (myStack.Count > 1) { currentSequence = myStack.Pop(); } else { Debug.Log("root stack no back sequence"); } } } } break; case Scene.EndStatus.BACK: if (currentSequence.sceneIndex != 0) { --currentSequence.sceneIndex; } else { if (myStack.Count > 1) { currentSequence = myStack.Pop(); } else { Debug.Log("root stack no back sequence"); } } break; case Scene.EndStatus.ABORT: break; } Resources.UnloadUnusedAssets(); GC.Collect(); } }