예제 #1
0
        public override void OnSet(object data)
        {
            base.OnSet(data);
            List <object> objs = data as List <object>;
            Dictionary <string, object> intent  = Util.GetListObject <Dictionary <string, object> > (objs);
            List <GameObject>           prefabs = Util.GetListObjects <GameObject> (objs);

            HellgateQuestDataEx qData = intent ["data"] as HellgateQuestDataEx;

            rUser = Instantiate(Util.FindGameObject(prefabs, qData._User.Prefab));
            rUser.transform.parent        = Camera.main.transform;
            rUser.transform.localPosition = new Vector3(0, 0, 0);
            rUser.GetComponent <HellgateUserEx> ().speed = qData._User.Speed;

            missiles = new List <GameObject> ();
            for (int i = 0; i < qData._Missile.Count; i++)
            {
                GameObject temp = Util.FindGameObject(prefabs, qData._Missile [i].Prefab);
                temp.GetComponent <HellgateMissileEx> ().speed = qData._Missile [i].Speed;

                missiles.Add(temp);
            }

            time    = 0;
            count   = 0;
            isStart = true;
            isPopUp = false;
        }
예제 #2
0
        public static void GoQuest()
        {
            LoadingJobData jobData = new LoadingJobData();

            List <AssetBundleData> assetBundles = new List <AssetBundleData> ();

            assetBundles.Add(new AssetBundleData("hellgatemaster", "quest", typeof(TextAsset)));

            jobData.finishedDelegate = delegate(List <object> obj, LoadingJobController job) {
                TextAsset text = Util.GetListObject <TextAsset> (obj);

                HellgateQuestDataEx data = JsonUtil.FromJson <HellgateQuestDataEx> (text.text);

                assetBundles = new List <AssetBundleData> ();
                assetBundles.Add(new AssetBundleData("hellgatequest", data._User.Prefab));
                for (int i = 0; i < data._Missile.Count; i++)
                {
                    assetBundles.Add(new AssetBundleData("hellgatequest", data._Missile [i].Prefab));
                }

                job.PutExtra("data", data);
                job.nextSceneName = "HellgateQuest";
                job.LoadAssetBundle(assetBundles);
            };

            jobData.assetBundles         = assetBundles;
            jobData.status               = MainMenuStatus.Destroy;
            jobData.assetBundleAllUnload = true;
            SceneManager.Instance.LoadingJob(jobData, false);
        }