This commit is contained in:
2024-04-20 16:02:48 -04:00
parent 6f6476c0df
commit b31d5d30a8
7037 changed files with 246 additions and 178407 deletions
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using UnityEngine;
using Assets.Scripts;
// Token: 0x0200013F RID: 319
public class EffectManager : MonoBehaviour
@@ -253,8 +254,30 @@ public class EffectManager : MonoBehaviour
// Token: 0x060008E4 RID: 2276 RVA: 0x0002728C File Offset: 0x0002548C
private static IEnumerator loadTexture()
{
string path = Pathing.BaseContentPath.TrimEnd('/') + Pathing.ToPlatformAssetBundleName(EffectManager.Instance.EffectName);
byte[] data = System.IO.File.ReadAllBytes(path + ".png");
string path = HelperFunctions.CreateFilePath(Pathing.ToPlatformAssetBundleName(EffectManager.Instance.EffectName) + ".png");
Debug.LogWarning("EFFECT" + path);
/*string path = Pathing.BaseContentPath.TrimEnd('/') + Pathing.ToPlatformAssetBundleName(EffectManager.Instance.EffectName) + ".png";
if (!System.IO.File.Exists(path))
{
path = Application.streamingAssetsPath + "/JP" + Pathing.ToPlatformAssetBundleName(EffectManager.Instance.EffectName) + ".png";
}*/
byte[] data;
if (Application.platform == RuntimePlatform.Android)
{
WWW reader = new WWW(path);
while (!reader.isDone)
{
}
data = reader.bytes;
}
else
{
data = System.IO.File.ReadAllBytes(path);
}
//byte[] data = System.IO.File.ReadAllBytes(path + ".png");
Texture2D tex = new Texture2D(0, 0, TextureFormat.RGBA32, false, true);
tex.LoadImage(data);
tex.wrapMode = TextureWrapMode.Clamp;
@@ -196,8 +196,15 @@ public class MobileMovieTexture : MonoBehaviour
long num2;
if (platform != RuntimePlatform.Android)
{
path = Pathing.BaseContentPath + this.m_path;
num = 0L;
/*path = path = Pathing.BaseContentPath + this.m_path;
if (!System.IO.File.Exists(path))
{
path = Application.streamingAssetsPath + "/JP" + this.m_path;
}*/
path = HelperFunctions.CreateFilePath(this.m_path).TrimStart('/');
Debug.LogWarning(path);
num = 0L;
num2 = 0L;
}
else
+10 -3
View File
@@ -41,9 +41,16 @@ public static class MovieManager
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
m_tex.playOnAwake = true;
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
m_tex.url = Pathing.BaseContentPath + path + ".webm";
m_tex.isLooping = false;
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
//Material newMat = new Material(Shader.Find("Unlit/Texture") as Shader);
/*string url = Pathing.BaseContentPath + path + ".webm";
if (!System.IO.File.Exists(url))
{
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
}
m_tex.url = url;*/
m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm").TrimStart('/');
m_tex.isLooping = false;
movieFrame.SetMaterial(newMat, 960, 544);
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
+8 -2
View File
@@ -43,8 +43,14 @@ public class MovieTex : MonoBehaviour
this.m_tex = base.gameObject.AddComponent<VideoPlayer>();
this.m_tex.playOnAwake = false;
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
//this.m_tex.m_path = path + ".mp4";
this.m_tex.url = "file:///" + Pathing.BaseContentPath + path + ".webm";
//this.m_tex.m_path = path + ".mp4";
/*string url = Pathing.BaseContentPath + path + ".webm";
if (!System.IO.File.Exists(url))
{
url = Application.streamingAssetsPath + "/JP" + path + ".webm";
}
this.m_tex.url = "file:///" + url;*/
this.m_tex.url = HelperFunctions.CreateFilePath(path + ".webm").TrimStart('/');
this.m_tex.isLooping = isLoop;
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
//this.m_tex.targetMaterialRenderer = newMat;
@@ -102,6 +102,7 @@ public class NameInputKeyboard : MonoBehaviour
{
NameInputKeyboard.Instance.m_inputText = ScreenKeyboardManager.InputText;
NameInputKeyboard.Instance.m_inputTextLastName = ScreenKeyboardManager.InputTextLastName;
ScreenKeyboardManager.Close();
}
yield break;
}
@@ -106,8 +106,10 @@ namespace Qoo.Game
{
if (KsExec.confirmResult)
{
GameData.SetParamString("firstname", string.Empty, KsExec.editName);
GameData.SetParamString("familyname", string.Empty, KsExec.editLastName);
GameData.SetParamString("firstname", NameInputKeyboard.InputText, KsExec.editName);
GameData.SetParamString("familyname", NameInputKeyboard.InputTextLastName, KsExec.editLastName);
//GameData.SetParamString("firstname", string.Empty, KsExec.editName);
//GameData.SetParamString("familyname", string.Empty, KsExec.editLastName);
NameInputKeyboard.Close();
return true;
}
@@ -25,8 +25,35 @@ public class ScreenKeyboardManager : MonoBehaviour
ScreenKeyboardManager.m_instance = gameObject.AddComponent<ScreenKeyboardManager>();
gameObject.AddComponent<EventSystem>();
gameObject.AddComponent<StandaloneInputModule>();
ScreenKeyboardManager.m_instance.m_inputText = string.Empty;
ScreenKeyboardManager.m_instance.m_inputTextLastName = string.Empty;
string firstName = "アリス";
string lastName = "リデル";
switch (UnityApp.Instance.locale)
{
case Assets.Scripts.LocaleEnum.English:
firstName = "Alice";
lastName = "Liddell";
break;
case Assets.Scripts.LocaleEnum.Spanish:
firstName = "Alice";
lastName = "Liddell";
break;
default:
firstName = "アリス";
lastName = "リデル";
break;
}
if (ScreenKeyboardManager.m_instance.m_inputText != null)
{
firstName = ScreenKeyboardManager.m_instance.m_inputText;
}
if (ScreenKeyboardManager.m_instance.m_inputTextLastName != null)
{
firstName = ScreenKeyboardManager.m_instance.m_inputTextLastName;
}
ScreenKeyboardManager.m_instance.m_inputText = firstName;
ScreenKeyboardManager.m_instance.m_inputTextLastName = lastName;
//ScreenKeyboardManager.m_instance.m_inputText = string.Empty;
//ScreenKeyboardManager.m_instance.m_inputTextLastName = string.Empty;
ScreenKeyboardManager.m_instance.isKeyboardActive = true;
}
return ScreenKeyboardManager.m_instance;
@@ -98,29 +125,19 @@ public class ScreenKeyboardManager : MonoBehaviour
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
InputField _inputFieldFirstName = createInputBox(canvas, "FirstName", defaultString, "Input First Name", new Vector3(-250, 50, 0));
_inputFieldFirstName.text = defaultString;
InputField _inputFieldLastName = createInputBox(canvas, "LastName", defaultString2, "Input Last Name", new Vector3(0, 50, 0));
createEqualsBox(canvas, "Equals", new Vector3(-125, 50, 0));
createButton(canvas, "SubmitButton", new Vector3(-125, -35, 0));
_inputFieldLastName.text = defaultString2;
string firstNameString = _inputFieldFirstName.text;
string lastNameString = _inputFieldLastName.text;
while (ScreenKeyboardManager.m_instance.isKeyboardActive)
{
yield return 0;
/*if (Input.GetKeyDown(KeyCode.Return))
{
firstNameString = _inputFieldFirstName.text;
lastNameString = _inputFieldLastName.text;
ScreenKeyboardManager.Instance.m_inputText = firstNameString;
ScreenKeyboardManager.Instance.m_inputTextLastName = lastNameString;
GameObject.Destroy(canvas.gameObject);
isKeyboardActive = false;
createEqualsBox(canvas, "Equals", new Vector3(-125, 50, 0));
createButton(canvas, "SubmitButton", new Vector3(-125, -35, 0));
}*/
}
yield break;
yield return new WaitUntil(() => !ScreenKeyboardManager.m_instance.isKeyboardActive);
yield break;
}
public static InputField createInputBox(Canvas canvas, string objectName, string defaultString, string placeholderString, Vector3 position)
@@ -157,11 +174,12 @@ public class ScreenKeyboardManager : MonoBehaviour
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
_text.alignment = TextAnchor.MiddleCenter;
GameObject placeholderContainer = new GameObject();
GameObject placeholderContainer = new GameObject();
placeholderContainer.name = "Placeholder";
placeholderContainer.transform.parent = container.transform;
Text _placeholder = placeholderContainer.AddComponent<Text>();
RectTransform _placeholderTransform = _placeholder.GetComponent<RectTransform>();
placeholderContainer.transform.localScale = new Vector3(1, 1, 1);
_placeholderTransform.sizeDelta = new Vector2(width, height);
_placeholder.color = fontColor;
_placeholder.font = font;
@@ -204,7 +222,7 @@ public class ScreenKeyboardManager : MonoBehaviour
_image.type = Image.Type.Sliced;
_image.color = inputBoxColor;
Button _button = container.AddComponent<Button>();
_button.onClick.AddListener(delegate { OnButtonClick(container.transform.parent.GetChild(0).gameObject.GetComponent<InputField>(), container.transform.parent.GetChild(1).gameObject.GetComponent<InputField>(), canvas); });
_button.onClick.AddListener(()=>{ OnButtonClick(container.transform.parent.GetChild(0).gameObject.GetComponent<InputField>(), container.transform.parent.GetChild(1).gameObject.GetComponent<InputField>(), canvas); });
RectTransform _containerTransform = container.GetComponent<RectTransform>();
_containerTransform.sizeDelta = new Vector2(width, height);
@@ -265,7 +283,6 @@ public class ScreenKeyboardManager : MonoBehaviour
ScreenKeyboardManager.Instance.m_inputTextLastName = lastNameString;
Debug.LogWarning("Name: " + firstNameString + " = " + lastNameString);
ScreenKeyboardManager.m_instance.isKeyboardActive = false;
GameObject.Destroy(canvas.gameObject);
}
// Token: 0x06000A98 RID: 2712 RVA: 0x0002EAEC File Offset: 0x0002CCEC
@@ -273,7 +290,7 @@ public class ScreenKeyboardManager : MonoBehaviour
{
if (ScreenKeyboardManager.m_instance != null)
{
UnityEngine.Object.Destroy(ScreenKeyboardManager.m_instance.gameObject);
UnityEngine.Object.Destroy(ScreenKeyboardManager.m_instance.gameObject);
ScreenKeyboardManager.m_instance = null;
}
}
+20 -24
View File
@@ -1,8 +1,10 @@
using System;
using System.Collections;
using System.IO;
using Qoo;
using UnityEngine;
using UnityEngine.Networking;
using Debug = UnityEngine.Debug;
// Token: 0x02000148 RID: 328
public class UnityFile
@@ -102,7 +104,7 @@ public class UnityFile
{
this.m_szName = name_;
this.m_szPath = path_;
this.m_object = Resources.Load(path_ + name_);
this.m_object = Resources.Load(path_ + name_);
if (this.m_object != null)
{
this.m_isReadEnd = true;
@@ -124,19 +126,15 @@ public class UnityFile
// Token: 0x0600090C RID: 2316 RVA: 0x000277AC File Offset: 0x000259AC
private string CreateLoader(string name, string localpath, bool IsAssetBandle)
{
if (localpath == "ks/")
{
UnityEngine.Debug.Log("ks");
}
localpath = localpath.Replace('\\', '/');
name = name.Replace('\\', '/');
if (IsAssetBandle)
{
name = Pathing.ToPlatformAssetBundleName(name);
}
string text = Pathing.appContentDataPath + localpath + name;
UnityEngine.Debug.LogWarning(text);
Qoo.Debug.Print("first possible spot:");
//string text = Pathing.appContentDataPath + localpath + name;
string text = (HelperFunctions.CreateFilePath(("/" + localpath.TrimStart('/') + name))).TrimStart('/');
Debug.LogWarning("Loader: "+ text);
return text;
}
@@ -159,6 +157,7 @@ public class UnityFile
{
WWW loader = null;
string path = this.CreateLoader(this.m_szName, this.m_szPath, this.m_IsAssetBandle);
Debug.LogWarning("After loader: " + path);
for (int i = 0; i <= 10; i++)
{
loader = new WWW(path);
@@ -196,21 +195,9 @@ public class UnityFile
{
if (Application.platform == RuntimePlatform.Android)
{
string url;
if (Application.platform == RuntimePlatform.Android)
{
// On Android, use "jar:file://" URL to load file from StreamingAssets
//url = ("jar:file://" + Application.dataPath + "!/assets" + m_szPath + m_szName + ".png").TrimStart('/');
url = ("jar:file://" + Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png").TrimStart('/');
UnityEngine.Debug.LogWarning(url);
}
else
{
// On other platforms, use file:// URL to load file from StreamingAssets
url = Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png";
}
string url = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png").TrimStart('/');
//UnityEngine.Debug.LogWarning(url);
Debug.LogWarning(url);
UnityWebRequest request = UnityWebRequest.Get(url);
yield return request.SendWebRequest();
@@ -228,8 +215,17 @@ public class UnityFile
}
else
{
UnityEngine.Debug.Log(Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png");
byte[] data = System.IO.File.ReadAllBytes(Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png");
//string updatedPath = StaticFunctions.createFilePath(m_szPath + m_szName + ".png");
string updatedPath = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png").TrimStart('/');
//Debug.LogWarning(updatedPath);
/*string updatedPath = Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png";
if (!System.IO.File.Exists(updatedPath))
{
updatedPath = Application.streamingAssetsPath + "/JP" + m_szPath + m_szName + ".png";
}
//UnityEngine.Debug.Log(Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png");
UnityEngine.Debug.Log(updatedPath);*/
byte[] data = System.IO.File.ReadAllBytes(updatedPath);
this.m_ReadData = data;
}
}
@@ -50,8 +50,8 @@ public class UnityFileLoader : Singleton<UnityFileLoader>
return this.GetAssetBandleFile(name);
}
}
UnityFile unityFile = new UnityFile();
unityFile.Create(null, name, localpath, IsAssetBandle);
UnityFile unityFile = new UnityFile();
unityFile.Create(null, name, localpath, IsAssetBandle);
return unityFile;
}
+25 -14
View File
@@ -360,35 +360,46 @@ public class UnityGraph : Singleton<UnityGraph>
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
m_tex.playOnAwake = false;
Material newMat = new Material(Shader.Find("QO/Sprite Add") as Shader);
m_tex.url = Pathing.BaseContentPath + path + ".webm";
m_tex.isLooping = false;
Material newMat = new Material(Shader.Find("QO/Sprite Add") as Shader);
//Material newMat = new Material(Shader.Find("Unlit/Texture") as Shader);
/*string url = Pathing.BaseContentPath + path + ".webm";
if (!System.IO.File.Exists(url))
{
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
}*/
//m_tex.url = Pathing.BaseContentPath + path + ".webm";
//m_tex.url = url;
m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + ".webm").TrimStart('/');
m_tex.isLooping = false;
movieFrame.SetMaterial(newMat, 960, 544);
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
//OLD Code
//movieFrame.SetMaterial(movie.Play(name, MOVIE_TEX_TYPE.ADD, false), 960, 544);
//yield return 0;
//while (movie.IsPlay)
m_tex.Play();
yield return 0;
yield return 0;
yield return 0;
//OLD Code
//movieFrame.SetMaterial(movie.Play(name, MOVIE_TEX_TYPE.ADD, false), 960, 544);
//yield return 0;
//while (movie.IsPlay)
m_tex.Prepare();
// Wait until the video is prepared
while (!m_tex.isPrepared)
{
yield return 0;
}
m_tex.Play();
while (m_tex.isPlaying || !m_tex.isPrepared)
{
if (Input.GetMouseButtonDown(0))
{
break;
}
UnityEngine.Debug.LogWarning(m_tex.isPlaying + ", " + !m_tex.isPrepared);
UnityEngine.Debug.LogWarning(m_tex.isPlaying + ", " + !m_tex.isPrepared);
this.m_FrameDraw.CalcRenderImageOffset(this.m_width, this.m_height);
movieFrame.CalcRenderImageOffset(this.m_width, this.m_height);
this.m_FrameDraw.Update(this.m_width, this.m_height, 10f);
movieFrame.Update(this.m_width, this.m_height, 0f);
yield return 0;
yield return 0;
yield return 0;
}
//UnityEngine.Object.Destroy(movie);
movieFrame.obj.GetComponent<Renderer>().material = null;