public void OnEnable() { titleStyle = new GUIStyle("OL Title") { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 12, }; outputPath = Application.dataPath.Replace("Assets", "App"); AppConfig = Resources.Load <AppConfig>(configPath); if (AppConfig != null) { DevelopmentBuild = AppConfig.IsDebug; IsProServer = AppConfig.IsProServer; IsHotfix = AppConfig.IsHotfix; IsLoadAB = AppConfig.IsLoadAB; RunXLuaScripts = AppConfig.RunXLua; AppFrameRate = AppConfig.AppFrameRate; ApkTarget = AppConfig.TargetPackage; NativeApp = AppConfig.NativeApp; } else { Debug.Log("找不到AppConfig,请新建AppConfig"); } }
public PackageSettingsEntry(SettingsKey key, TargetPackage targetPackage = TargetPackage.All, TargetProfile targetProfile = TargetProfile.All) { SettingsKey = key; DefaultValue = null; TargetPackage = targetPackage; TargetProfile = targetProfile; }
private IDictionary <string, TargetPackage> ParseTarget(string frameworkName) { var targets = Content.Value <JObject>("targets"); var target = (JObject)targets.GetValue(frameworkName, StringComparison.OrdinalIgnoreCase); if (target == null) { var frameworks = targets.Properties().Select(i => i.Name); throw new InvalidOperationException("Target {0} not found in {1}.".FormatWith(frameworkName, string.Join(", ", frameworks))); } var result = new Dictionary <string, TargetPackage>(StringComparer.OrdinalIgnoreCase); foreach (var row in target) { var type = row.Value.Value <string>("type"); if ("package".EqualsIgnoreCase(type)) { var targetPackage = new TargetPackage(row.Key, (JObject)row.Value); result.Add(targetPackage.Id.Name, targetPackage); } } return(result); }
public void fire() { for (int i = 0; i < spawnLimit; i++) { if (pool[i].activeInHierarchy == false) { pool[i].transform.position = gameObject.transform.position; pool[i].SetActive(true); TargetPackage tp = new TargetPackage(); tp.bacon = targetBacon; tp.hitArea = playerArea; tp.boatEdge = boatEdge; tp.screenEdge = screenEdge; tp.boatOar = boatOar; pool[i].SendMessage("Restore",tp); return; } } }
public void OnGUI() { EditorGUILayout.Space(); GUILayout.Label(new GUIContent("Build App"), titleStyle); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Development Build")); GUILayout.FlexibleSpace(); DevelopmentBuild = EditorGUILayout.Toggle(DevelopmentBuild, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Is Pro Server")); GUILayout.FlexibleSpace(); IsProServer = EditorGUILayout.Toggle(IsProServer, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Is Hotfix")); GUILayout.FlexibleSpace(); IsHotfix = EditorGUILayout.Toggle(IsHotfix, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Is LoadAB")); GUILayout.FlexibleSpace(); IsLoadAB = EditorGUILayout.Toggle(IsLoadAB, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Run XLuaScripts")); GUILayout.FlexibleSpace(); RunXLuaScripts = EditorGUILayout.Toggle(RunXLuaScripts, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("App FrameRate")); GUILayout.FlexibleSpace(); AppFrameRate = EditorGUILayout.IntField(AppFrameRate, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Build Mold")); GUILayout.FlexibleSpace(); ApkTarget = (TargetPackage)EditorGUILayout.EnumPopup(ApkTarget, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); if (ApkTarget == TargetPackage.Mobile) { EditorGUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Export Project")); GUILayout.FlexibleSpace(); NativeApp = EditorGUILayout.Toggle(NativeApp, GUILayout.MaxWidth(75)); EditorGUILayout.EndHorizontal(); } if (GUILayout.Button("Update")) { UpdateConfig(); } outputPath = EditorGUILayout.TextField("Output Path", outputPath); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Browse", GUILayout.MaxWidth(75f))) { outputPath = EditorUtility.OpenFolderPanel("Bundle Folder", outputPath, string.Empty); } GUILayout.EndHorizontal(); if (GUILayout.Button("Build")) { UpdateConfig(); BuildApp(); } }
public void Restore(TargetPackage tp) { startTime = Time.time; baconSpot = tp.bacon; playerHitArea = tp.hitArea; screenEdge = tp.screenEdge; boatEdge = tp.boatEdge; boatOar = tp.boatOar; Fire(); }
public PackageSettingsEntry(SettingsKey key, TargetPackage targetPackage = TargetPackage.All) { SettingsKey = key; TargetPackage = targetPackage; }
public void Restore(TargetPackage tp) { startTime = Time.time; baconSpot = tp.bacon; playerHitArea = tp.hitArea; screenEdge = tp.screenEdge; boatEdge = tp.boatEdge; playerAttacked = false; grabBacon = false; hit = false; dolphin.transform.rotation = new Quaternion(0,0,0,0); dolphin.transform.localScale = new Vector3(dolphin.transform.localScale.x, dolphin.transform.localScale.y, 1); boatOar = tp.boatOar; Fire(); }
public void Restore(TargetPackage tp) { startTime = Time.time; baconSpot = tp.bacon; playerHitArea = tp.hitArea; screenEdge = tp.screenEdge; boatEdge = tp.boatEdge; playerAttacked = false; grabBacon = false; boatOar = tp.boatOar; p2dControl = gameObject.GetComponent<Puppet2D_GlobalControl>(); Transform tempTransform = gameObject.transform.Find("bone_4"); tentecleCollider = tempTransform.gameObject; tentecleCollider = tentecleCollider.transform.FindDeepChild("tent1").gameObject; Fire(); }