private void LoadFieldData() { string path = "Farm/Fields/farm_01/FieldData_01"; FarmFieldData fieldData = AssetDataMng.Instance().LoadObject(path, null, true) as FarmFieldData; this.Field.SetFieldData(fieldData); }
public EffectAnimatorObserver GetBuildCompleteEffect(Transform parentObject) { EffectAnimatorObserver effectAnimatorObserver = this.buildCompleteEffects.FirstOrDefault((EffectAnimatorObserver x) => x.IsStoped()); if (null == effectAnimatorObserver) { GameObject gameObject = AssetDataMng.Instance().LoadObject("Cutscenes/NewFX3", null, true) as GameObject; if (null == gameObject) { global::Debug.LogError("NOT FOUND : Cutscenes/NewFX3"); } else { effectAnimatorObserver = UnityEngine.Object.Instantiate <GameObject>(gameObject).GetComponent <EffectAnimatorObserver>(); effectAnimatorObserver.transform.parent = base.transform; effectAnimatorObserver.transform.localScale = Vector3.one; effectAnimatorObserver.transform.position = parentObject.position; this.buildCompleteEffects.Add(effectAnimatorObserver); Resources.UnloadUnusedAssets(); } } else { effectAnimatorObserver.transform.position = parentObject.position; } return(effectAnimatorObserver); }
private void Awake() { FarmRoot.instance = this; string path = "Farm/Builds/SettingMark/SettingMark"; GameObject gameObject = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject; if (null == gameObject) { return; } GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject); gameObject2.transform.parent = base.transform; gameObject2.transform.localScale = Vector3.one; gameObject2.transform.localPosition = Vector3.zero; gameObject2.transform.localEulerAngles = Vector3.zero; this.settingMark = gameObject2.GetComponent <FarmSettingMark>(); path = "Farm/Builds/SelectMark/SelectMark"; gameObject = (AssetDataMng.Instance().LoadObject(path, null, true) as GameObject); if (null == gameObject) { return; } gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject); gameObject2.transform.parent = base.transform; gameObject2.transform.localScale = Vector3.one; gameObject2.transform.localPosition = Vector3.zero; gameObject2.transform.localEulerAngles = Vector3.zero; this.selectMark = gameObject2.GetComponent <FarmSelectMark>(); gameObject2.SetActive(false); FarmCameraControlForCMD.ClearCount(); }
public override bool RunScriptCommand() { bool result = false; AdventureDigimonInfo digimonInfo = ClassSingleton <AdventureSceneData> .Instance.GetDigimonInfo(this.charaId); if (digimonInfo != null) { Transform child = digimonInfo.model.transform.GetChild(0); if (null != child) { digimonInfo.animator = child.GetComponent <Animator>(); if (null == digimonInfo.animator) { digimonInfo.animator = child.gameObject.AddComponent <Animator>(); } string path = "AdventureScene/Animation/Character/" + this.animatorFileName; digimonInfo.animator.runtimeAnimatorController = (AssetDataMng.Instance().LoadObject(path, null, true) as RuntimeAnimatorController); if (null != digimonInfo.animator.runtimeAnimatorController) { result = true; base.ResumeScriptEngine(); } } } return(result); }
public void LosdScriptEngine(string fileName, Action onFinish) { string path = "AdventureScene/Text/" + fileName; TextAsset textAsset = AssetDataMng.Instance().LoadObject(path, null, true) as TextAsset; FileControlHelper fileControlHelper = new FileControlHelper(); AppCoroutine.Start(fileControlHelper.Decrypt(textAsset.bytes, new Action <byte[]>(this.OnLoadScriptFile)), onFinish, false); }
private QuestEventInfoList GetEventInfo() { if (null == this.eventInfoList) { this.eventInfoList = (AssetDataMng.Instance().LoadObject("Quest/List/QuestEventInfoList", null, false) as QuestEventInfoList); } return(this.eventInfoList); }
public static string GetBgPathForFTP(string path) { if (string.IsNullOrEmpty(path)) { return(AssetDataMng.GetWebAssetImagePath() + "/login/"); } return(AssetDataMng.GetWebAssetImagePath() + "/login/" + path); }
protected virtual void Awake() { if (this.isInitialized) { return; } AssetDataMng.instance = this; this.isInitialized = true; }
private void PopFriendshipUpCount() { GameObject original = AssetDataMng.Instance().LoadObject("UICommon/Farm/FriendshipUP", null, true) as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); gameObject.transform.parent = Singleton <GUIMain> .Instance.transform; gameObject.GetComponent <FriendshipUP>().farmObject = base.gameObject; gameObject.GetComponent <FriendshipUP>().ViewFriendshipStatus(this.digimonFriendShip.upFriendship); }
private bool UpdateAssetBundle() { if (AssetDataMng.Instance().IsInitializedAssetBundle() && 0 < AssetDataMng.Instance().GetDownloadAssetBundleCount(string.Empty)) { GUIMain.FadeWhiteReqScreen("UIAssetBundleDownLoad", null, 0.8f, 0.8f, true); return(true); } return(false); }
public void Start() { GameObject original = AssetDataMng.Instance().LoadObject("AdventureScene/AdventureSceneRoot", null, true) as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); gameObject.transform.parent = null; gameObject.transform.position = Vector3.zero; this.adventureScene = gameObject.GetComponent <AdventureSceneRoot>(); UnityEngine.Object.DontDestroyOnLoad(gameObject); }
private void LoadFacilityData() { string path = "Farm/Params/FacilityData"; FarmDataManager.FacilityInfo = (AssetDataMng.Instance().LoadObject(path, null, true) as FarmFacilityData); path = "Farm/Animations/FacilityAnimationData"; FarmDataManager.FacilityAnimationData = (AssetDataMng.Instance().LoadObject(path, null, true) as FarmFacilityAnimationData); path = "Farm/FacilityAnimation"; FarmDataManager.FacilityAnimator = (AssetDataMng.Instance().LoadObject(path, null, true) as RuntimeAnimatorController); }
public IEnumerator InitializeScript(string fileName) { ScriptEngine scriptEngine = new ScriptEngine(); this.scriptEngine = scriptEngine; string path = "AdventureScene/Text/Guidance/" + fileName; TextAsset textAsset = AssetDataMng.Instance().LoadObject(path, null, true) as TextAsset; FileControlHelper fileControlHelper = new FileControlHelper(); return(fileControlHelper.Decrypt(textAsset.bytes, new Action <byte[]>(this.OnLoadScriptFile))); }
private void Start() { Vector3 localPosition = base.transform.localPosition; localPosition.y -= GUIMain.VerticalSpaceSize; base.transform.localPosition = localPosition; GameObject gameObject = AssetDataMng.Instance().LoadObject("UICommon/Farm/BuildCostLabel", null, true) as GameObject; if (null != gameObject) { this.buildCostLabelPosY = gameObject.transform.localPosition.y; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject); this.buildCostLabel = gameObject2.GetComponent <BuildCostLabel>(); this.buildCostLabel.gameObject.SetActive(false); Transform transform = gameObject2.transform; transform.parent = base.transform; transform.localScale = Vector3.one; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; } GUICollider[] componentsInChildren = base.gameObject.GetComponentsInChildren <GUICollider>(); if (componentsInChildren != null) { foreach (GUICollider guicollider in componentsInChildren) { if ("InfoButton" == guicollider.name) { guicollider.onTouchEnded += this.OnPushedInfoButton; this.infoButton = guicollider; } if ("UpgradeButton" == guicollider.name) { guicollider.onTouchEnded += this.OnPushedUpgradeButton; this.upgradeButton = guicollider; } if ("ShortCutButton" == guicollider.name) { guicollider.onTouchEnded += this.OnPushedShortCutButton; this.shortCutButton = guicollider; } if ("SellButton" == guicollider.name) { guicollider.onTouchEnded += this.OnPushedSellButton; this.sellButton = guicollider; } if ("StockButton" == guicollider.name) { guicollider.onTouchEnded += this.OnPushedStockButton; this.stockButton = guicollider; } } } this.SettingButton(); }
private void SetupLocalize() { if (this.stampLabel != null) { this.stampLabel.text = StringMaster.GetString("BattleUI-37"); } for (int i = 1; i <= this.stampTextureList.Length; i++) { this.stampTextureList[i - 1].mainTexture = (AssetDataMng.Instance().LoadObject("StampIcons/JP/" + this.stampNameList[i - 1], null, true) as Texture2D); } }
public static FarmVisitFace Create() { string path = "UICommon/Farm/FarmVisit"; UnityEngine.Object original = AssetDataMng.Instance().LoadObject(path, null, true); GameObject gameObject = UnityEngine.Object.Instantiate(original) as GameObject; gameObject.transform.SetParent(Singleton <GUIMain> .Instance.transform); gameObject.transform.localScale = Vector3.one; return(gameObject.GetComponent <FarmVisitFace>()); }
private UnityEngine.Object GetFromCache(string path) { string localizedPath = AssetDataMng.GetLocalizedPath(path); UnityEngine.Object @object = this._GetFromCache(localizedPath); if (!localizedPath.Equals(path) && @object == null) { @object = this._GetFromCache(path); } return(@object); }
private UnityEngine.Object GetFromInternalResource(string path) { string localizedPath = AssetDataMng.GetLocalizedPath(path); UnityEngine.Object @object = Resources.Load(localizedPath); if (!localizedPath.Equals(path) && @object == null) { @object = Resources.Load(path); } return(@object); }
public void SetTexture(string path) { AssetDataMng.Instance().LoadObjectASync(path, delegate(UnityEngine.Object obj) { if (obj != null) { Texture2D mainTexture = obj as Texture2D; this.chipTexture.mainTexture = mainTexture; } }); }
private AssetDataMng.FindABInfoResult FindAssetBundleInfo(string path) { string localizedPath = AssetDataMng.GetLocalizedPath(path); AssetDataMng.FindABInfoResult findABInfoResult = this._FindAssetBundleInfo(localizedPath); if (!localizedPath.Equals(path) && findABInfoResult == null) { findABInfoResult = this._FindAssetBundleInfo(path); } return(findABInfoResult); }
public void LoadEgg(string path, float posX = 0f, float posY = 4000f, float cPosY = 0f) { GameObject original = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject; this.goChara = UnityEngine.Object.Instantiate <GameObject>(original); this.goChara.name = path; this.goChara.transform.SetParent(base.gameObject.transform); Quaternion localRotation = Quaternion.Euler(0f, this.rotY, 0f); this.goChara.transform.localRotation = localRotation; base.gameObject.transform.localPosition = new Vector3(posX, posY, 0f); }
private IEnumerator StartDownload(int count) { AssetDataMng assetDataMng = AssetDataMng.Instance(); if (!assetDataMng.IsAssetBundleDownloading()) { assetDataMng.StartDownloadAssetBundle(count, 4); } yield return(base.StartCoroutine(this.UpdateProgressBar())); yield break; }
private IEnumerator DownloadTex(string url) { Action <Texture2D> callback = delegate(Texture2D texture) { this.topTex = texture; }; string downloadURL = AssetDataMng.GetWebAssetImagePath() + "/gasha/" + url; yield return(TextureManager.instance.Load(downloadURL, callback, this.TimeoutSeconds, true)); yield break; }
private IEnumerator Initialize(GameObject observer, string tutorialStatusId, Action completed) { bool idOk = false; int totalSize = 0; int size = 0; AssetDataMng.Instance().GetDownloadAssetBundleCount("TUTO1", out size); totalSize += size; AssetDataMng.Instance().GetDownloadAssetBundleCount("TUTO2", out size); totalSize += size; AssetDataMng.Instance().GetDownloadAssetBundleCount("TUTO3", out size); totalSize += size; AssetDataMng.Instance().GetDownloadAssetBundleCount("TUTO4", out size); totalSize += size; this.DownloadConfirmation(totalSize, delegate { idOk = true; }, false); RestrictionInput.EndLoad(); while (!idOk) { yield return(null); } RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); DataMng.Instance().CampaignForceHide = true; this.gameEngineController = observer.AddComponent <TutorialControlToGame>(); yield return(null); yield return(AppCoroutine.Start(base.LoadTutorialUI("Tutorial/TutorialUI"), false)); yield return(AppCoroutine.Start(this.tutorialUI.LoadNonFrameText(), false)); yield return(AppCoroutine.Start(this.tutorialUI.LoadSelectItem(), false)); UIRoot root = GUIMain.GetUIRoot(); if (null != root) { UIPanel component = root.GetComponent <UIPanel>(); if (null != component) { component.depth = 100; } } yield return(AppCoroutine.Start(this.LoadScriptEngine(tutorialStatusId), false)); if (completed != null) { completed(); } yield break; }
public IEnumerator AllBuild(GameWebAPI.RespDataMA_BannerM dts) { base.InitBuild(); this.partsCount = 0; if (base.selectCollider != null) { GameWebAPI.RespDataMA_BannerM.BannerM[] menuBannerList = dts.bannerM.Where((GameWebAPI.RespDataMA_BannerM.BannerM x) => x.actionType == "menu" && ServerDateTime.Now >= DateTime.Parse(x.startTime) && GUIBannerParts.GetRestTimeSeconds(DateTime.Parse(x.endTime)) > 0).ToArray <GameWebAPI.RespDataMA_BannerM.BannerM>(); this.partsCount = menuBannerList.Length; List <GameWebAPI.RespDataMA_BannerM.BannerM> dtList = new List <GameWebAPI.RespDataMA_BannerM.BannerM>(); for (int mm = 0; mm < menuBannerList.Length; mm++) { dtList.Add(menuBannerList[mm]); } dtList.Sort(delegate(GameWebAPI.RespDataMA_BannerM.BannerM a, GameWebAPI.RespDataMA_BannerM.BannerM b) { int num = int.Parse(a.dispNum); int num2 = int.Parse(b.dispNum); return(num - num2); }); for (int mm = 0; mm < dtList.Count; mm++) { menuBannerList[mm] = dtList[mm]; } GUISelectPanelBSPartsUD.PanelBuildData pbd = base.CalcBuildData(1, this.partsCount, 1f, 1f); float ypos = pbd.startY; float xpos = pbd.startX; for (int i = 0; i < menuBannerList.Length; i++) { GameWebAPI.RespDataMA_BannerM.BannerM bannerInfo = menuBannerList[i]; GameObject go = base.AddBuildPart(); if (!(null == go)) { GUIBannerParts parts = go.GetComponent <GUIBannerParts>(); if (parts != null) { parts.name += menuBannerList[i].dispNum.ToString(); parts.SetOriginalPos(new Vector3(xpos, ypos, -5f)); parts.Data = bannerInfo; parts.SetBGColor(); string path = AssetDataMng.GetWebAssetImagePath() + bannerInfo.img; yield return(TextureManager.instance.Load(path, new Action <Texture2D>(parts.OnBannerReceived), this.timeOutSeconds, true)); } ypos -= pbd.pitchH; } } base.height = pbd.lenH; base.initLocation = true; base.InitMinMaxLocation(-1, 0f); } base.selectParts.SetActive(false); yield break; }
private IEnumerator DownloadBannerTexture(QuestData.WorldStageData wsd, Action <Texture2D> callback) { if (wsd.worldStageM.worldAreaId == ConstValue.QUEST_AREA_ID_DEFAULT || wsd.worldStageM.worldAreaId == "4" || wsd.worldStageM.worldAreaId == "5" || "null" == wsd.worldStageM.stageImage || string.IsNullOrEmpty(wsd.worldStageM.stageImage)) { callback(null); yield break; } string path = AssetDataMng.GetWebAssetImagePath() + "/events/" + wsd.worldStageM.stageImage; yield return(TextureManager.instance.Load(path, callback, 30f, true)); yield break; }
private IEnumerator DownloadFontAsset() { bool result = AssetDataMng.Instance().AB_StartDownLoad("FONT", 4); if (result) { while (AssetDataMng.Instance().IsAssetBundleDownloading()) { yield return(null); } } yield break; }
private IEnumerator BuildBanner(GameWebAPI.RespDataMA_BannerM.BannerM banner) { GUIBannerParts parts = this.goScheduleBannerParts.GetComponent <GUIBannerParts>(); if (parts != null) { parts.name += banner.dispNum.ToString(); parts.Data = banner; parts.SetBGColor(); string path = AssetDataMng.GetWebAssetImagePath() + banner.img; yield return(TextureManager.instance.Load(path, new Action <Texture2D>(parts.OnBannerReceived), this.timeOutSeconds, true)); } yield break; }
private void SetConstructionModel(FarmObject farmObject) { string constructionModelName = FarmUtility.GetConstructionModelName(farmObject); GameObject gameObject = AssetDataMng.Instance().LoadObject(constructionModelName, null, true) as GameObject; if (null == gameObject) { global::Debug.LogError("工事中のモデルが見つからない : " + constructionModelName); return; } GameObject construction = UnityEngine.Object.Instantiate <GameObject>(gameObject); farmObject.SetConstruction(construction); }
public static GameObject LoadMonsterModel(Transform parentTransform, string modelId) { GameObject gameObject = null; string filePath = MonsterObject.GetFilePath(modelId); GameObject gameObject2 = AssetDataMng.Instance().LoadObject(filePath, null, true) as GameObject; if (null != gameObject2) { gameObject = UnityEngine.Object.Instantiate <GameObject>(gameObject2); Transform transform = gameObject.transform; transform.parent = parentTransform; } return(gameObject); }