Commit 04e91b0f authored by SherryChaos's avatar SherryChaos

fix ReadParams bug

parent d25d31ef
...@@ -15,7 +15,7 @@ MonoBehaviour: ...@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: ca8b8e6916019834fb0ec5578fa0be37 m_DefaultGroup: ca8b8e6916019834fb0ec5578fa0be37
m_currentHash: m_currentHash:
serializedVersion: 2 serializedVersion: 2
Hash: a7787d5667f17613de3b1b0e88584bac Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0 m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0 m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0 m_CatalogRequestsTimeout: 0
...@@ -56,7 +56,7 @@ MonoBehaviour: ...@@ -56,7 +56,7 @@ MonoBehaviour:
m_ContentStateBuildPathProfileVariableName: <default settings path> m_ContentStateBuildPathProfileVariableName: <default settings path>
m_CustomContentStateBuildPath: m_CustomContentStateBuildPath:
m_ContentStateBuildPath: m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 2 m_BuildAddressablesWithPlayerBuild: 1
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]' m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
m_GroupAssets: m_GroupAssets:
- {fileID: 11400000, guid: 00d23bf82261d794b8ad80777f3da3ae, type: 2} - {fileID: 11400000, guid: 00d23bf82261d794b8ad80777f3da3ae, type: 2}
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: DefaultVolumeProfile
m_EditorClassIdentifier:
components: []
fileFormatVersion: 2
guid: 408925b80137a284f8f37fb36e5f996e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
...@@ -536,6 +536,10 @@ MonoBehaviour: ...@@ -536,6 +536,10 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
text: {fileID: 1398959084} text: {fileID: 1398959084}
input: {fileID: 1775272994} input: {fileID: 1775272994}
mode_Window: 0
mode_Android: 0
mode_IOS: 1
fullCopy: 0
--- !u!114 &916768208 --- !u!114 &916768208
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -95,10 +95,11 @@ namespace MDPro3 ...@@ -95,10 +95,11 @@ namespace MDPro3
public static Program instance; public static Program instance;
public static Items items; public static Items items;
List<Manager> managers = new List<Manager>(); private readonly List<Manager> managers = new();
List<Servant.Servant> servants = new List<Servant.Servant>(); private readonly List<Servant.Servant> servants = new();
public static bool exitOnReturn = false;
void Initialize() private void Initialize()
{ {
if (!Directory.Exists(PATH_DATA)) if (!Directory.Exists(PATH_DATA))
Directory.CreateDirectory(PATH_DATA); Directory.CreateDirectory(PATH_DATA);
...@@ -125,7 +126,6 @@ namespace MDPro3 ...@@ -125,7 +126,6 @@ namespace MDPro3
BanlistManager.Initialize(); BanlistManager.Initialize();
InitializeAllManagers(); InitializeAllManagers();
InitializeAllServants(); InitializeAllServants();
ReadParams();
var handle = Addressables.InstantiateAsync("Prefab/CardRenderer.prefab"); var handle = Addressables.InstantiateAsync("Prefab/CardRenderer.prefab");
handle.Completed += (result) => handle.Completed += (result) =>
...@@ -135,31 +135,30 @@ namespace MDPro3 ...@@ -135,31 +135,30 @@ namespace MDPro3
}; };
} }
public static bool exitOnReturn = false; public void ReadParams()
void ReadParams()
{ {
var args = Environment.GetCommandLineArgs(); var args = Environment.GetCommandLineArgs();
//args = new string[2] //args = new string[11]
//{ //{
// //"-r", //"-r",
// //"TURN023" //"TURN023"
// //"-s", //"-s",
// //"6ace for win!" //"6ace for win!"
// "-d", // "-d",
// "LL铁兽", // "LL铁兽",
// //"-n", // "-n",
// //"赤子奈落", // "赤子奈落",
// //"-h", // "-h",
// //"mygo.superpre.pro", // "mygo.superpre.pro",
// //"-p", // "-p",
// //"888", // "888",
// //"-w", // "-w",
// //"M#1008611", // "M#1008611",
// //"-j" // "-j"
//}; //};
string nick = null; string nick = null;
...@@ -245,6 +244,7 @@ namespace MDPro3 ...@@ -245,6 +244,7 @@ namespace MDPro3
foreach (Manager manager in managers) foreach (Manager manager in managers)
manager.Initialize(); manager.Initialize();
} }
private void InitializeAllServants() private void InitializeAllServants()
{ {
servants.Add(setting); servants.Add(setting);
...@@ -280,7 +280,7 @@ namespace MDPro3 ...@@ -280,7 +280,7 @@ namespace MDPro3
public const string PATH_TEMP_FOLDER = "TempFolder/"; public const string PATH_TEMP_FOLDER = "TempFolder/";
public static string root = PATH_ROOT_WINDOWS64; public static string root = PATH_ROOT_WINDOWS64;
void Awake() private void Awake()
{ {
#if UNITY_ANDROID #if UNITY_ANDROID
root = PATH_ROOT_ANDROID; root = PATH_ROOT_ANDROID;
...@@ -311,12 +311,12 @@ namespace MDPro3 ...@@ -311,12 +311,12 @@ namespace MDPro3
Time.timeScale = value; Time.timeScale = value;
} }
} }
float m_TimeScale = 1f; private float m_TimeScale = 1f;
#if UNITY_EDITOR #if UNITY_EDITOR
public float timeScaleForEditor = 1; public float timeScaleForEditor = 1;
#endif #endif
void Update() private void Update()
{ {
TcpHelper.PerFrameFunction(); TcpHelper.PerFrameFunction();
foreach (Manager manager in managers) foreach (Manager manager in managers)
...@@ -337,8 +337,10 @@ namespace MDPro3 ...@@ -337,8 +337,10 @@ namespace MDPro3
StartCoroutine(gc); StartCoroutine(gc);
} }
} }
IEnumerator gc;
IEnumerator UnloadUnusedAssetsAsync() private IEnumerator gc;
private IEnumerator UnloadUnusedAssetsAsync()
{ {
var unload = Resources.UnloadUnusedAssets(); var unload = Resources.UnloadUnusedAssets();
while (!unload.isDone) while (!unload.isDone)
......
...@@ -484,6 +484,9 @@ namespace MDPro3.Servant ...@@ -484,6 +484,9 @@ namespace MDPro3.Servant
#endregion #endregion
loaded = true; loaded = true;
if(Program.instance.currentServant == Program.instance.room)
Program.instance.room.Realize();
} }
......
using MDPro3.Net;
using MDPro3.UI;
using MDPro3.UI.ServantUI;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using System.IO;
using MDPro3.Net;
using MDPro3.UI;
using UnityEngine.EventSystems;
using MDPro3.UI.ServantUI;
namespace MDPro3.Servant namespace MDPro3.Servant
{ {
...@@ -53,6 +52,8 @@ namespace MDPro3.Servant ...@@ -53,6 +52,8 @@ namespace MDPro3.Servant
base.FirstLoadEvent(); base.FirstLoadEvent();
servantUI.ResetUI(); servantUI.ResetUI();
StartCoroutine(LoadMyCardNewsAsync()); StartCoroutine(LoadMyCardNewsAsync());
Program.instance.ReadParams();
} }
protected override void ApplyShowArrangement(int preDepth) protected override void ApplyShowArrangement(int preDepth)
......
...@@ -66,7 +66,7 @@ namespace MDPro3.Servant ...@@ -66,7 +66,7 @@ namespace MDPro3.Servant
if (servantUI == null) if (servantUI == null)
{ {
this.replayName = replayName; this.replayName = replayName;
LoadUI(); Program.instance.ShiftToServant(this);
} }
else else
GetUI<ReplaySelectorUI>().KF_Replay(replayName); GetUI<ReplaySelectorUI>().KF_Replay(replayName);
......
...@@ -203,7 +203,7 @@ namespace MDPro3.Servant ...@@ -203,7 +203,7 @@ namespace MDPro3.Servant
Program.instance.ShiftToServant(Program.instance.ocgcore); Program.instance.ShiftToServant(Program.instance.ocgcore);
} }
private void Realize() public void Realize()
{ {
if (servantUI == null) if (servantUI == null)
return; return;
...@@ -304,7 +304,6 @@ namespace MDPro3.Servant ...@@ -304,7 +304,6 @@ namespace MDPro3.Servant
break; break;
} }
tasks.Add(task); tasks.Add(task);
Debug.Log("add");
UIManager.ShowPopupConfirm(tasks); UIManager.ShowPopupConfirm(tasks);
break; break;
case 3: case 3:
...@@ -410,6 +409,7 @@ namespace MDPro3.Servant ...@@ -410,6 +409,7 @@ namespace MDPro3.Servant
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
players[i] = null; players[i] = null;
Program.instance.ShiftToServant(Program.instance.room); Program.instance.ShiftToServant(Program.instance.room);
} }
......
...@@ -148,7 +148,11 @@ namespace MDPro3.UI.ServantUI ...@@ -148,7 +148,11 @@ namespace MDPro3.UI.ServantUI
TextRoomInfo.text = roomInfo; TextRoomInfo.text = roomInfo;
if (!Appearance.loaded) if (!Appearance.loaded)
{
foreach(var rp in roomPlayers)
rp.gameObject.SetActive(false);
return; return;
}
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
......
...@@ -18,6 +18,12 @@ public class AssetBundleRobber : MonoBehaviour ...@@ -18,6 +18,12 @@ public class AssetBundleRobber : MonoBehaviour
private static Text sText; private static Text sText;
public TMP_InputField input; public TMP_InputField input;
public bool mode_Window = true;
public bool mode_Android = false;
public bool mode_IOS = false;
public bool fullCopy;
private string pathAB; private string pathAB;
private string pathStore; private string pathStore;
...@@ -37,7 +43,6 @@ public class AssetBundleRobber : MonoBehaviour ...@@ -37,7 +43,6 @@ public class AssetBundleRobber : MonoBehaviour
private int count = 0; private int count = 0;
private AssetStudio.AssetsManager assetManager; private AssetStudio.AssetsManager assetManager;
private bool fullCopy;
private readonly int threads = 32; private readonly int threads = 32;
private AssetType copyAssetType = AssetType.All; private AssetType copyAssetType = AssetType.All;
...@@ -65,17 +70,21 @@ public class AssetBundleRobber : MonoBehaviour ...@@ -65,17 +70,21 @@ public class AssetBundleRobber : MonoBehaviour
Application.targetFrameRate = 0; Application.targetFrameRate = 0;
pathAB = PATH_AB_WINDOWS; if (mode_Android)
pathStore = PATH_STORE_WINDOWS; {
pathAB = PATH_AB_ANDROID;
pathAB = PATH_AB_ANDROID; pathStore = PATH_STORE_ANDROID;
pathStore = PATH_STORE_ANDROID; }
else if (mode_IOS)
//pathAB = PATH_AB_IOS; {
//pathStore = PATH_STORE_IOS; pathAB = PATH_AB_IOS;
pathStore = PATH_STORE_IOS;
//fullCopy = true; }
fullCopy = false; else
{
pathAB = PATH_AB_WINDOWS;
pathStore = PATH_STORE_WINDOWS;
}
copyAssetType = AssetType.All; copyAssetType = AssetType.All;
......
fileFormatVersion: 2
guid: 138cc67ebafd7a74face7773ba172dbc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 0f8e2b9e397a0484d80e2a712e82b4ab
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
...@@ -58,7 +58,7 @@ GraphicsSettings: ...@@ -58,7 +58,7 @@ GraphicsSettings:
m_FogKeepExp2: 1 m_FogKeepExp2: 1
m_AlbedoSwatchInfos: [] m_AlbedoSwatchInfos: []
m_RenderPipelineGlobalSettingsMap: m_RenderPipelineGlobalSettingsMap:
UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 69e955d6c02fa954ea8deabaf466ae56, type: 2} UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 0f8e2b9e397a0484d80e2a712e82b4ab, type: 2}
m_LightsUseLinearIntensity: 0 m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 1 m_LightsUseColorTemperature: 1
m_LogWhenShaderIsCompiled: 0 m_LogWhenShaderIsCompiled: 0
......
...@@ -551,7 +551,7 @@ PlayerSettings: ...@@ -551,7 +551,7 @@ PlayerSettings:
m_APIs: 0b000000 m_APIs: 0b000000
m_Automatic: 1 m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport - m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0b00000002000000 m_APIs: 02000000
m_Automatic: 0 m_Automatic: 0
- m_BuildTarget: LinuxStandaloneSupport - m_BuildTarget: LinuxStandaloneSupport
m_APIs: 1500000011000000 m_APIs: 1500000011000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment