Commit 7be44462 authored by hex's avatar hex

fix and optimized

parent dde96b6a
Pipeline #39607 failed
...@@ -42,21 +42,20 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -42,21 +42,20 @@ public class MonoCardInDeckManager : MonoBehaviour
if (isDraging) if (isDraging)
{ {
gameObject.transform.position += gameObject.transform.position +=
(getGoodPosition(4) - gameObject.transform.position) * 0.3f; (GetMouseWorldPosition(4) - gameObject.transform.position) * 0.3f;
} }
if (Vector3.Distance(Vector3.zero, gameObject.transform.position) > 50 && bool_physicalON) if (Vector3.Distance(Vector3.zero, gameObject.transform.position) > 50 && bool_physicalON)
{ {
killIt(); KillCard();
} }
} }
public void KillCard()
public void killIt()
{ {
if (Program.I().deckManager.condition == DeckManager.Condition.changeSide) if (Program.I().deckManager.condition == DeckManager.Condition.changeSide)
{ {
gameObject.transform.position = new Vector3(0, 5, 0); gameObject.transform.position = new Vector3(0, 5, 0);
endDrag(); EndDrag();
if (Program.I().deckManager.cardInDragging == this) if (Program.I().deckManager.cardInDragging == this)
{ {
Program.I().deckManager.cardInDragging = null; Program.I().deckManager.cardInDragging = null;
...@@ -74,7 +73,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -74,7 +73,7 @@ public class MonoCardInDeckManager : MonoBehaviour
} }
} }
public Vector3 getGoodPosition(float height) public Vector3 GetMouseWorldPosition(float height)
{ {
float x = Input.mousePosition.x; float x = Input.mousePosition.x;
float y = Input.mousePosition.y; float y = Input.mousePosition.y;
...@@ -97,7 +96,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -97,7 +96,7 @@ public class MonoCardInDeckManager : MonoBehaviour
return to_ltemp; return to_ltemp;
} }
public void beginDrag() public void BeginDrag()
{ {
physicalOFF(); physicalOFF();
physicalHalfON(); physicalHalfON();
...@@ -105,7 +104,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -105,7 +104,7 @@ public class MonoCardInDeckManager : MonoBehaviour
transform.DORotate(new Vector3(90, 0, 0), 0.6f).SetDelay(0); transform.DORotate(new Vector3(90, 0, 0), 0.6f).SetDelay(0);
} }
public void endDrag() public void EndDrag()
{ {
physicalON(); physicalON();
stopDragThisFrame = true; stopDragThisFrame = true;
...@@ -113,18 +112,18 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -113,18 +112,18 @@ public class MonoCardInDeckManager : MonoBehaviour
if ( if (
Input.GetKey(KeyCode.LeftControl) Input.GetKey(KeyCode.LeftControl)
|| Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.RightControl)
|| getIfAlive() == false || !IsAlive()
) )
{ {
Vector3 from_position = getGoodPosition(4); Vector3 from_position = GetMouseWorldPosition(4);
Vector3 to_position = getGoodPosition(0); Vector3 to_position = GetMouseWorldPosition(0);
Vector3 delta_position = to_position - from_position; Vector3 delta_position = to_position - from_position;
GetComponent<Rigidbody>().AddForce(delta_position * 1000); GetComponent<Rigidbody>().AddForce(delta_position * 1000);
dying = true; dying = true;
} }
} }
public void tweenToVectorAndFall(Vector3 position, Vector3 rotation, float delay = 0) public void TweenToPositionAndFall(Vector3 position, Vector3 rotation, float delay = 0)
{ {
var rigidbody = GetComponent<Rigidbody>(); var rigidbody = GetComponent<Rigidbody>();
if (rigidbody != null) rigidbody.Sleep(); if (rigidbody != null) rigidbody.Sleep();
...@@ -173,7 +172,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -173,7 +172,7 @@ public class MonoCardInDeckManager : MonoBehaviour
public bool IsInDeckArea() public bool IsInDeckArea()
{ {
// 此逻辑专门用于检查卡片是否在物理上位于有效的卡组区域内。 // 此逻辑专门用于检查卡片是否在物理上位于有效的卡组区域内。
Vector3 to_ltemp = refLectPosition(gameObject.transform.position); Vector3 to_ltemp = ReflectPositionToGround(gameObject.transform.position);
if (to_ltemp.x < -15.2f || to_ltemp.x > 15.2f) if (to_ltemp.x < -15.2f || to_ltemp.x > 15.2f)
{ {
return false; return false;
...@@ -181,7 +180,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -181,7 +180,7 @@ public class MonoCardInDeckManager : MonoBehaviour
return true; return true;
} }
public bool getIfAlive() public bool IsAlive()
{ {
// 步骤 1: 检查不可逆的“死亡”状态,这在任何模式下都适用。 // 步骤 1: 检查不可逆的“死亡”状态,这在任何模式下都适用。
if (died || gameObject.transform.position.y < -0.5f) if (died || gameObject.transform.position.y < -0.5f)
...@@ -200,7 +199,7 @@ public class MonoCardInDeckManager : MonoBehaviour ...@@ -200,7 +199,7 @@ public class MonoCardInDeckManager : MonoBehaviour
} }
} }
public static Vector3 refLectPosition(Vector3 pos) public static Vector3 ReflectPositionToGround(Vector3 pos)
{ {
Vector3 to_ltemp = pos; Vector3 to_ltemp = pos;
Vector3 dv = to_ltemp - Program.I().main_camera.transform.position; Vector3 dv = to_ltemp - Program.I().main_camera.transform.position;
......
using System; // using System;
// using System.Collections.Generic;
// using DG.Tweening;
// using UnityEngine;
// public class gameUIbutton
// {
// public string hashString;
// public GameObject gameObject;
// public int response;
// public bool dying;
// public bool dead;
// }
// public class gameInfo : MonoBehaviour
// {
// public UITexture instance_btnPan;
// public UITextList instance_lab;
// public UIToggle toggle_ignore;
// public UIToggle toggle_all;
// public UIToggle toggle_smart;
// public GameObject line;
// public void on_toggle_ignore()
// {
// toggle_all.value = false;
// toggle_smart.value = false;
// }
// public void on_toggle_all()
// {
// toggle_ignore.value = false;
// toggle_smart.value = false;
// }
// public void on_toggle_smart()
// {
// toggle_ignore.value = false;
// toggle_all.value = false;
// }
// //public UITextList hinter;
// barPngLoader me;
// barPngLoader opponent;
// public GameObject mod_healthBar;
// public float width = 0;
// int lastTickTime = 0;
// // Use this for initialization
// void Start()
// {
// ini();
// }
// public void ini()
// {
// Update();
// }
// public bool swaped = false;
// void Update()
// {
// if (me == null || opponent == null)
// {
// me = ((GameObject)MonoBehaviour.Instantiate(mod_healthBar, new Vector3(1000, 0, 0), Quaternion.identity)).GetComponent<barPngLoader>();
// me.transform.SetParent(gameObject.transform);
// opponent = ((GameObject)MonoBehaviour.Instantiate(mod_healthBar, new Vector3(1000, 0, 0), Quaternion.identity)).GetComponent<barPngLoader>();
// opponent.transform.SetParent(gameObject.transform);
// Transform[] Transforms = me.GetComponentsInChildren<Transform>();
// foreach (Transform child in Transforms)
// {
// child.gameObject.layer = gameObject.layer;
// }
// Transforms = opponent.GetComponentsInChildren<Transform>();
// foreach (Transform child in Transforms)
// {
// child.gameObject.layer = gameObject.layer;
// }
// Color c;
// ColorUtility.TryParseHtmlString(Config.Getui("gameChainCheckArea.color"), out c);
// UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "ignore_").gameObject, "Background").color = c;
// UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "watch_").gameObject, "Background").color = c;
// UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "use_").gameObject, "Background").color = c;
// }
// // float k = ((float)(Screen.width - Program.I().cardDescription.width)) / 1200f;
// // if (k > 1.2f)
// // {
// // k = 1.2f;
// // }
// // if (k < 0.8f)
// // {
// // k = 0.8f;
// // }
// float k = (global::System.Object)Screen.width switch
// {
// 1366 => 0.8f,
// 1600 => 0.9f,
// 1920 => 1.2f,
// 2560 => 1.5f,
// _ => 1,
// };
// Vector3 ks = new Vector3(k, k, k);
// // float kb = ((float)(Screen.width - Program.I().cardDescription.width)) / 1200f;
// // Debug.Log("kb:" + kb);
// // if (kb > 1.2f)
// // {
// // kb = 1.2f;
// // }
// // if (kb < 0.73f)
// // {
// // kb = 0.73f;
// // }
// float kb = (global::System.Object)Screen.width switch
// {
// 1366 => 0.8f,
// 1600 => 0.9f,
// 1920 => 1.1f,
// 2560 => 1.4f,
// _ => 1,
// };
// Vector3 ksb = new Vector3(kb, kb, kb);
// instance_btnPan.gameObject.transform.localScale = ksb;
// opponent.transform.localScale = ks;
// me.transform.localScale = ks;
// if (!swaped)
// {
// opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14);
// me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
// }
// else
// {
// me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14);
// opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
// }
// width = (225 * kb) + 15f;
// float localPositionPanX = (((float)Screen.width - 225 * kb) / 2) - 15f;
// instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 120, 0);
// instance_lab.transform.localPosition = new Vector3(Screen.width / 2 - 315, -Screen.height / 2 + 90 + Screen.safeArea.y, 0);
// int j = 0;
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (HashedButtons[i].gameObject != null)
// {
// if (HashedButtons[i].dying)
// {
// HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -120, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 20f;
// if (Math.Abs(HashedButtons[i].gameObject.transform.localPosition.y - -120) < 1)
// HashedButtons[i].dead = true;
// }
// else
// {
// HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -220 - j * 75, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f;
// j++;
// }
// }
// else
// HashedButtons[i].dead = true;
// }
// for (int i = HashedButtons.Count - 1; i >= 0; i--)
// {
// if (HashedButtons[i].dead)
// HashedButtons.RemoveAt(i);
// }
// float height = 198 + 75 * j;
// if (j == 0)
// {
// height = 174;
// }
// instance_btnPan.height += (int)(((float)height - (float)instance_btnPan.height) * 0.2f);
// if (Program.TimePassed() - lastTickTime > 1000)
// {
// lastTickTime = Program.TimePassed();
// tick();
// }
// }
// List<gameUIbutton> HashedButtons = new List<gameUIbutton>();
// public void addHashedButton(string hashString_, int hashInt, superButtonType type, string hint)
// {
// gameUIbutton hashedButton = new gameUIbutton();
// string hashString = hashString_;
// if (hashString == "")
// {
// hashString = hashInt.ToString();
// }
// hashedButton.hashString = hashString;
// hashedButton.response = hashInt;
// hashedButton.gameObject = Program.I().create(Program.I().new_ui_superButtonTransparent);
// UIHelper.trySetLableText(hashedButton.gameObject, "hint_", hint);
// UIHelper.getRealEventGameObject(hashedButton.gameObject).name = hashString + "----" + hashInt.ToString();
// UIHelper.registUIEventTriggerForClick(hashedButton.gameObject, listenerForClicked);
// hashedButton.gameObject.GetComponent<iconSetForButton>().setTexture(type);
// hashedButton.gameObject.GetComponent<iconSetForButton>().setText(hint);
// Transform[] Transforms = hashedButton.gameObject.GetComponentsInChildren<Transform>();
// foreach (Transform child in Transforms)
// {
// child.gameObject.layer = instance_btnPan.gameObject.layer;
// }
// hashedButton.gameObject.transform.SetParent(instance_btnPan.transform, false);
// hashedButton.gameObject.transform.localScale = Vector3.zero;
// hashedButton.gameObject.transform.localPosition = new Vector3(0, -120, 0);
// hashedButton.gameObject.transform.localEulerAngles = Vector3.zero;
// hashedButton.gameObject.transform.DOScale(new Vector3(0.9f, 0.9f, 0.9f), 0.3f);
// hashedButton.dying = false;
// HashedButtons.Add(hashedButton);
// refreshLine();
// }
// void listenerForClicked(GameObject obj)
// {
// string[] mats = obj.name.Split("----");
// if (mats.Length == 2)
// {
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (HashedButtons[i].hashString == mats[0])
// {
// if (HashedButtons[i].response.ToString() == mats[1])
// {
// Program.I().ocgcore.ES_gameUIbuttonClicked(HashedButtons[i]);
// }
// }
// }
// }
// }
// public bool queryHashedButton(string hashString)
// {
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (HashedButtons[i].hashString == hashString && !HashedButtons[i].dying)
// {
// return true;
// }
// }
// return false;
// }
// public void removeHashedButton(string hashString)
// {
// gameUIbutton remove = null;
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (HashedButtons[i].hashString == hashString)
// {
// remove = HashedButtons[i];
// }
// }
// if (remove != null)
// {
// if (remove.gameObject != null)
// {
// Program.I().destroy(remove.gameObject, 0.3f, true);
// }
// remove.dying = true;
// }
// refreshLine();
// }
// public void removeAll()
// {
// if (HashedButtons.Count == 1)
// {
// if (HashedButtons[0].hashString == "swap")
// {
// return;
// }
// }
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (HashedButtons[i].gameObject != null)
// {
// Program.I().destroy(HashedButtons[i].gameObject, 0.3f, true);
// }
// HashedButtons[i].dying = true;
// }
// refreshLine();
// }
// void refreshLine()
// {
// int j = 0;
// for (int i = 0; i < HashedButtons.Count; i++)
// {
// if (!HashedButtons[i].dying)
// {
// j++;
// }
// }
// line.SetActive(j > 0);
// }
// int[] time = new int[2];
// bool[] isTicking = new bool[2];
// public void setTime(int player, int t)
// {
// if (player < 2)
// {
// time[player] = t;
// setTimeAbsolutely(player, t);
// isTicking[player] = true;
// isTicking[1 - player] = false;
// }
// }
// public void setExcited(int player)
// {
// if (player == 0)
// {
// me.under.mainTexture = GameTextureManager.exBar;
// opponent.under.mainTexture = GameTextureManager.bar;
// }
// else
// {
// opponent.under.mainTexture = GameTextureManager.exBar;
// me.under.mainTexture = GameTextureManager.bar;
// }
// }
// public void setTimeStill(int player)
// {
// time[0] = Program.I().ocgcore.timeLimit;
// time[1] = Program.I().ocgcore.timeLimit;
// setTimeAbsolutely(0, Program.I().ocgcore.timeLimit);
// setTimeAbsolutely(1, Program.I().ocgcore.timeLimit);
// isTicking[0] = false;
// isTicking[1] = false;
// if (player == 0)
// {
// me.under.mainTexture = GameTextureManager.exBar;
// opponent.under.mainTexture = GameTextureManager.bar;
// }
// else
// {
// opponent.under.mainTexture = GameTextureManager.exBar;
// me.under.mainTexture = GameTextureManager.bar;
// }
// if (Program.I().ocgcore.timeLimit == 0)
// {
// me.api_timeHint.text = "infinite";
// opponent.api_timeHint.text = "infinite";
// }
// else
// {
// me.api_timeHint.text = "paused";
// opponent.api_timeHint.text = "paused";
// }
// }
// public bool amIdanger()
// {
// return time[0] < Program.I().ocgcore.timeLimit / 3;
// }
// void setTimeAbsolutely(int player, int t)
// {
// if (Program.I().ocgcore.timeLimit == 0)
// {
// return;
// }
// if (player == 0)
// {
// me.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString();
// opponent.api_timeHint.text = "waiting";
// me.api_timeBar.transform.DOKill();
// me.api_timeBar.transform.DOLocalMoveX((float)(me.api_timeBar.width) - (float)t / (float)Program.I().ocgcore.timeLimit * (float)(me.api_timeBar.width), 1f);
// }
// if (player == 1)
// {
// opponent.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString();
// me.api_timeHint.text = "waiting";
// opponent.api_timeBar.transform.DOKill();
// opponent.api_timeBar.transform.DOLocalMoveX((float)(opponent.api_timeBar.width) - (float)t / (float)Program.I().ocgcore.timeLimit * (float)(opponent.api_timeBar.width), 1f);
// }
// }
// public void realize()
// {
// me.api_healthHint.text = ((float)Program.I().ocgcore.life_0 > 0 ? Program.I().ocgcore.life_0 : 0).ToString();
// opponent.api_healthHint.text = ((float)Program.I().ocgcore.life_1 > 0 ? Program.I().ocgcore.life_1 : 0).ToString();
// me.api_name.text = Program.I().ocgcore.name_0_c;
// opponent.api_name.text = Program.I().ocgcore.name_1_c;
// me.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_0_c);
// opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c);
// // 玩家自己
// // me.api_healthBar.transform.DOKill();
// float myLpTargetX = (float)(me.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_0) / ((float)Program.I().ocgcore.lpLimit) * (float)(me.api_healthBar.width);
// me.api_healthBar.transform.DOLocalMoveX(myLpTargetX, 1f);
// // 对手
// // opponent.api_healthBar.transform.DOKill();
// float opLpTargetX = (float)(opponent.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_1) / ((float)Program.I().ocgcore.lpLimit) * (float)(opponent.api_healthBar.width);
// opponent.api_healthBar.transform.DOLocalMoveX(opLpTargetX, 1f);
// instance_lab.Clear();
// if (Program.I().ocgcore.confirmedCards.Count > 0)
// {
// instance_lab.Add(GameStringHelper.yijingqueren);
// }
// foreach (var item in Program.I().ocgcore.confirmedCards)
// {
// instance_lab.Add(item);
// }
// }
// static float getRealLife(float in_)
// {
// if (in_ < 0)
// {
// return 0;
// }
// if (in_ > Program.I().ocgcore.lpLimit)
// {
// return Program.I().ocgcore.lpLimit;
// }
// return in_;
// }
// void tick()
// {
// if (isTicking[0])
// {
// if (time[0] > 0)
// {
// time[0]--;
// }
// if (amIdanger())
// {
// if (Program.I().ocgcore != null)
// {
// Program.I().ocgcore.dangerTicking();
// }
// }
// setTimeAbsolutely(0, time[0]);
// }
// if (isTicking[1])
// {
// if (time[1] > 0)
// {
// time[1]--;
// }
// setTimeAbsolutely(1, time[1]);
// }
// }
// public enum chainCondition
// {
// standard, no, all, smart
// }
// public void set_condition(chainCondition c)
// {
// switch (c)
// {
// case chainCondition.standard:
// toggle_all.value = false;
// toggle_smart.value = false;
// toggle_ignore.value = false;
// break;
// case chainCondition.no:
// toggle_all.value = false;
// toggle_smart.value = false;
// toggle_ignore.value = true;
// break;
// case chainCondition.all:
// toggle_all.value = true;
// toggle_smart.value = false;
// toggle_ignore.value = false;
// break;
// case chainCondition.smart:
// toggle_all.value = false;
// toggle_smart.value = true;
// toggle_ignore.value = false;
// break;
// }
// }
// public chainCondition get_condition()
// {
// chainCondition res = chainCondition.standard;
// if (toggle_ignore.value)
// {
// res = chainCondition.no;
// }
// if (toggle_smart.value)
// {
// res = chainCondition.smart;
// }
// if (toggle_all.value)
// {
// res = chainCondition.all;
// }
// return res;
// }
// }
using System;
using System.Collections.Generic; using System.Collections.Generic;
using DG.Tweening; using DG.Tweening;
using UnityEngine; using UnityEngine;
public class gameUIbutton public class gameUIbutton
{ {
public string hashString; public string hashString;
...@@ -15,233 +528,446 @@ public class gameUIbutton ...@@ -15,233 +528,446 @@ public class gameUIbutton
public class gameInfo : MonoBehaviour public class gameInfo : MonoBehaviour
{ {
#region UI Components
[Header("UI Panel Components")]
public UITexture instance_btnPan; public UITexture instance_btnPan;
public UITextList instance_lab; public UITextList instance_lab;
[Header("Toggle Components")]
public UIToggle toggle_ignore; public UIToggle toggle_ignore;
public UIToggle toggle_all; public UIToggle toggle_all;
public UIToggle toggle_smart; public UIToggle toggle_smart;
[Header("Visual Elements")]
public GameObject line; public GameObject line;
public GameObject mod_healthBar;
#endregion
public void on_toggle_ignore() #region Private Fields
private barPngLoader me;
private barPngLoader opponent;
private readonly List<gameUIbutton> hashedButtons = new List<gameUIbutton>();
// Timing system
private readonly int[] time = new int[2];
private readonly bool[] isTicking = new bool[2];
private int lastTickTime = 0;
// UI positioning
public float width = 0;
public bool swaped = false;
// Cached values for performance
private float lastScreenWidth = 0;
private float lastScreenHeight = 0;
private Vector3 cachedMeScale = Vector3.one;
private Vector3 cachedOpponentScale = Vector3.one;
private Vector3 cachedBtnPanScale = Vector3.one;
// Constants
private const float ANIMATION_SPEED = 10f;
private const float DYING_ANIMATION_SPEED = 20f;
private const float SCALE_ANIMATION_DURATION = 0.3f;
private const float BUTTON_VERTICAL_SPACING = 75f;
private const float BASE_HEIGHT = 198f;
private const float MIN_HEIGHT = 174f;
private const int TICK_INTERVAL = 1000;
#endregion
#region Public Enums
public enum chainCondition
{ {
toggle_all.value = false; standard, no, all, smart
toggle_smart.value = false;
} }
#endregion
public void on_toggle_all() #region Unity Lifecycle
void Start()
{ {
toggle_ignore.value = false; Initialize();
toggle_smart.value = false;
} }
public void on_toggle_smart() void Update()
{ {
toggle_ignore.value = false; UpdateUIScaling();
toggle_all.value = false; UpdatePositions();
UpdateButtonAnimations();
UpdatePanelHeight();
HandleTicking();
} }
#endregion
//public UITextList hinter; #region Initialization
public void ini()
{
Initialize();
}
barPngLoader me; private void Initialize()
{
lastScreenWidth = Screen.width;
lastScreenHeight = Screen.height;
InitializeHealthBarsIfNeeded();
UpdateUIScaling();
}
barPngLoader opponent; private void InitializeHealthBarsIfNeeded()
{
if (me == null || opponent == null)
{
CreateHealthBars();
SetupHealthBarLayers();
ApplyConfigColors();
}
}
public GameObject mod_healthBar; private void CreateHealthBars()
{
me = CreateHealthBar();
opponent = CreateHealthBar();
}
public float width = 0; private barPngLoader CreateHealthBar()
{
var healthBarObj = Instantiate(mod_healthBar, new Vector3(1000, 0, 0), Quaternion.identity);
healthBarObj.transform.SetParent(transform);
return healthBarObj.GetComponent<barPngLoader>();
}
int lastTickTime = 0; private void SetupHealthBarLayers()
{
SetChildrenLayers(me.transform);
SetChildrenLayers(opponent.transform);
}
// Use this for initialization private void SetChildrenLayers(Transform parent)
void Start() {
var transforms = parent.GetComponentsInChildren<Transform>();
foreach (var child in transforms)
{ {
ini(); child.gameObject.layer = gameObject.layer;
}
} }
public void ini() private void ApplyConfigColors()
{ {
Update(); if (ColorUtility.TryParseHtmlString(Config.Getui("gameChainCheckArea.color"), out Color configColor))
{
ApplyColorToToggle("ignore_", configColor);
ApplyColorToToggle("watch_", configColor);
ApplyColorToToggle("use_", configColor);
}
} }
public bool swaped = false; private void ApplyColorToToggle(string toggleName, Color color)
{
var toggle = UIHelper.getByName<UIToggle>(gameObject, toggleName);
if (toggle != null)
{
var background = UIHelper.getByName<UISprite>(toggle.gameObject, "Background");
if (background != null)
{
background.color = color;
}
}
}
#endregion
void Update() #region Toggle Event Handlers
public void on_toggle_ignore()
{ {
if (me == null || opponent == null) SetExclusiveToggle(toggle_ignore);
}
public void on_toggle_all()
{ {
me = ((GameObject)MonoBehaviour.Instantiate(mod_healthBar, new Vector3(1000, 0, 0), Quaternion.identity)).GetComponent<barPngLoader>(); SetExclusiveToggle(toggle_all);
me.transform.SetParent(gameObject.transform); }
opponent = ((GameObject)MonoBehaviour.Instantiate(mod_healthBar, new Vector3(1000, 0, 0), Quaternion.identity)).GetComponent<barPngLoader>();
opponent.transform.SetParent(gameObject.transform);
Transform[] Transforms = me.GetComponentsInChildren<Transform>(); public void on_toggle_smart()
foreach (Transform child in Transforms)
{ {
child.gameObject.layer = gameObject.layer; SetExclusiveToggle(toggle_smart);
} }
Transforms = opponent.GetComponentsInChildren<Transform>();
foreach (Transform child in Transforms) private void SetExclusiveToggle(UIToggle activeToggle)
{ {
child.gameObject.layer = gameObject.layer; var toggles = new[] { toggle_ignore, toggle_all, toggle_smart };
foreach (var toggle in toggles)
{
if (toggle != activeToggle)
{
toggle.value = false;
}
}
}
#endregion
#region UI Scaling and Positioning
private void UpdateUIScaling()
{
if (HasScreenSizeChanged())
{
RecalculateScaling();
}
} }
Color c;
ColorUtility.TryParseHtmlString(Config.Getui("gameChainCheckArea.color"), out c); private bool HasScreenSizeChanged()
UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "ignore_").gameObject, "Background").color = c; {
UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "watch_").gameObject, "Background").color = c; return lastScreenWidth != Screen.width || lastScreenHeight != Screen.height;
UIHelper.getByName<UISprite>(UIHelper.getByName<UIToggle>(gameObject, "use_").gameObject, "Background").color = c;
} }
// float k = ((float)(Screen.width - Program.I().cardDescription.width)) / 1200f;
// if (k > 1.2f)
// {
// k = 1.2f;
// }
// if (k < 0.8f)
// {
// k = 0.8f;
// }
float k = (global::System.Object)Screen.width switch private void RecalculateScaling()
{
lastScreenWidth = Screen.width;
lastScreenHeight = Screen.height;
var scale = GetScaleForResolution(Screen.width);
var buttonScale = GetButtonScaleForResolution(Screen.width);
cachedMeScale = new Vector3(scale, scale, scale);
cachedOpponentScale = new Vector3(scale, scale, scale);
cachedBtnPanScale = new Vector3(buttonScale, buttonScale, buttonScale);
}
private float GetScaleForResolution(int screenWidth)
{
return screenWidth switch
{ {
1366 => 0.8f, 1366 => 0.8f,
1600 => 0.9f, 1600 => 0.9f,
1920 => 1.2f, 1920 => 1.2f,
2560 => 1.5f, 2560 => 1.5f,
_ => 1, _ => 1f
}; };
Vector3 ks = new Vector3(k, k, k); }
// float kb = ((float)(Screen.width - Program.I().cardDescription.width)) / 1200f;
// Debug.Log("kb:" + kb); private float GetButtonScaleForResolution(int screenWidth)
// if (kb > 1.2f) {
// { return screenWidth switch
// kb = 1.2f;
// }
// if (kb < 0.73f)
// {
// kb = 0.73f;
// }
float kb = (global::System.Object)Screen.width switch
{ {
1366 => 0.8f, 1366 => 0.8f,
1600 => 0.9f, 1600 => 0.9f,
1920 => 1.1f, 1920 => 1.1f,
2560 => 1.4f, 2560 => 1.4f,
_ => 1, _ => 1f
}; };
Vector3 ksb = new Vector3(kb, kb, kb); }
instance_btnPan.gameObject.transform.localScale = ksb;
opponent.transform.localScale = ks; private void UpdatePositions()
me.transform.localScale = ks; {
UpdateHealthBarPositions();
UpdateButtonPanelPosition();
UpdateLabPosition();
}
private void UpdateHealthBarPositions()
{
if (me == null || opponent == null) return;
me.transform.localScale = cachedMeScale;
opponent.transform.localScale = cachedOpponentScale;
var centerX = Screen.width / 2 - 14;
var centerY = Screen.height / 2 - 14;
var offset = cachedMeScale.x * opponent.under.height;
if (!swaped) if (!swaped)
{ {
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14); opponent.transform.localPosition = new Vector3(centerX, centerY);
me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height)); me.transform.localPosition = new Vector3(centerX, centerY - offset);
} }
else else
{ {
me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14); me.transform.localPosition = new Vector3(centerX, centerY);
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height)); opponent.transform.localPosition = new Vector3(centerX, centerY - offset);
}
} }
width = (225 * kb) + 15f; private void UpdateButtonPanelPosition()
float localPositionPanX = (((float)Screen.width - 225 * kb) / 2) - 15f; {
instance_btnPan.gameObject.transform.localScale = cachedBtnPanScale;
width = (225 * cachedBtnPanScale.x) + 15f;
float localPositionPanX = ((Screen.width - 225 * cachedBtnPanScale.x) / 2) - 15f;
instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 120, 0); instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 120, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width / 2 - 315, -Screen.height / 2 + 90 + Screen.safeArea.y, 0); }
int j = 0; private void UpdateLabPosition()
for (int i = 0; i < HashedButtons.Count; i++)
{
if (HashedButtons[i].gameObject != null)
{ {
if (HashedButtons[i].dying) instance_lab.transform.localPosition = new Vector3(
Screen.width / 2 - 315,
-Screen.height / 2 + 90 + Screen.safeArea.y,
0
);
}
#endregion
#region Button Management
public void addHashedButton(string hashString_, int hashInt, superButtonType type, string hint)
{ {
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -120, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 20f; var hashedButton = CreateHashedButton(hashString_, hashInt, type, hint);
if (Math.Abs(HashedButtons[i].gameObject.transform.localPosition.y - -120) < 1) hashedButtons.Add(hashedButton);
HashedButtons[i].dead = true; refreshLine();
} }
else
private gameUIbutton CreateHashedButton(string hashString_, int hashInt, superButtonType type, string hint)
{
var hashedButton = new gameUIbutton
{ {
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -220 - j * 75, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f; hashString = string.IsNullOrEmpty(hashString_) ? hashInt.ToString() : hashString_,
j++; response = hashInt,
gameObject = CreateButtonGameObject(hashString_, hashInt, type, hint),
dying = false
};
SetupButtonGameObject(hashedButton, hint);
return hashedButton;
} }
private GameObject CreateButtonGameObject(string hashString, int hashInt, superButtonType type, string hint)
{
var buttonObj = Program.I().create(Program.I().new_ui_superButtonTransparent);
var finalHashString = string.IsNullOrEmpty(hashString) ? hashInt.ToString() : hashString;
UIHelper.trySetLableText(buttonObj, "hint_", hint);
UIHelper.getRealEventGameObject(buttonObj).name = $"{finalHashString}----{hashInt}";
UIHelper.registUIEventTriggerForClick(buttonObj, listenerForClicked);
var iconSetter = buttonObj.GetComponent<iconSetForButton>();
iconSetter.setTexture(type);
iconSetter.setText(hint);
return buttonObj;
} }
else
HashedButtons[i].dead = true; private void SetupButtonGameObject(gameUIbutton hashedButton, string hint)
{
SetChildrenLayers(hashedButton.gameObject.transform);
hashedButton.gameObject.transform.SetParent(instance_btnPan.transform, false);
hashedButton.gameObject.transform.localScale = Vector3.zero;
hashedButton.gameObject.transform.localPosition = new Vector3(0, -120, 0);
hashedButton.gameObject.transform.localEulerAngles = Vector3.zero;
hashedButton.gameObject.transform.DOScale(new Vector3(0.9f, 0.9f, 0.9f), SCALE_ANIMATION_DURATION);
} }
for (int i = HashedButtons.Count - 1; i >= 0; i--)
private void UpdateButtonAnimations()
{ {
if (HashedButtons[i].dead) int activeButtonIndex = 0;
HashedButtons.RemoveAt(i);
for (int i = 0; i < hashedButtons.Count; i++)
{
var button = hashedButtons[i];
if (button.gameObject == null)
{
button.dead = true;
continue;
} }
float height = 198 + 75 * j;
if (j == 0) if (button.dying)
{ {
height = 174; AnimateButtonToDeathPosition(button);
} }
instance_btnPan.height += (int)(((float)height - (float)instance_btnPan.height) * 0.2f); else
if (Program.TimePassed() - lastTickTime > 1000)
{ {
lastTickTime = Program.TimePassed(); AnimateButtonToActivePosition(button, activeButtonIndex);
tick(); activeButtonIndex++;
} }
} }
List<gameUIbutton> HashedButtons = new List<gameUIbutton>(); RemoveDeadButtons();
}
public void addHashedButton(string hashString_, int hashInt, superButtonType type, string hint) private void AnimateButtonToDeathPosition(gameUIbutton button)
{
var targetPosition = new Vector3(0, -120, 0);
button.gameObject.transform.localPosition = Vector3.Lerp(
button.gameObject.transform.localPosition,
targetPosition,
Program.deltaTime * DYING_ANIMATION_SPEED
);
if (Vector3.Distance(button.gameObject.transform.localPosition, targetPosition) < 1f)
{ {
gameUIbutton hashedButton = new gameUIbutton(); button.dead = true;
string hashString = hashString_; }
if (hashString == "") }
private void AnimateButtonToActivePosition(gameUIbutton button, int index)
{ {
hashString = hashInt.ToString(); var targetPosition = new Vector3(0, -220 - index * BUTTON_VERTICAL_SPACING, 0);
button.gameObject.transform.localPosition = Vector3.Lerp(
button.gameObject.transform.localPosition,
targetPosition,
Program.deltaTime * ANIMATION_SPEED
);
} }
hashedButton.hashString = hashString;
hashedButton.response = hashInt; private void RemoveDeadButtons()
hashedButton.gameObject = Program.I().create(Program.I().new_ui_superButtonTransparent); {
UIHelper.trySetLableText(hashedButton.gameObject, "hint_", hint); for (int i = hashedButtons.Count - 1; i >= 0; i--)
UIHelper.getRealEventGameObject(hashedButton.gameObject).name = hashString + "----" + hashInt.ToString();
UIHelper.registUIEventTriggerForClick(hashedButton.gameObject, listenerForClicked);
hashedButton.gameObject.GetComponent<iconSetForButton>().setTexture(type);
hashedButton.gameObject.GetComponent<iconSetForButton>().setText(hint);
Transform[] Transforms = hashedButton.gameObject.GetComponentsInChildren<Transform>();
foreach (Transform child in Transforms)
{ {
child.gameObject.layer = instance_btnPan.gameObject.layer; if (hashedButtons[i].dead)
{
hashedButtons.RemoveAt(i);
}
} }
hashedButton.gameObject.transform.SetParent(instance_btnPan.transform, false);
hashedButton.gameObject.transform.localScale = Vector3.zero;
hashedButton.gameObject.transform.localPosition = new Vector3(0, -120, 0);
hashedButton.gameObject.transform.localEulerAngles = Vector3.zero;
hashedButton.gameObject.transform.DOScale(new Vector3(0.9f, 0.9f, 0.9f), 0.3f);
hashedButton.dying = false;
HashedButtons.Add(hashedButton);
refreshLine();
} }
void listenerForClicked(GameObject obj) private void UpdatePanelHeight()
{ {
string[] mats = obj.name.Split("----"); int activeButtonCount = GetActiveButtonCount();
if (mats.Length == 2) float targetHeight = activeButtonCount == 0 ? MIN_HEIGHT : BASE_HEIGHT + BUTTON_VERTICAL_SPACING * activeButtonCount;
instance_btnPan.height += (int)((targetHeight - instance_btnPan.height) * 0.2f);
}
private int GetActiveButtonCount()
{ {
for (int i = 0; i < HashedButtons.Count; i++) int count = 0;
foreach (var button in hashedButtons)
{ {
if (HashedButtons[i].hashString == mats[0]) if (!button.dying)
{ {
if (HashedButtons[i].response.ToString() == mats[1]) count++;
}
}
return count;
}
private void listenerForClicked(GameObject obj)
{
var parts = obj.name.Split("----");
if (parts.Length != 2) return;
var hashString = parts[0];
var responseString = parts[1];
var button = FindButtonByHash(hashString, responseString);
if (button != null)
{ {
Program.I().ocgcore.ES_gameUIbuttonClicked(HashedButtons[i]); Program.I().ocgcore.ES_gameUIbuttonClicked(button);
} }
} }
private gameUIbutton FindButtonByHash(string hashString, string responseString)
{
foreach (var button in hashedButtons)
{
if (button.hashString == hashString && button.response.ToString() == responseString)
{
return button;
} }
} }
return null;
} }
public bool queryHashedButton(string hashString) public bool queryHashedButton(string hashString)
{ {
for (int i = 0; i < HashedButtons.Count; i++) foreach (var button in hashedButtons)
{ {
if (HashedButtons[i].hashString == hashString && !HashedButtons[i].dying) if (button.hashString == hashString && !button.dying)
{ {
return true; return true;
} }
...@@ -251,72 +977,97 @@ public class gameInfo : MonoBehaviour ...@@ -251,72 +977,97 @@ public class gameInfo : MonoBehaviour
public void removeHashedButton(string hashString) public void removeHashedButton(string hashString)
{ {
gameUIbutton remove = null; var buttonToRemove = FindButtonToRemove(hashString);
for (int i = 0; i < HashedButtons.Count; i++) if (buttonToRemove != null)
{ {
if (HashedButtons[i].hashString == hashString) RemoveButton(buttonToRemove);
{ refreshLine();
remove = HashedButtons[i];
} }
} }
if (remove != null)
private gameUIbutton FindButtonToRemove(string hashString)
{ {
if (remove.gameObject != null) foreach (var button in hashedButtons)
{ {
Program.I().destroy(remove.gameObject, 0.3f, true); if (button.hashString == hashString)
{
return button;
} }
remove.dying = true;
} }
refreshLine(); return null;
} }
public void removeAll() private void RemoveButton(gameUIbutton button)
{ {
if (HashedButtons.Count == 1) if (button.gameObject != null)
{ {
if (HashedButtons[0].hashString == "swap") Program.I().destroy(button.gameObject, SCALE_ANIMATION_DURATION, true);
{
return;
} }
button.dying = true;
} }
for (int i = 0; i < HashedButtons.Count; i++)
public void removeAll()
{ {
if (HashedButtons[i].gameObject != null) if (ShouldKeepSwapButton()) return;
foreach (var button in hashedButtons)
{ {
Program.I().destroy(HashedButtons[i].gameObject, 0.3f, true); RemoveButton(button);
}
HashedButtons[i].dying = true;
} }
refreshLine(); refreshLine();
} }
void refreshLine() private bool ShouldKeepSwapButton()
{
int j = 0;
for (int i = 0; i < HashedButtons.Count; i++)
{ {
if (!HashedButtons[i].dying) return hashedButtons.Count == 1 && hashedButtons[0].hashString == "swap";
}
private void refreshLine()
{ {
j++; line.SetActive(GetActiveButtonCount() > 0);
} }
#endregion
#region Time Management
private void HandleTicking()
{
if (Program.TimePassed() - lastTickTime > TICK_INTERVAL)
{
lastTickTime = Program.TimePassed();
tick();
} }
line.SetActive(j > 0);
} }
int[] time = new int[2];
bool[] isTicking = new bool[2];
public void setTime(int player, int t) public void setTime(int player, int t)
{ {
if (player < 2) if (player >= 2) return;
{
time[player] = t; time[player] = t;
setTimeAbsolutely(player, t); setTimeAbsolutely(player, t);
isTicking[player] = true; isTicking[player] = true;
isTicking[1 - player] = false; isTicking[1 - player] = false;
}
public void setTimeStill(int player)
{
var timeLimit = Program.I().ocgcore.timeLimit;
time[0] = timeLimit;
time[1] = timeLimit;
setTimeAbsolutely(0, timeLimit);
setTimeAbsolutely(1, timeLimit);
isTicking[0] = false;
isTicking[1] = false;
setExcited(player);
UpdateTimeDisplayForStill(timeLimit);
} }
private void UpdateTimeDisplayForStill(int timeLimit)
{
var displayText = timeLimit == 0 ? "infinite" : "paused";
me.api_timeHint.text = displayText;
opponent.api_timeHint.text = displayText;
} }
public void setExcited(int player) public void setExcited(int player)
...@@ -333,182 +1084,156 @@ public class gameInfo : MonoBehaviour ...@@ -333,182 +1084,156 @@ public class gameInfo : MonoBehaviour
} }
} }
public bool amIdanger()
public void setTimeStill(int player)
{
time[0] = Program.I().ocgcore.timeLimit;
time[1] = Program.I().ocgcore.timeLimit;
setTimeAbsolutely(0, Program.I().ocgcore.timeLimit);
setTimeAbsolutely(1, Program.I().ocgcore.timeLimit);
isTicking[0] = false;
isTicking[1] = false;
if (player == 0)
{ {
me.under.mainTexture = GameTextureManager.exBar; return time[0] < Program.I().ocgcore.timeLimit / 3;
opponent.under.mainTexture = GameTextureManager.bar;
} }
else
private void setTimeAbsolutely(int player, int t)
{ {
opponent.under.mainTexture = GameTextureManager.exBar; var timeLimit = Program.I().ocgcore.timeLimit;
me.under.mainTexture = GameTextureManager.bar; if (timeLimit == 0) return;
var timeRatio = (float)t / timeLimit;
var barComponent = player == 0 ? me : opponent;
var otherComponent = player == 0 ? opponent : me;
UpdateTimeDisplay(barComponent, otherComponent, t, timeLimit, timeRatio);
} }
if (Program.I().ocgcore.timeLimit == 0)
private void UpdateTimeDisplay(barPngLoader activeBar, barPngLoader waitingBar, int currentTime, int timeLimit, float timeRatio)
{ {
me.api_timeHint.text = "infinite"; if (activeBar?.api_timeHint == null || waitingBar?.api_timeHint == null || activeBar?.api_timeBar == null)
opponent.api_timeHint.text = "infinite";
}
else
{ {
me.api_timeHint.text = "paused"; Program.DEBUGLOG("UpdateTimeDisplay: Required components are null");
opponent.api_timeHint.text = "paused"; return;
}
} }
public bool amIdanger() activeBar.api_timeHint.text = $"{currentTime}/{timeLimit}";
{ waitingBar.api_timeHint.text = "waiting";
return time[0] < Program.I().ocgcore.timeLimit / 3;
var targetX = activeBar.api_timeBar.width * (1f - timeRatio);
activeBar.api_timeBar.transform.DOKill();
activeBar.api_timeBar.transform.DOLocalMoveX(targetX, 1f);
} }
void setTimeAbsolutely(int player, int t) private void tick()
{ {
if (Program.I().ocgcore.timeLimit == 0) for (int player = 0; player < 2; player++)
{ {
return; if (isTicking[player] && time[player] > 0)
}
if (player == 0)
{ {
me.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString(); time[player]--;
opponent.api_timeHint.text = "waiting";
me.api_timeBar.transform.DOKill(); if (player == 0 && amIdanger() && Program.I().ocgcore != null)
me.api_timeBar.transform.DOLocalMoveX((float)(me.api_timeBar.width) - (float)t / (float)Program.I().ocgcore.timeLimit * (float)(me.api_timeBar.width), 1f);
}
if (player == 1)
{ {
opponent.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString(); Program.I().ocgcore.dangerTicking();
me.api_timeHint.text = "waiting"; }
opponent.api_timeBar.transform.DOKill(); setTimeAbsolutely(player, time[player]);
opponent.api_timeBar.transform.DOLocalMoveX((float)(opponent.api_timeBar.width) - (float)t / (float)Program.I().ocgcore.timeLimit * (float)(opponent.api_timeBar.width), 1f); }
} }
} }
#endregion
#region Health and Status Management
public void realize() public void realize()
{ {
me.api_healthHint.text = ((float)Program.I().ocgcore.life_0 > 0 ? Program.I().ocgcore.life_0 : 0).ToString(); UpdateHealthDisplay();
opponent.api_healthHint.text = ((float)Program.I().ocgcore.life_1 > 0 ? Program.I().ocgcore.life_1 : 0).ToString(); UpdatePlayerInfo();
me.api_name.text = Program.I().ocgcore.name_0_c; UpdateHealthBars();
opponent.api_name.text = Program.I().ocgcore.name_1_c; UpdateConfirmedCardsList();
me.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_0_c);
opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c);
// 玩家自己
// me.api_healthBar.transform.DOKill();
float myLpTargetX = (float)(me.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_0) / ((float)Program.I().ocgcore.lpLimit) * (float)(me.api_healthBar.width);
me.api_healthBar.transform.DOLocalMoveX(myLpTargetX, 1f);
// 对手
// opponent.api_healthBar.transform.DOKill();
float opLpTargetX = (float)(opponent.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_1) / ((float)Program.I().ocgcore.lpLimit) * (float)(opponent.api_healthBar.width);
opponent.api_healthBar.transform.DOLocalMoveX(opLpTargetX, 1f);
instance_lab.Clear();
if (Program.I().ocgcore.confirmedCards.Count > 0)
{
instance_lab.Add(GameStringHelper.yijingqueren);
} }
foreach (var item in Program.I().ocgcore.confirmedCards)
private void UpdateHealthDisplay()
{ {
instance_lab.Add(item); me.api_healthHint.text = Mathf.Max(Program.I().ocgcore.life_0, 0).ToString();
} opponent.api_healthHint.text = Mathf.Max(Program.I().ocgcore.life_1, 0).ToString();
} }
static float getRealLife(float in_) private void UpdatePlayerInfo()
{
if (in_ < 0)
{ {
return 0; me.api_name.text = Program.I().ocgcore.name_0_c;
opponent.api_name.text = Program.I().ocgcore.name_1_c;
me.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_0_c);
opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c);
} }
if (in_ > Program.I().ocgcore.lpLimit)
private void UpdateHealthBars()
{ {
return Program.I().ocgcore.lpLimit; var lpLimit = Program.I().ocgcore.lpLimit;
}
return in_; UpdateHealthBar(me, Program.I().ocgcore.life_0, lpLimit);
UpdateHealthBar(opponent, Program.I().ocgcore.life_1, lpLimit);
} }
void tick() private void UpdateHealthBar(barPngLoader barLoader, float currentLife, float lpLimit)
{
if (isTicking[0])
{ {
if (time[0] > 0) var realLife = getRealLife(currentLife);
{ var lifeRatio = realLife / lpLimit;
time[0]--; var targetX = barLoader.api_healthBar.width * (1f - lifeRatio);
barLoader.api_healthBar.transform.DOLocalMoveX(targetX, 1f);
} }
if (amIdanger())
{ private void UpdateConfirmedCardsList()
if (Program.I().ocgcore != null)
{ {
Program.I().ocgcore.dangerTicking(); instance_lab.Clear();
} var confirmedCards = Program.I().ocgcore.confirmedCards;
}
setTimeAbsolutely(0, time[0]); if (confirmedCards.Count > 0)
}
if (isTicking[1])
{ {
if (time[1] > 0) instance_lab.Add(GameStringHelper.yijingqueren);
foreach (var item in confirmedCards)
{ {
time[1]--; instance_lab.Add(item);
} }
setTimeAbsolutely(1, time[1]);
} }
} }
public enum chainCondition private static float getRealLife(float life)
{ {
standard, no, all, smart var lpLimit = Program.I().ocgcore.lpLimit;
return Mathf.Clamp(life, 0, lpLimit);
} }
#endregion
public void set_condition(chainCondition c) #region Chain Condition Management
public void set_condition(chainCondition condition)
{ {
switch (c) ResetAllToggles();
switch (condition)
{ {
case chainCondition.standard:
toggle_all.value = false;
toggle_smart.value = false;
toggle_ignore.value = false;
break;
case chainCondition.no: case chainCondition.no:
toggle_all.value = false;
toggle_smart.value = false;
toggle_ignore.value = true; toggle_ignore.value = true;
break; break;
case chainCondition.all: case chainCondition.all:
toggle_all.value = true; toggle_all.value = true;
toggle_smart.value = false;
toggle_ignore.value = false;
break; break;
case chainCondition.smart: case chainCondition.smart:
toggle_all.value = false;
toggle_smart.value = true; toggle_smart.value = true;
toggle_ignore.value = false; break;
case chainCondition.standard:
default:
// All toggles remain false for standard condition
break; break;
} }
} }
public chainCondition get_condition() private void ResetAllToggles()
{
chainCondition res = chainCondition.standard;
if (toggle_ignore.value)
{ {
res = chainCondition.no; toggle_ignore.value = false;
} toggle_all.value = false;
if (toggle_smart.value) toggle_smart.value = false;
{
res = chainCondition.smart;
} }
if (toggle_all.value)
public chainCondition get_condition()
{ {
res = chainCondition.all; if (toggle_ignore.value) return chainCondition.no;
} if (toggle_smart.value) return chainCondition.smart;
return res; if (toggle_all.value) return chainCondition.all;
return chainCondition.standard;
} }
#endregion
} }
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using DG.Tweening;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums; using YGOSharp.OCGWrapper.Enums;
using DG.Tweening;
public class GameField : OCGobject public class GameField : OCGobject
{ {
#region Private Fields
// P-Zone相关UI对象
[Header("P-Zone Numbers")]
public GameObject me_left_p_num; public GameObject me_left_p_num;
public GameObject me_right_p_num; public GameObject me_right_p_num;
public GameObject op_left_p_num; public GameObject op_left_p_num;
public GameObject op_right_p_num; public GameObject op_right_p_num;
GameObject p_hole_me = null;
GameObject p_hole_op = null; // P-Zone洞穴效果
Transform p_hole_mel = null; private GameObject p_hole_me = null;
Transform p_hole_opl = null; private GameObject p_hole_op = null;
Transform p_hole_mer = null; private Transform p_hole_mel = null;
Transform p_hole_opr = null; private Transform p_hole_opl = null;
private Transform p_hole_mer = null;
private Transform p_hole_opr = null;
// 游戏阶段和状态
public phaser Phase = null; public phaser Phase = null;
public bool mePHole = false; public bool mePHole = false;
public bool opPHole = false; public bool opPHole = false;
// 雷电定位器列表
public List<thunder_locator> thunders = new List<thunder_locator>(); public List<thunder_locator> thunders = new List<thunder_locator>();
UILabel label = null; // UI组件
private UILabel label = null;
List<gameHiddenButton> gameHiddenButtons = new List<gameHiddenButton>(); private readonly List<gameHiddenButton> gameHiddenButtons = new List<gameHiddenButton>();
// 文本网格组件
[Header("Location Text Meshes")]
public TMPro.TextMeshPro LOCATION_DECK_0; public TMPro.TextMeshPro LOCATION_DECK_0;
public TMPro.TextMeshPro LOCATION_EXTRA_0; public TMPro.TextMeshPro LOCATION_EXTRA_0;
public TMPro.TextMeshPro LOCATION_GRAVE_0; public TMPro.TextMeshPro LOCATION_GRAVE_0;
...@@ -37,83 +46,141 @@ public class GameField : OCGobject ...@@ -37,83 +46,141 @@ public class GameField : OCGobject
public TMPro.TextMeshPro LOCATION_GRAVE_1; public TMPro.TextMeshPro LOCATION_GRAVE_1;
public TMPro.TextMeshPro LOCATION_REMOVED_1; public TMPro.TextMeshPro LOCATION_REMOVED_1;
UITexture leftT; // 场地纹理
UITexture midT; private UITexture leftT;
UITexture rightT; private UITexture midT;
UITexture phaseTexure; private UITexture rightT;
private UITexture phaseTexure;
// 阶段回调返回值
public int retOfbp = -1; public int retOfbp = -1;
void onBP()
{
var m = new BinaryMaster();
m.writer.Write(retOfbp);
Program.I().ocgcore.sendReturn(m.get());
}
public int retOfEp = -1; public int retOfEp = -1;
void onEP() public int retOfMp = -1;
// 场地状态
private bool P = false;
private bool prelong = false;
private const float BASE_FIELD_HEIGHT = 819f;
private float fieldSprite_height = BASE_FIELD_HEIGHT;
public float delat = 0;
private float prereal = 0;
public bool isLong = false;
private readonly int[] fieldCode = new int[2] { 0, 0 };
// 黑洞效果
private GameObject cookie_dark_hole;
private int overCount = 0;
// 提示文本
private string currentString = "";
private GameObject big_string;
// 场地禁用容器
private readonly List<FieldDisabledContainer> field_disabled_containers = new List<FieldDisabledContainer>();
public ph currentPhase;
#endregion
#region Public Enums
public enum ph { dp, sp, mp1, bp, mp2, ep };
#endregion
#region Private Classes
private class FieldDisabledContainer
{ {
var m = new BinaryMaster(); public GPS p;
m.writer.Write(retOfEp); public Vector3 position;
Program.I().ocgcore.sendReturn(m.get()); public GameObject game_object;
public bool disabled = false;
} }
#endregion
public int retOfMp = -1; #region Constructor
void onMP() public GameField()
{ {
var m = new BinaryMaster(); InitializeGameObject();
m.writer.Write(retOfMp); InitializePNumbers();
Program.I().ocgcore.sendReturn(m.get()); InitializeGameHiddenButtons();
InitializeTextMeshes();
InitializeLabel();
loadNewField();
Program.I().ocgcore.AddUpdateAction_s(Update);
overCount = 0;
} }
public GameField() private void InitializeGameObject()
{ {
gameObject = create(Program.I().new_ocgcore_field, getGoodPosition(), Vector3.zero, false, Program.I().ui_container_3d, false); gameObject = create(Program.I().new_ocgcore_field, getGoodPosition(), Vector3.zero, false, Program.I().ui_container_3d, false);
UIHelper.getByName(gameObject, "obj_0").transform.localScale = Vector3.zero; UIHelper.getByName(gameObject, "obj_0").transform.localScale = Vector3.zero;
UIHelper.getByName(gameObject, "obj_1").transform.localScale = Vector3.zero; UIHelper.getByName(gameObject, "obj_1").transform.localScale = Vector3.zero;
Phase = gameObject.GetComponentInChildren<phaser>(); Phase = gameObject.GetComponentInChildren<phaser>();
Phase.bpAction = onBP; Phase.bpAction = onBP;
Phase.epAction = onEP; Phase.epAction = onEP;
Phase.mp2Action = onMP; Phase.mp2Action = onMP;
InitializeTextures();
}
private void InitializeTextures()
{
leftT = UIHelper.getByName<UITexture>(gameObject, "leftT"); leftT = UIHelper.getByName<UITexture>(gameObject, "leftT");
midT = UIHelper.getByName<UITexture>(gameObject, "midT"); midT = UIHelper.getByName<UITexture>(gameObject, "midT");
rightT = UIHelper.getByName<UITexture>(gameObject, "rightT"); rightT = UIHelper.getByName<UITexture>(gameObject, "rightT");
phaseTexure = UIHelper.getByName<UITexture>(gameObject, "phaseT"); phaseTexure = UIHelper.getByName<UITexture>(gameObject, "phaseT");
midT.border = new Vector4(0, 500, 0, 230); midT.border = new Vector4(0, 500, 0, 230);
// 清空纹理
leftT.mainTexture = null; leftT.mainTexture = null;
midT.mainTexture = null; midT.mainTexture = null;
rightT.mainTexture = null; rightT.mainTexture = null;
phaseTexure.mainTexture = null; phaseTexure.mainTexture = null;
}
private void InitializePNumbers()
{
me_left_p_num = create(Program.I().mod_ocgcore_number); me_left_p_num = create(Program.I().mod_ocgcore_number);
me_right_p_num = create(Program.I().mod_ocgcore_number); me_right_p_num = create(Program.I().mod_ocgcore_number);
op_left_p_num = create(Program.I().mod_ocgcore_number); op_left_p_num = create(Program.I().mod_ocgcore_number);
op_right_p_num = create(Program.I().mod_ocgcore_number); op_right_p_num = create(Program.I().mod_ocgcore_number);
}
Program.I().ocgcore.AddUpdateAction_s(Update); private void InitializeGameHiddenButtons()
{
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 0)); var locations = new[] { CardLocation.Deck, CardLocation.Extra, CardLocation.Grave, CardLocation.Removed };
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 0)); for (int player = 0; player <= 1; player++)
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 0)); {
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Removed, 0)); foreach (var location in locations)
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 1)); {
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 1)); gameHiddenButtons.Add(new gameHiddenButton(location, player));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 1)); }
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Removed, 1)); }
}
LOCATION_DECK_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
LOCATION_EXTRA_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
LOCATION_GRAVE_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
LOCATION_REMOVED_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
private void InitializeTextMeshes()
{
var textMeshRotation = new Vector3(60, 0, 0);
LOCATION_DECK_1 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_DECK_0 = CreateTextMesh(textMeshRotation);
LOCATION_EXTRA_1 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_EXTRA_0 = CreateTextMesh(textMeshRotation);
LOCATION_GRAVE_1 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_GRAVE_0 = CreateTextMesh(textMeshRotation);
LOCATION_REMOVED_1 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_REMOVED_0 = CreateTextMesh(textMeshRotation);
LOCATION_DECK_1 = CreateTextMesh(textMeshRotation);
LOCATION_EXTRA_1 = CreateTextMesh(textMeshRotation);
LOCATION_GRAVE_1 = CreateTextMesh(textMeshRotation);
LOCATION_REMOVED_1 = CreateTextMesh(textMeshRotation);
}
private TMPro.TextMeshPro CreateTextMesh(Vector3 rotation)
{
return create(Program.I().new_ui_textMesh, Vector3.zero, rotation).GetComponent<TMPro.TextMeshPro>();
}
private void InitializeLabel()
{
label = create(Program.I().mod_simple_ngui_text, new Vector3(0, 0, -14.5f), new Vector3(60, 0, 0), false, Program.I().ui_container_3d, false).GetComponent<UILabel>(); label = create(Program.I().mod_simple_ngui_text, new Vector3(0, 0, -14.5f), new Vector3(60, 0, 0), false, Program.I().ui_container_3d, false).GetComponent<UILabel>();
label.fontSize = 40; label.fontSize = 40;
label.overflowMethod = UILabel.Overflow.ShrinkContent; label.overflowMethod = UILabel.Overflow.ShrinkContent;
...@@ -122,281 +189,367 @@ public class GameField : OCGobject ...@@ -122,281 +189,367 @@ public class GameField : OCGobject
label.height = 40; label.height = 40;
label.transform.localScale = new Vector3(0.03f, 0.03f, 0.03f); label.transform.localScale = new Vector3(0.03f, 0.03f, 0.03f);
label.text = ""; label.text = "";
overCount = 0;
loadNewField();
} }
#endregion
public void loadOldField() #region Phase Callbacks
private void onBP()
{ {
if (File.Exists("textures/field2.png"))//YGOMobile Paths var m = new BinaryMaster();
m.writer.Write(retOfbp);
Program.I().ocgcore.sendReturn(m.get());
}
private void onEP()
{ {
Texture2D textureField = UIHelper.getTexture2D("textures/field2.png");//YGOMobile Paths var m = new BinaryMaster();
Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField); m.writer.Write(retOfEp);
leftT.mainTexture = textureFieldSliced[0]; Program.I().ocgcore.sendReturn(m.get());
midT.mainTexture = textureFieldSliced[1];
rightT.mainTexture = textureFieldSliced[2];
} }
else
private void onMP()
{ {
leftT.mainTexture = new Texture2D(100, 100); var m = new BinaryMaster();
midT.mainTexture = new Texture2D(100, 100); m.writer.Write(retOfMp);
rightT.mainTexture = new Texture2D(100, 100); Program.I().ocgcore.sendReturn(m.get());
} }
#endregion
#region Field Loading Methods
public void loadOldField()
{
LoadFieldTexture("textures/field2.png", false);
phaseTexure.mainTexture = GameTextureManager.phase; phaseTexure.mainTexture = GameTextureManager.phase;
gameObject.GetComponentInChildren<lazyBTNMOVER>().shift(false); gameObject.GetComponentInChildren<lazyBTNMOVER>().shift(false);
} }
public void loadNewField() public void loadNewField()
{ {
if (File.Exists("textures/field3.png"))//YGOMobile Paths LoadFieldTexture("textures/field3.png", true);
phaseTexure.mainTexture = null;
gameObject.GetComponentInChildren<lazyBTNMOVER>().shift(true);
}
private void LoadFieldTexture(string texturePath, bool isNewField)
{
if (File.Exists(texturePath))
{ {
Texture2D textureField = UIHelper.getTexture2D("textures/field3.png");//YGOMobile Paths Texture2D textureField = UIHelper.getTexture2D(texturePath);
Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField); Texture2D[] textureFieldSliced = UIHelper.sliceField(textureField);
leftT.mainTexture = textureFieldSliced[0]; SetFieldTextures(textureFieldSliced);
midT.mainTexture = textureFieldSliced[1];
rightT.mainTexture = textureFieldSliced[2];
} }
else else
{
SetDefaultTextures();
}
}
private void SetFieldTextures(Texture2D[] textures)
{
leftT.mainTexture = textures[0];
midT.mainTexture = textures[1];
rightT.mainTexture = textures[2];
}
private void SetDefaultTextures()
{ {
leftT.mainTexture = new Texture2D(100, 100); leftT.mainTexture = new Texture2D(100, 100);
midT.mainTexture = new Texture2D(100, 100); midT.mainTexture = new Texture2D(100, 100);
rightT.mainTexture = new Texture2D(100, 100); rightT.mainTexture = new Texture2D(100, 100);
} }
phaseTexure.mainTexture = null; #endregion
gameObject.GetComponentInChildren<lazyBTNMOVER>().shift(true);
}
bool P = false; #region P-Zone Management
public void relocatePnums(bool p) public void relocatePnums(bool p)
{
if (Program.I().ocgcore.MasterRule >= 4)
{ {
P = p; P = p;
if (p) var scale = new Vector3(2, 2, 2);
if (Program.I().ocgcore.MasterRule >= 4)
{ {
me_left_p_num.transform.localScale = new Vector3(2, 2, 2); SetPNumsTransformMasterRule4(p, scale);
me_left_p_num.transform.eulerAngles = new Vector3(30, -45, 0);
me_right_p_num.transform.localScale = new Vector3(2, 2, 2);
me_right_p_num.transform.eulerAngles = new Vector3(30, 45, 0);
op_left_p_num.transform.localScale = new Vector3(2, 2, 2);
op_left_p_num.transform.eulerAngles = new Vector3(0, -45, 0);
op_right_p_num.transform.localScale = new Vector3(2, 2, 2);
op_right_p_num.transform.eulerAngles = new Vector3(0, 45, 0);
} }
else else
{ {
me_left_p_num.transform.localScale = new Vector3(2, 2, 2); SetPNumsTransformLegacy(p, scale);
me_left_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
me_right_p_num.transform.localScale = new Vector3(2, 2, 2);
me_right_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
op_left_p_num.transform.localScale = new Vector3(2, 2, 2);
op_left_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
op_right_p_num.transform.localScale = new Vector3(2, 2, 2);
op_right_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
} }
} }
else
{ private void SetPNumsTransformMasterRule4(bool p, Vector3 scale)
P = p;
if (p)
{ {
me_left_p_num.transform.localScale = new Vector3(2, 2, 2); var meRotation = p ? new Vector3(30, -45, 0) : new Vector3(90, 0, 0);
me_left_p_num.transform.eulerAngles = new Vector3(0, -45, 0); var meRightRotation = p ? new Vector3(30, 45, 0) : new Vector3(90, 0, 0);
me_right_p_num.transform.localScale = new Vector3(2, 2, 2); var opRotation = p ? new Vector3(0, -45, 0) : new Vector3(90, 0, 0);
me_right_p_num.transform.eulerAngles = new Vector3(0, 45, 0); var opRightRotation = p ? new Vector3(0, 45, 0) : new Vector3(90, 0, 0);
op_left_p_num.transform.localScale = new Vector3(2, 2, 2);
op_left_p_num.transform.eulerAngles = new Vector3(0, -45, 0); SetPNumTransform(me_left_p_num, scale, meRotation);
op_right_p_num.transform.localScale = new Vector3(2, 2, 2); SetPNumTransform(me_right_p_num, scale, meRightRotation);
op_right_p_num.transform.eulerAngles = new Vector3(0, 45, 0); SetPNumTransform(op_left_p_num, scale, opRotation);
SetPNumTransform(op_right_p_num, scale, opRightRotation);
} }
else
private void SetPNumsTransformLegacy(bool p, Vector3 scale)
{ {
me_left_p_num.transform.localScale = new Vector3(2, 2, 2); var rotation = p ? new Vector3(0, -45, 0) : new Vector3(90, 0, 0);
me_left_p_num.transform.eulerAngles = new Vector3(90, 0, 0); var rightRotation = p ? new Vector3(0, 45, 0) : new Vector3(90, 0, 0);
me_right_p_num.transform.localScale = new Vector3(2, 2, 2);
me_right_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
op_left_p_num.transform.localScale = new Vector3(2, 2, 2);
op_left_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
op_right_p_num.transform.localScale = new Vector3(2, 2, 2);
op_right_p_num.transform.eulerAngles = new Vector3(90, 0, 0);
}
}
SetPNumTransform(me_left_p_num, scale, rotation);
SetPNumTransform(me_right_p_num, scale, rightRotation);
SetPNumTransform(op_left_p_num, scale, rotation);
SetPNumTransform(op_right_p_num, scale, rightRotation);
} }
public void dispose() private void SetPNumTransform(GameObject obj, Vector3 scale, Vector3 rotation)
{ {
Program.I().ocgcore.RemoveUpdateAction_s(Update); obj.transform.localScale = scale;
obj.transform.eulerAngles = rotation;
} }
#endregion
private static Vector3 getGoodPosition() #region Update Method
public void Update()
{ {
return new Vector3(0, 0, 0); UpdateFieldSize();
UpdateTextMeshPositions();
UpdateLabelPosition();
UpdatePHoleEffects();
UpdatePNumberPositions();
UpdateDisabledContainers();
} }
bool prelong = false; private void UpdateFieldSize()
float fieldSprite_height = 819f;
public float delat = 0;
float prereal = 0;
public void Update()
{ {
delat = ((isLong ? (40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : 0f)) / 110f * 5f; delat = (isLong ? (40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : 0f) / 110f * 5f;
fieldSprite_height += ((isLong ? (819f + 40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : 819f) - fieldSprite_height) * (Program.deltaTime * 4); float targetHeight = isLong ? (BASE_FIELD_HEIGHT + 40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : BASE_FIELD_HEIGHT;
fieldSprite_height += (targetHeight - fieldSprite_height) * (Program.deltaTime * 4);
midT.height = (int)fieldSprite_height; midT.height = (int)fieldSprite_height;
Vector3 position = midT.gameObject.transform.localPosition; Vector3 position = midT.gameObject.transform.localPosition;
position.y = fieldSprite_height - 819f; position.y = (fieldSprite_height - BASE_FIELD_HEIGHT) / 2;
position.y /= 2;
midT.gameObject.transform.localPosition = position; midT.gameObject.transform.localPosition = position;
UpdateGameObjectTransform();
UpdateSideTextures();
}
private void UpdateGameObjectTransform()
{
gameObject.transform.localPosition = getGoodPosition(); gameObject.transform.localPosition = getGoodPosition();
gameObject.transform.localScale = new Vector3(Program.fieldSize, Program.fieldSize, Program.fieldSize); gameObject.transform.localScale = new Vector3(Program.fieldSize, Program.fieldSize, Program.fieldSize);
leftT.transform.localScale = new Vector3(1f / Program.fieldSize, 1f / Program.fieldSize, 1f / Program.fieldSize); }
leftT.transform.localPosition = new Vector3(((-1f + 1f / Program.fieldSize) * (float)(leftT.width)) / 3.5f, 0, 0);
rightT.transform.localScale = new Vector3(1f / Program.fieldSize, 1f / Program.fieldSize, 1f / Program.fieldSize);
rightT.transform.localPosition = new Vector3(((1f - 1f / Program.fieldSize) * (float)(rightT.width)) / 3.5f, 0, 0);
relocateTextMesh(LOCATION_DECK_0, 0, CardLocation.Deck, new Vector3(0, 0, -3f)); private void UpdateSideTextures()
relocateTextMesh(LOCATION_EXTRA_0, 0, CardLocation.Extra, new Vector3(0, 0, -3f)); {
relocateTextMesh(LOCATION_REMOVED_0, 0, CardLocation.Removed, new Vector3(0, 0, -3f)); float scale = 1f / Program.fieldSize;
relocateTextMesh(LOCATION_GRAVE_0, 0, CardLocation.Grave, new Vector3(0, 0, -3f)); leftT.transform.localScale = new Vector3(scale, scale, scale);
leftT.transform.localPosition = new Vector3(((-1f + scale) * leftT.width) / 3.5f, 0, 0);
rightT.transform.localScale = new Vector3(scale, scale, scale);
rightT.transform.localPosition = new Vector3(((1f - scale) * rightT.width) / 3.5f, 0, 0);
}
relocateTextMesh(LOCATION_DECK_1, 1, CardLocation.Deck, new Vector3(0, 0, -3f)); private void UpdateTextMeshPositions()
relocateTextMesh(LOCATION_EXTRA_1, 1, CardLocation.Extra, new Vector3(0, 0, -3f)); {
relocateTextMesh(LOCATION_REMOVED_1, 1, CardLocation.Removed, new Vector3(0, 0, -3f)); var offset = new Vector3(0, 0, -3f);
relocateTextMesh(LOCATION_GRAVE_1, 1, CardLocation.Grave, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_DECK_0, 0, CardLocation.Deck, offset);
relocateTextMesh(LOCATION_EXTRA_0, 0, CardLocation.Extra, offset);
relocateTextMesh(LOCATION_REMOVED_0, 0, CardLocation.Removed, offset);
relocateTextMesh(LOCATION_GRAVE_0, 0, CardLocation.Grave, offset);
relocateTextMesh(LOCATION_DECK_1, 1, CardLocation.Deck, offset);
relocateTextMesh(LOCATION_EXTRA_1, 1, CardLocation.Extra, offset);
relocateTextMesh(LOCATION_REMOVED_1, 1, CardLocation.Removed, offset);
relocateTextMesh(LOCATION_GRAVE_1, 1, CardLocation.Grave, offset);
}
private void UpdateLabelPosition()
{
label.transform.localPosition = new Vector3(-5f * (Program.fieldSize - 1), 0, -15.5f * Program.fieldSize); label.transform.localPosition = new Vector3(-5f * (Program.fieldSize - 1), 0, -15.5f * Program.fieldSize);
}
private void UpdatePHoleEffects()
{
HandlePHoleCreation();
UpdatePHolePositions();
}
private void HandlePHoleCreation()
{
HandleMePHole();
HandleOpPHole();
if (prelong != isLong) if (prelong != isLong)
{ {
prelong = isLong; prelong = isLong;
for (int i = 0; i < field_disabled_containers.Count; i++) UpdateDisabledSpellZonePositions();
{ }
if (field_disabled_containers[i].p.location == (UInt32)CardLocation.SpellZone) }
private void HandleMePHole()
{ {
if (field_disabled_containers[i].p.controller == 1) if (mePHole && p_hole_me == null)
{ {
field_disabled_containers[i].position = Program.I().ocgcore.get_point_worldposition(field_disabled_containers[i].p); CreatePHole(ref p_hole_me, ref p_hole_mel, ref p_hole_mer);
if (field_disabled_containers[i].game_object != null) }
else if (!mePHole && p_hole_me != null)
{ {
field_disabled_containers[i].game_object.transform.position = field_disabled_containers[i].position; DestroyPHole(ref p_hole_me, ref p_hole_mel, ref p_hole_mer);
} }
} }
private void HandleOpPHole()
{
if (opPHole && p_hole_op == null)
{
CreatePHole(ref p_hole_op, ref p_hole_opl, ref p_hole_opr);
} }
else if (!opPHole && p_hole_op != null)
{
DestroyPHole(ref p_hole_op, ref p_hole_opl, ref p_hole_opr);
} }
} }
float real = (Program.fieldSize - 1) * 0.9f + 1f; private void CreatePHole(ref GameObject hole, ref Transform left, ref Transform right)
if (mePHole)
{ {
if (p_hole_me == null) hole = create(Program.I().mod_ocgcore_ss_p_idle_effect, Vector3.zero);
left = hole.transform.Find("l");
right = hole.transform.Find("r");
prereal = 0;
}
private void DestroyPHole(ref GameObject hole, ref Transform left, ref Transform right)
{ {
p_hole_me = create(Program.I().mod_ocgcore_ss_p_idle_effect, new Vector3(0, 0, 0)); destroy(hole, 0, false, true);
p_hole_mel = p_hole_me.transform.Find("l"); hole = null;
p_hole_mer = p_hole_me.transform.Find("r"); left = null;
right = null;
prereal = 0; prereal = 0;
} }
private void UpdatePHolePositions()
{
float real = (Program.fieldSize - 1) * 0.9f + 1f;
if (Mathf.Approximately(prereal, real)) return;
prereal = real;
if (Program.I().ocgcore.MasterRule >= 4)
{
UpdatePHolePositionsMasterRule4(real);
} }
else else
{ {
if (p_hole_me != null) UpdatePHolePositionsLegacy(real);
{
destroy(p_hole_me, 0, false, true);
p_hole_mel = null;
p_hole_mer = null;
prereal = 0;
} }
} }
if (opPHole)
{ private void UpdatePHolePositionsMasterRule4(float real)
if (p_hole_op == null)
{ {
p_hole_op = create(Program.I().mod_ocgcore_ss_p_idle_effect, new Vector3(0, 0, 0)); UpdatePHolePosition(p_hole_mel, p_hole_mer, new Vector3(-10.1f * real, 0, -11.5f * real), new Vector3(9.62f * real, 0, -11.5f * real));
p_hole_opl = p_hole_op.transform.Find("l"); UpdatePHolePosition(p_hole_opl, p_hole_opr, new Vector3(-10.1f * real, 0, 11.5f * real), new Vector3(9.62f * real, 0, 11.5f * real));
p_hole_opr = p_hole_op.transform.Find("r");
prereal = 0;
} }
private void UpdatePHolePositionsLegacy(float real)
{
UpdatePHolePosition(p_hole_mel, p_hole_mer, new Vector3(-15.2f * real, 0, -9f), new Vector3(14.65f * real, 0, -9f));
UpdatePHolePosition(p_hole_opl, p_hole_opr, new Vector3(-15.2f * real, 0, 9f), new Vector3(14.65f * real, 0, 9f));
} }
else
private void UpdatePHolePosition(Transform left, Transform right, Vector3 leftPos, Vector3 rightPos)
{ {
if (p_hole_op != null) if (left != null && right != null)
{ {
destroy(p_hole_op, 0, false, true); left.localPosition = leftPos;
p_hole_opl = null; right.localPosition = rightPos;
p_hole_opr = null;
prereal = 0;
} }
} }
if (prereal != real)
private void UpdatePNumberPositions()
{ {
prereal = real; float real = (Program.fieldSize - 1) * 0.9f + 1f;
if (Program.I().ocgcore.MasterRule >= 4) if (Program.I().ocgcore.MasterRule >= 4)
{ {
if (p_hole_mel != null && p_hole_mer != null) UpdatePNumberPositionsMasterRule4(real);
{
p_hole_mel.localPosition = new Vector3(-10.1f * real, 0, -11.5f * real);
p_hole_mer.localPosition = new Vector3(9.62f * real, 0, -11.5f * real);
} }
if (p_hole_opl != null && p_hole_opr != null) else
{ {
p_hole_opl.localPosition = new Vector3(-10.1f * real, 0, 11.5f * real); UpdatePNumberPositionsLegacy(real);
p_hole_opr.localPosition = new Vector3(9.62f * real, 0, 11.5f * real);
} }
} }
else
private void UpdatePNumberPositionsMasterRule4(float real)
{ {
if (p_hole_mel != null && p_hole_mer != null) if (P)
{ {
p_hole_mel.localPosition = new Vector3(-15.2f * real, 0, -9f); SetPNumberPosition(me_left_p_num, new Vector3(-10.1f * real + 1, 5, -11.5f * real - 1), -3f);
p_hole_mer.localPosition = new Vector3(14.65f * real, 0, -9f); SetPNumberPosition(me_right_p_num, new Vector3(9.62f * real - 1, 5, -11.5f * real - 1), -3f);
SetPNumberPosition(op_left_p_num, new Vector3(-10.1f * real + 1, 5, 11.5f * real - 1), -3f);
SetPNumberPosition(op_right_p_num, new Vector3(9.62f * real - 1, 5, 11.5f * real - 1), -3f);
} }
if (p_hole_opl != null && p_hole_opr != null) else
{ {
p_hole_opl.localPosition = new Vector3(-15.2f * real, 0, 9f); SetPNumberPosition(me_left_p_num, new Vector3(-10.1f * real, 0, -11.5f * real), -1f);
p_hole_opr.localPosition = new Vector3(14.65f * real, 0, 9f); SetPNumberPosition(me_right_p_num, new Vector3(9.62f * real, 0, -11.5f * real), -1f);
SetPNumberPosition(op_left_p_num, new Vector3(-10.1f * real, 0, 11.5f * real), -1f);
SetPNumberPosition(op_right_p_num, new Vector3(9.62f * real, 0, 11.5f * real), -1f);
} }
} }
} private void UpdatePNumberPositionsLegacy(float real)
if (Program.I().ocgcore.MasterRule >= 4)
{ {
if (P) if (P)
{ {
me_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-10.1f * real + 1, 5, -11.5f * real - 1), -3f); SetPNumberPosition(me_left_p_num, new Vector3(-15.2f * real, 5, -10f), -3f);
me_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(9.62f * real - 1, 5, -11.5f * real - 1), -3f); SetPNumberPosition(me_right_p_num, new Vector3(14.65f * real, 5, -10f), -3f);
op_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-10.1f * real + 1, 5, 11.5f * real - 1), -3f); SetPNumberPosition(op_left_p_num, new Vector3(-15.2f * real, 5, 8f), -3f);
op_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(9.62f * real - 1, 5, 11.5f * real - 1), -3f); SetPNumberPosition(op_right_p_num, new Vector3(14.65f * real, 5, 8f), -3f);
} }
else else
{ {
me_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-10.1f * real, 0, -11.5f * real), -1f); SetPNumberPosition(me_left_p_num, new Vector3(-15.2f * real, 0f, -9f), -1f);
me_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(9.62f * real, 0, -11.5f * real), -1f); SetPNumberPosition(me_right_p_num, new Vector3(14.65f * real, 0f, -9f), -1f);
op_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-10.1f * real, 0, 11.5f * real), -1f); SetPNumberPosition(op_left_p_num, new Vector3(-15.2f * real, 0f, 9f), -1f);
op_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(9.62f * real, 0, 11.5f * real), -1f); SetPNumberPosition(op_right_p_num, new Vector3(14.65f * real, 0f, 9f), -1f);
} }
} }
else
private void SetPNumberPosition(GameObject obj, Vector3 worldPos, float offset)
{ {
if (P) obj.transform.position = UIHelper.getCamGoodPosition(worldPos, offset);
}
private void UpdateDisabledContainers()
{
if (prelong != isLong)
{ {
me_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-15.2f * real, 5, -10f), -3f); UpdateDisabledSpellZonePositions();
me_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(14.65f * real, 5, -10f), -3f);
op_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-15.2f * real, 5, 8f), -3f);
op_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(14.65f * real, 5, 8f), -3f);
} }
else }
private void UpdateDisabledSpellZonePositions()
{ {
me_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-15.2f * real, 0f, -9f), -1f); foreach (var container in field_disabled_containers)
me_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(14.65f * real, 0f, -9f), -1f); {
op_left_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(-15.2f * real, 0f, 9f), -1f); if (container.p.location == (UInt32)CardLocation.SpellZone && container.p.controller == 1)
op_right_p_num.transform.position = UIHelper.getCamGoodPosition(new Vector3(14.65f * real, 0f, 9f), -1f); {
container.position = Program.I().ocgcore.get_point_worldposition(container.p);
if (container.game_object != null)
{
container.game_object.transform.position = container.position;
}
}
}
} }
#endregion
#region Utility Methods
public void dispose()
{
Program.I().ocgcore.RemoveUpdateAction_s(Update);
} }
private static Vector3 getGoodPosition()
{
return Vector3.zero;
} }
private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, CardLocation loc, Vector3 poi) private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, CardLocation loc, Vector3 poi)
...@@ -407,83 +560,81 @@ public class GameField : OCGobject ...@@ -407,83 +560,81 @@ public class GameField : OCGobject
location = (UInt32)loc location = (UInt32)loc
}) + poi, -2); }) + poi, -2);
} }
#endregion
public bool isLong = false; #region Field Code Management
int[] fieldCode = new int[2] { 0, 0 };
public void set(int player, int code) public void set(int player, int code)
{ {
if (player >= 0) if (player < 2) if (player < 0 || player >= 2) return;
{ if (fieldCode[player] == code) return;
if (fieldCode[player] != code)
{
fieldCode[player] = code; fieldCode[player] = code;
if (code > 0) if (code > 0)
{ {
Texture2D tex = null; SetFieldCode(player, code);
if (File.Exists("picture/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".png");
}
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".png");
} }
else if (File.Exists("pics/field/" + code.ToString() + ".png")) else
{
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".png");
}
else if (File.Exists("picture/field/" + code.ToString() + ".jpg"))
{ {
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".jpg"); HideFieldObject(player);
} }
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".jpg"))
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".jpg");
} }
else
private void SetFieldCode(int player, int code)
{ {
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".jpg"); Texture2D tex = LoadFieldCodeTexture(code);
} var obj = UIHelper.getByName(gameObject, $"obj_{player}");
if (tex != null) if (tex != null)
{ {
UIHelper.getByName<UITexture>(gameObject, "field_" + player.ToString()).mainTexture = tex; UIHelper.getByName<UITexture>(gameObject, $"field_{player}").mainTexture = tex;
var obj = UIHelper.getByName(gameObject, "obj_" + player.ToString()); AnimateFieldObject(obj, Vector3.one);
DOTween.Kill(obj.transform);
obj.transform.DOScale(new Vector3(1, 1, 1), 0.5f);
} }
else else
{ {
var obj = UIHelper.getByName(gameObject, "obj_" + player.ToString()); AnimateFieldObject(obj, Vector3.zero);
DOTween.Kill(obj.transform);
obj.transform.DOScale(Vector3.zero, 0.5f);
} }
} }
else
private Texture2D LoadFieldCodeTexture(int code)
{ {
var obj = UIHelper.getByName(gameObject, "obj_" + player.ToString()); string[] paths = {
DOTween.Kill(obj.transform); $"picture/field/{code}.png",
obj.transform.DOScale(Vector3.zero, 0.5f); $"expansions/pics/field/{code}.png",
} $"pics/field/{code}.png",
$"picture/field/{code}.jpg",
$"expansions/pics/field/{code}.jpg",
$"pics/field/{code}.jpg"
};
foreach (string path in paths)
{
if (File.Exists(path))
{
return UIHelper.getTexture2D(path);
} }
} }
return null;
} }
GameObject cookie_dark_hole; private void HideFieldObject(int player)
int overCount = 0;
public void shiftBlackHole(int a, Vector3 v = default(Vector3))
{
overCount += a;
if (overCount < 0)
{ {
overCount = 0; var obj = UIHelper.getByName(gameObject, $"obj_{player}");
AnimateFieldObject(obj, Vector3.zero);
} }
if (overCount > 2)
private void AnimateFieldObject(GameObject obj, Vector3 targetScale)
{ {
overCount = 2; DOTween.Kill(obj.transform);
obj.transform.DOScale(targetScale, 0.5f);
} }
#endregion
#region Black Hole Effects
public void shiftBlackHole(int a, Vector3 v = default(Vector3))
{
overCount = Mathf.Clamp(overCount + a, 0, 2);
if (overCount == 2) if (overCount == 2)
{ {
shiftBlackHole(true, v); shiftBlackHole(true, v);
...@@ -494,293 +645,277 @@ public class GameField : OCGobject ...@@ -494,293 +645,277 @@ public class GameField : OCGobject
{ {
if (on) if (on)
{ {
if (cookie_dark_hole == null) CreateBlackHole(v);
}
else
{
DestroyBlackHole(v);
}
}
private void CreateBlackHole(Vector3 position)
{ {
if (cookie_dark_hole != null) return;
Program.I().mod_ocgcore_ss_dark_hole.transform.localScale = Vector3.zero; Program.I().mod_ocgcore_ss_dark_hole.transform.localScale = Vector3.zero;
cookie_dark_hole = create(Program.I().mod_ocgcore_ss_dark_hole, v); cookie_dark_hole = create(Program.I().mod_ocgcore_ss_dark_hole, position);
cookie_dark_hole.transform.DOScale(new Vector3(6, 6, 6), 1f); cookie_dark_hole.transform.DOScale(new Vector3(6, 6, 6), 1f);
cookie_dark_hole.transform.eulerAngles = new Vector3(90, 0, 0); cookie_dark_hole.transform.eulerAngles = new Vector3(90, 0, 0);
} }
}
else private void DestroyBlackHole(Vector3 targetPosition)
{
if (cookie_dark_hole != null)
{ {
if (cookie_dark_hole == null) return;
Sequence seq = DOTween.Sequence(); Sequence seq = DOTween.Sequence();
seq.AppendInterval(1f); // 延迟1秒 seq.AppendInterval(1f);
seq.Append(cookie_dark_hole.transform.DOScale(Vector3.zero, 1f)); seq.Append(cookie_dark_hole.transform.DOScale(Vector3.zero, 1f));
seq.Join(cookie_dark_hole.transform.DOMove(v, 1f)); seq.Join(cookie_dark_hole.transform.DOMove(targetPosition, 1f));
destroy(cookie_dark_hole, 2.4f); // 延迟1秒 + 动画1秒 + 缓冲0.4秒 destroy(cookie_dark_hole, 2.4f);
cookie_dark_hole = null; // 避免重复销毁 cookie_dark_hole = null;
}
}
} }
#endregion
string currentString = ""; #region Hint System
public void setHint(string hint) public void setHint(string hint)
{ {
currentString = "T" + Program.I().ocgcore.turns.ToString() + " " + hint; currentString = $"T{Program.I().ocgcore.turns} {hint}";
realize(); realize();
} }
public void setHintLogical(string hint) public void setHintLogical(string hint)
{ {
currentString = "T" + Program.I().ocgcore.turns.ToString() + " " + hint; currentString = $"T{Program.I().ocgcore.turns} {hint}";
} }
GameObject big_string; #endregion
#region Animation Methods
public void animation_show_big_string(Texture2D tex, bool only = false) public void animation_show_big_string(Texture2D tex, bool only = false)
{ {
if (Ocgcore.inSkiping) if (Ocgcore.inSkiping) return;
{
return;
}
if (only) if (only)
{ {
destroy(big_string); destroy(big_string);
} }
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false, Program.I().ui_main_2d, true, new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize));
float scale = Screen.height / 1000f * Program.fieldSize;
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false, Program.I().ui_main_2d, true, new Vector3(scale, scale, scale));
big_string.GetComponentInChildren<UITexture>().mainTexture = tex; big_string.GetComponentInChildren<UITexture>().mainTexture = tex;
Program.I().ocgcore.Sleep(40); Program.I().ocgcore.Sleep(40);
big_string.AddComponent<animation_screen_lock2>(); big_string.AddComponent<animation_screen_lock2>();
destroy(big_string, 3f); destroy(big_string, 3f);
} }
class field_disabled_container public void animation_show_lp_num(int player, bool up, int count)
{ {
public GPS p; int color = up ? 3 : 0;
public Vector3 position; Vector3 screen_p = player == 0
public GameObject game_object; ? new Vector3(Program.I().ocgcore.getScreenCenter(), 100f, 5)
public bool disabled = false; : new Vector3(Program.I().ocgcore.getScreenCenter(), Screen.height - 100f, 5);
}
List<field_disabled_container> field_disabled_containers = new List<field_disabled_container>(); Vector3 position = Program.I().main_camera.ScreenToWorldPoint(screen_p);
public void set_point_disabled(GPS gps, bool disabled) GameObject obj = create(Program.I().mod_ocgcore_number);
obj.GetComponent<number_loader>().set_number(count, color);
obj.AddComponent<animation_screen_lock>().screen_point = screen_p;
obj.transform.position = position;
obj.transform.localScale = Vector3.zero;
obj.transform.eulerAngles = new Vector3(60, 0, 0);
obj.transform.DOScale(Vector3.one, 0.18f);
destroy(obj, 1f);
}
public void animation_screen_blood(int player, int amount_)
{ {
//temp int amount = Mathf.Min(amount_, 8000);
int count = amount / 250;
if (Program.I().ocgcore.MasterRule >= 4) CreateBloodEffects(player, count);
if (player == 0)
{ {
if (gps.location == (int)CardLocation.SpellZone) CreateScreenShakeAndBloodScreen(amount);
}
}
private void CreateBloodEffects(int player, int count)
{ {
if (gps.position == 0 || gps.position == 4) Vector3 basePosition = player == 0
? new Vector3(0, 0, -15f)
: new Vector3(0, 0, 15f);
for (int i = 0; i < count; i++)
{ {
disabled = false; Vector3 randomOffset = new Vector3(
} UnityEngine.Random.Range(-20, 20),
0,
player == 0 ? UnityEngine.Random.Range(0, -20) : UnityEngine.Random.Range(0, 20)
);
create(Program.I().mod_ocgcore_blood, basePosition + randomOffset);
} }
} }
field_disabled_container container = null; private void CreateScreenShakeAndBloodScreen(int amount)
{
Program.I().ocgcore.Sleep((int)(60 * (float)amount / 2500f));
float duration = (float)amount / 2500f;
float strength = (float)amount / 1500f;
Program.I().main_camera.transform.DOShakePosition(duration, strength);
foreach (field_disabled_container cont in field_disabled_containers) // 主血屏效果
CreateBloodScreenEffect(new Vector3(
Program.I().ocgcore.getScreenCenter(),
100f,
0.5f + 4000f / (float)amount
));
// 随机血屏效果
int bloodScreenCount = amount / 1000;
for (int i = 0; i < bloodScreenCount; i++)
{ {
if (cont.p.controller == gps.controller) CreateBloodScreenEffect(new Vector3(
(float)Screen.width / UnityEngine.Random.Range(10, 30) * 10f,
(float)Screen.height / UnityEngine.Random.Range(10, 30) * 10f,
0.5f + 4000f / (float)amount
));
}
}
private void CreateBloodScreenEffect(Vector3 screenPoint)
{ {
if (cont.p.location == gps.location) GameObject obj = create(Program.I().mod_ocgcore_blood_screen);
obj.AddComponent<animation_screen_lock>().screen_point = screenPoint;
destroy(obj, 2.5f);
}
#endregion
#region Field Disabled Management
public void set_point_disabled(GPS gps, bool disabled)
{ {
if (cont.p.sequence == gps.sequence) // Master Rule 4特殊处理
if (Program.I().ocgcore.MasterRule >= 4 &&
gps.location == (int)CardLocation.SpellZone &&
(gps.position == 0 || gps.position == 4))
{ {
container = cont; disabled = false;
break;
}
}
} }
var container = FindOrCreateDisabledContainer(gps);
container.disabled = disabled;
} }
private FieldDisabledContainer FindOrCreateDisabledContainer(GPS gps)
{
var container = field_disabled_containers.Find(cont =>
cont.p.controller == gps.controller &&
cont.p.location == gps.location &&
cont.p.sequence == gps.sequence);
if (container == null) if (container == null)
{ {
container = new field_disabled_container container = new FieldDisabledContainer
{ {
p = gps, p = gps,
position = Program.I().ocgcore.get_point_worldposition(gps) position = Program.I().ocgcore.get_point_worldposition(gps)
}; };
field_disabled_containers.Add(container); field_disabled_containers.Add(container);
} }
container.disabled = disabled; return container;
} }
public enum ph { dp, sp, mp1, bp, mp2, ep }; public void clearDisabled()
public ph currentPhase;
public void realize()
{ {
if (Phase.colliderBp.enabled) foreach (var container in field_disabled_containers)
{ {
Phase.labBp.gradientTop = Color.white; container.disabled = false;
} }
else
{
Phase.labBp.gradientTop = Color.grey;
}
if (Phase.colliderEp.enabled)
{
Phase.labEp.gradientTop = Color.white;
} }
else #endregion
#region Phase Management
public void realize()
{ {
Phase.labEp.gradientTop = Color.grey; UpdatePhaseLabels();
UpdateDisabledObjects();
UpdateLabelText();
} }
if (Phase.colliderMp2.enabled)
private void UpdatePhaseLabels()
{ {
Phase.labMp2.gradientTop = Color.white; // 设置可交互阶段的颜色
Phase.labBp.gradientTop = Phase.colliderBp.enabled ? Color.white : Color.grey;
Phase.labEp.gradientTop = Phase.colliderEp.enabled ? Color.white : Color.grey;
Phase.labMp2.gradientTop = Phase.colliderMp2.enabled ? Color.white : Color.grey;
// 重置所有阶段为灰色
SetPhaseLabelsGrey();
// 设置当前阶段为绿色
SetCurrentPhaseGreen();
} }
else
private void SetPhaseLabelsGrey()
{ {
Phase.labMp2.gradientTop = Color.grey;
}
Phase.labDp.gradientTop = Color.grey; Phase.labDp.gradientTop = Color.grey;
Phase.labSp.gradientTop = Color.grey; Phase.labSp.gradientTop = Color.grey;
Phase.labMp1.gradientTop = Color.grey; Phase.labMp1.gradientTop = Color.grey;
switch (currentPhase)
{
case ph.dp:
Phase.labDp.gradientTop = Color.green;
break;
case ph.sp:
Phase.labSp.gradientTop = Color.green;
break;
case ph.mp1:
Phase.labMp1.gradientTop = Color.green;
break;
case ph.bp:
Phase.labBp.gradientTop = Color.green;
break;
case ph.mp2:
Phase.labMp2.gradientTop = Color.green;
break;
case ph.ep:
Phase.labEp.gradientTop = Color.green;
break;
}
for (int i = 0; i < field_disabled_containers.Count; i++)
{
if (field_disabled_containers[i].disabled)
{
if (field_disabled_containers[i].game_object == null)
{
field_disabled_containers[i].game_object = create(Program.I().mod_simple_quad, field_disabled_containers[i].position, new Vector3(90, 0, 0), false, null, true);
field_disabled_containers[i].game_object.transform.localScale = Vector3.zero;
field_disabled_containers[i].game_object.transform.DOScale(new Vector3(4, 4, 4), 1f);
field_disabled_containers[i].game_object.GetComponent<Renderer>().material.mainTexture = GameTextureManager.negated;
}
}
else
{
destroy(field_disabled_containers[i].game_object, 0.6f, true, true);
}
} }
label.text = currentString; private void SetCurrentPhaseGreen()
}
public void clearDisabled()
{ {
for (int i = 0; i < field_disabled_containers.Count; i++) switch (currentPhase)
{ {
field_disabled_containers[i].disabled = false; case ph.dp: Phase.labDp.gradientTop = Color.green; break;
case ph.sp: Phase.labSp.gradientTop = Color.green; break;
case ph.mp1: Phase.labMp1.gradientTop = Color.green; break;
case ph.bp: Phase.labBp.gradientTop = Color.green; break;
case ph.mp2: Phase.labMp2.gradientTop = Color.green; break;
case ph.ep: Phase.labEp.gradientTop = Color.green; break;
} }
} }
public void animation_show_lp_num(int player, bool up, int count) private void UpdateDisabledObjects()
{ {
int color = 0; foreach (var container in field_disabled_containers)
if (up)
{ {
color = 3; if (container.disabled)
}
Vector3 position;
Vector3 screen_p;
if (player==0)
{ {
screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), 100f, 5); CreateDisabledEffect(container);
position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(), 100f, 5));
} }
else else
{ {
screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), Screen.height - 100f, 5); DestroyDisabledEffect(container);
position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(), Screen.height - 100f, 5)); }
}
} }
private void CreateDisabledEffect(FieldDisabledContainer container)
{
if (container.game_object != null) return;
container.game_object = create(Program.I().mod_simple_quad, container.position, new Vector3(90, 0, 0), false, null, true);
container.game_object.transform.localScale = Vector3.zero;
GameObject obj = create(Program.I().mod_ocgcore_number); container.game_object.transform.DOScale(new Vector3(4, 4, 4), 1f);
obj.GetComponent<number_loader>().set_number(count, color); container.game_object.GetComponent<Renderer>().material.mainTexture = GameTextureManager.negated;
obj.AddComponent<animation_screen_lock>().screen_point = screen_p;
obj.transform.position = position;
obj.transform.localScale = Vector3.zero;
obj.transform.eulerAngles = new Vector3(60, 0, 0);
obj.transform.DOScale(new Vector3(1, 1, 1), 0.18f);
destroy(obj, 1f);
} }
private void DestroyDisabledEffect(FieldDisabledContainer container)
public void animation_screen_blood(int player, int amount_)
{ {
int amount = amount_; if (container.game_object != null)
if (amount > 8000)
{ {
amount = 8000; destroy(container.game_object, 0.6f, true, true);
} container.game_object = null;
int count = ((int)amount) / 250;
for (int i = 0; i < count; i++)
{
if (player == 0)
{
create(
Program.I().mod_ocgcore_blood,
new Vector3(
UnityEngine.Random.Range(-20, 20),
0,
UnityEngine.Random.Range(-5, -25)
)
);
}
else
{
create(
Program.I().mod_ocgcore_blood,
new Vector3(
UnityEngine.Random.Range(-20, 20),
0,
UnityEngine.Random.Range(5, 25)
)
);
} }
} }
if (player == 0)
{
Program.I().ocgcore.Sleep((int)(60 * (float)amount / 2500f));
float duration = (float)amount / 2500f;
float strength = (float)amount / 1500f;
Program.I().main_camera.transform.DOShakePosition(duration, strength);
private void UpdateLabelText()
GameObject obj_ = create(Program.I().mod_ocgcore_blood_screen);
obj_.AddComponent<animation_screen_lock>().screen_point =
new Vector3(
Program.I().ocgcore.getScreenCenter(),
100f,
0.5f + 4000f / (float)amount);
destroy(obj_, 2.5f);
for (int i = 0; i < (int)amount / 1000; i++)
{ {
GameObject obj = create(Program.I().mod_ocgcore_blood_screen); label.text = currentString;
obj.AddComponent<animation_screen_lock>().screen_point =
new Vector3(
(float)Screen.width / (float)UnityEngine.Random.Range(10, 30) * 10f,
(float)Screen.height / (float)UnityEngine.Random.Range(10, 30) * 10f,
0.5f + 4000f / (float)amount);
destroy(obj, 2.5f);
}
}
} }
#endregion
} }
...@@ -273,6 +273,9 @@ public class Program : MonoBehaviour ...@@ -273,6 +273,9 @@ public class Program : MonoBehaviour
public static Vector3 cameraPosition = new Vector3(0, 23, -23); public static Vector3 cameraPosition = new Vector3(0, 23, -23);
public static Vector3 cameraRotation = new Vector3(60, 0, 0); public static Vector3 cameraRotation = new Vector3(60, 0, 0);
// public static Vector3 cameraPosition = new Vector3(0, 23, -40);
// public static Vector3 cameraRotation = new Vector3(35, 0, 0);
public static bool cameraFacing = false; public static bool cameraFacing = false;
public static float verticleScale = 5f; public static float verticleScale = 5f;
...@@ -747,8 +750,8 @@ public class Program : MonoBehaviour ...@@ -747,8 +750,8 @@ public class Program : MonoBehaviour
{ {
camera_game_main = this.main_camera; camera_game_main = this.main_camera;
} }
camera_game_main.transform.position = new Vector3(0, 23, -23); camera_game_main.transform.position = cameraPosition;
camera_game_main.transform.eulerAngles = new Vector3(60, 0, 0); camera_game_main.transform.eulerAngles = cameraRotation;
camera_game_main.transform.localScale = new Vector3(1, 1, 1); camera_game_main.transform.localScale = new Vector3(1, 1, 1);
camera_game_main.rect = new Rect(0, 0, 1, 1); camera_game_main.rect = new Rect(0, 0, 1, 1);
camera_game_main.depth = 0; camera_game_main.depth = 0;
...@@ -779,8 +782,8 @@ public class Program : MonoBehaviour ...@@ -779,8 +782,8 @@ public class Program : MonoBehaviour
camera_container_3d.cullingMask = (int)Mathf.Pow(2, 9); camera_container_3d.cullingMask = (int)Mathf.Pow(2, 9);
camera_container_3d.fieldOfView = 75; camera_container_3d.fieldOfView = 75;
camera_container_3d.rect = camera_game_main.rect; camera_container_3d.rect = camera_game_main.rect;
camera_container_3d.transform.position = new Vector3(0, 23, -23); camera_container_3d.transform.position = cameraPosition;
camera_container_3d.transform.eulerAngles = new Vector3(60, 0, 0); camera_container_3d.transform.eulerAngles = cameraRotation;
camera_container_3d.transform.localScale = new Vector3(1, 1, 1); camera_container_3d.transform.localScale = new Vector3(1, 1, 1);
camera_container_3d.rect = new Rect(0, 0, 1, 1); camera_container_3d.rect = new Rect(0, 0, 1, 1);
camera_container_3d.clearFlags = CameraClearFlags.Depth; camera_container_3d.clearFlags = CameraClearFlags.Depth;
...@@ -818,8 +821,8 @@ public class Program : MonoBehaviour ...@@ -818,8 +821,8 @@ public class Program : MonoBehaviour
camera_main_3d.cullingMask = (int)Mathf.Pow(2, 10); camera_main_3d.cullingMask = (int)Mathf.Pow(2, 10);
camera_main_3d.fieldOfView = 75; camera_main_3d.fieldOfView = 75;
camera_main_3d.rect = new Rect(0, 0, 1, 1); camera_main_3d.rect = new Rect(0, 0, 1, 1);
camera_main_3d.transform.position = new Vector3(0, 23, -23); camera_main_3d.transform.position = cameraPosition;
camera_main_3d.transform.eulerAngles = new Vector3(60, 0, 0); camera_main_3d.transform.eulerAngles = cameraRotation;
camera_main_3d.transform.localScale = new Vector3(1, 1, 1); camera_main_3d.transform.localScale = new Vector3(1, 1, 1);
camera_main_3d.clearFlags = CameraClearFlags.Depth; camera_main_3d.clearFlags = CameraClearFlags.Depth;
......
...@@ -148,21 +148,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -148,21 +148,6 @@ public class DeckManager : ServantWithCardDescription
itemOnListProducer, itemOnListProducer,
86 86
); );
// Program.go(
// 500,
// () =>
// {
// List<MonoCardInDeckManager> cs = new List<MonoCardInDeckManager>();
// for (int i = 0; i < 300; i++)
// {
// cs.Add(createCard());
// }
// for (int i = 0; i < 300; i++)
// {
// destroyCard(cs[i]);
// }
// }
// );
} }
GameObject itemOnListProducer(string[] Args) GameObject itemOnListProducer(string[] Args)
...@@ -1461,7 +1446,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1461,7 +1446,7 @@ public class DeckManager : ServantWithCardDescription
{ {
// 判定为拖拽,开始拖拽卡牌 // 判定为拖拽,开始拖拽卡牌
cardInDragging = cardForLongPress; cardInDragging = cardForLongPress;
cardInDragging.beginDrag(); cardInDragging.BeginDrag();
cardForLongPress = null; // 清除长按检测状态 cardForLongPress = null; // 清除长按检测状态
isContinuouslyAdding = false; // 确保连续添加状态也被重置 isContinuouslyAdding = false; // 确保连续添加状态也被重置
} }
...@@ -1633,12 +1618,12 @@ public class DeckManager : ServantWithCardDescription ...@@ -1633,12 +1618,12 @@ public class DeckManager : ServantWithCardDescription
if ((cardInSearchResult.data.Type & (UInt32)CardType.Token) == 0) if ((cardInSearchResult.data.Type & (UInt32)CardType.Token) == 0)
{ {
MonoCardInDeckManager card = createCard(); MonoCardInDeckManager card = createCard();
card.transform.position = card.getGoodPosition(4); card.transform.position = card.GetMouseWorldPosition(4f);
card.cardData = cardInSearchResult.data; card.cardData = cardInSearchResult.data;
card.gameObject.layer = 16; card.gameObject.layer = 16;
deck.IMain.Add(card); deck.IMain.Add(card);
cardInDragging = card; cardInDragging = card;
card.beginDrag(); card.BeginDrag();
} }
} }
} }
...@@ -1650,11 +1635,11 @@ public class DeckManager : ServantWithCardDescription ...@@ -1650,11 +1635,11 @@ public class DeckManager : ServantWithCardDescription
if (cardInDragging != null) if (cardInDragging != null)
{ {
// 第一步:终止拖拽,设置物理状态 // 第一步:终止拖拽,设置物理状态
cardInDragging.endDrag(); cardInDragging.EndDrag();
// 第二步:逻辑判断是否仍应纳入卡组 // 第二步:逻辑判断是否仍应纳入卡组
if (condition == Condition.changeSide && !cardInDragging.IsInDeckArea()) { } if (condition == Condition.changeSide && !cardInDragging.IsInDeckArea()) { }
else if (cardInDragging.getIfAlive()) else if (cardInDragging.IsAlive())
{ {
deckDirty = true; deckDirty = true;
} }
...@@ -1684,7 +1669,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1684,7 +1669,7 @@ public class DeckManager : ServantWithCardDescription
Program.pointedGameObject.GetComponent<MonoCardInDeckManager>(); Program.pointedGameObject.GetComponent<MonoCardInDeckManager>();
if (cardInDeck != null) if (cardInDeck != null)
{ {
cardInDeck.killIt(); // 标记为待删除 cardInDeck.KillCard(); // 标记为待删除
// 从数据结构中移除 // 从数据结构中移除
deck.IMain.Remove(cardInDeck); deck.IMain.Remove(cardInDeck);
deck.IExtra.Remove(cardInDeck); deck.IExtra.Remove(cardInDeck);
...@@ -1734,7 +1719,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1734,7 +1719,7 @@ public class DeckManager : ServantWithCardDescription
if (checkBanlistAvail(data.Id)) if (checkBanlistAvail(data.Id))
{ {
MonoCardInDeckManager card = createCard(); MonoCardInDeckManager card = createCard();
card.transform.position = card.getGoodPosition(4); card.transform.position = card.GetMouseWorldPosition(4f);
card.cardData = data; card.cardData = data;
card.gameObject.layer = 16; card.gameObject.layer = 16;
if (data.IsExtraCard()) if (data.IsExtraCard())
...@@ -1974,11 +1959,11 @@ public class DeckManager : ServantWithCardDescription ...@@ -1974,11 +1959,11 @@ public class DeckManager : ServantWithCardDescription
Vector3 rightPosition = right.gameObject.transform.position; Vector3 rightPosition = right.gameObject.transform.position;
if (leftPosition.y > 3f) if (leftPosition.y > 3f)
{ {
leftPosition = MonoCardInDeckManager.refLectPosition(leftPosition); leftPosition = MonoCardInDeckManager.ReflectPositionToGround(leftPosition);
} }
if (rightPosition.y > 3f) if (rightPosition.y > 3f)
{ {
rightPosition = MonoCardInDeckManager.refLectPosition(rightPosition); rightPosition = MonoCardInDeckManager.ReflectPositionToGround(rightPosition);
} }
if (leftPosition.z > -3 && rightPosition.z > -3) if (leftPosition.z > -3 && rightPosition.z > -3)
{ {
...@@ -2020,7 +2005,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -2020,7 +2005,7 @@ public class DeckManager : ServantWithCardDescription
for (int i = 0; i < deckTemp.Count; i++) for (int i = 0; i < deckTemp.Count; i++)
{ {
Vector3 p = deckTemp[i].gameObject.transform.position; Vector3 p = deckTemp[i].gameObject.transform.position;
if (deckTemp[i].getIfAlive() == true) if (deckTemp[i].IsAlive())
{ {
if (p.z > -8) if (p.z > -8)
{ {
...@@ -2179,7 +2164,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -2179,7 +2164,7 @@ public class DeckManager : ServantWithCardDescription
// tweenToVectorAndFall 本身就是DoTween动画, 它会独立运行, // tweenToVectorAndFall 本身就是DoTween动画, 它会独立运行,
// 而我们的Sequence只负责在正确的时间点触发它。 // 而我们的Sequence只负责在正确的时间点触发它。
card.tweenToVectorAndFall(toVector, new Vector3(90, 0, 0)); card.TweenToPositionAndFall(toVector, new Vector3(90, 0, 0));
}); });
} }
...@@ -2247,7 +2232,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -2247,7 +2232,7 @@ public class DeckManager : ServantWithCardDescription
0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k, 0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k,
11.8f - v.x * 4f 11.8f - v.x * 4f
); );
deck.IMain[i].tweenToVectorAndFall(toVector, toAngle); deck.IMain[i].TweenToPositionAndFall(toVector, toAngle);
} }
for (int i = 0; i < deck.IExtra.Count; i++) for (int i = 0; i < deck.IExtra.Count; i++)
{ {
...@@ -2265,7 +2250,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -2265,7 +2250,7 @@ public class DeckManager : ServantWithCardDescription
0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k, 0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k,
-6.2f -6.2f
); );
deck.IExtra[i].tweenToVectorAndFall(toVector, toAngle); deck.IExtra[i].TweenToPositionAndFall(toVector, toAngle);
} }
for (int i = 0; i < deck.ISide.Count; i++) for (int i = 0; i < deck.ISide.Count; i++)
...@@ -2284,7 +2269,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -2284,7 +2269,7 @@ public class DeckManager : ServantWithCardDescription
0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k, 0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k,
-12f -12f
); );
deck.ISide[i].tweenToVectorAndFall(toVector, toAngle); deck.ISide[i].TweenToPositionAndFall(toVector, toAngle);
} }
} }
......
...@@ -166,22 +166,22 @@ namespace YGOSharp ...@@ -166,22 +166,22 @@ namespace YGOSharp
{ {
foreach (var item in stack) foreach (var item in stack)
{ {
if (item.cardData.Id == code && item.getIfAlive()) if (item.cardData.Id == code && item.IsAlive())
{ {
returnValue++; returnValue++;
continue; continue;
} }
if (item.cardData.Alias == code && item.getIfAlive()) if (item.cardData.Alias == code && item.IsAlive())
{ {
returnValue++; returnValue++;
continue; continue;
} }
if (item.cardData.Id == al && item.getIfAlive()) if (item.cardData.Id == al && item.IsAlive())
{ {
returnValue++; returnValue++;
continue; continue;
} }
if (item.cardData.Alias == al && item.getIfAlive() && al > 0) if (item.cardData.Alias == al && item.IsAlive() && al > 0)
{ {
returnValue++; returnValue++;
continue; continue;
...@@ -244,7 +244,7 @@ namespace YGOSharp ...@@ -244,7 +244,7 @@ namespace YGOSharp
public List<MonoCardInDeckManager> getAllObjectCardAndDeload() public List<MonoCardInDeckManager> getAllObjectCardAndDeload()
{ {
List<MonoCardInDeckManager> r = new List<MonoCardInDeckManager>(); List<MonoCardInDeckManager> r = new List<MonoCardInDeckManager>();
IList<MonoCardInDeckManager>[] stacks = { IMain, IExtra, ISide,IRemoved }; IList<MonoCardInDeckManager>[] stacks = { IMain, IExtra, ISide, IRemoved };
foreach (var stack in stacks) foreach (var stack in stacks)
{ {
foreach (var item in stack) foreach (var item in stack)
......
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!114 &1 --- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12004, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PixelRect:
serializedVersion: 2
x: 0
y: 66
width: 1107
height: 601
m_ShowMode: 0
m_Title: Build Settings
m_RootView: {fileID: 4}
m_MinSize: {x: 640, y: 601}
m_MaxSize: {x: 4000, y: 4021}
m_Maximized: 0
--- !u!114 &2
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -19,12 +43,62 @@ MonoBehaviour: ...@@ -19,12 +43,62 @@ MonoBehaviour:
width: 1512 width: 1512
height: 916 height: 916
m_ShowMode: 4 m_ShowMode: 4
m_Title: Hierarchy m_Title: Simulator
m_RootView: {fileID: 2} m_RootView: {fileID: 5}
m_MinSize: {x: 875, y: 300} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1 m_Maximized: 1
--- !u!114 &2 --- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: BuildPlayerWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1107
height: 601
m_MinSize: {x: 640, y: 601}
m_MaxSize: {x: 4000, y: 4021}
m_ActualView: {fileID: 15}
m_Panes:
- {fileID: 15}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12010, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1107
height: 601
m_MinSize: {x: 640, y: 601}
m_MaxSize: {x: 4000, y: 4021}
vertical: 0
controlID: 1594
--- !u!114 &5
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -37,9 +111,9 @@ MonoBehaviour: ...@@ -37,9 +111,9 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Children: m_Children:
- {fileID: 3} - {fileID: 6}
- {fileID: 5} - {fileID: 8}
- {fileID: 4} - {fileID: 7}
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
...@@ -52,7 +126,7 @@ MonoBehaviour: ...@@ -52,7 +126,7 @@ MonoBehaviour:
m_TopViewHeight: 30 m_TopViewHeight: 30
m_UseBottomView: 1 m_UseBottomView: 1
m_BottomViewHeight: 20 m_BottomViewHeight: 20
--- !u!114 &3 --- !u!114 &6
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -74,7 +148,7 @@ MonoBehaviour: ...@@ -74,7 +148,7 @@ MonoBehaviour:
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName: m_LastLoadedLayoutName:
--- !u!114 &4 --- !u!114 &7
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -95,7 +169,7 @@ MonoBehaviour: ...@@ -95,7 +169,7 @@ MonoBehaviour:
height: 20 height: 20
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
--- !u!114 &5 --- !u!114 &8
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -108,8 +182,8 @@ MonoBehaviour: ...@@ -108,8 +182,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Children: m_Children:
- {fileID: 6} - {fileID: 9}
- {fileID: 11} - {fileID: 14}
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
...@@ -119,8 +193,8 @@ MonoBehaviour: ...@@ -119,8 +193,8 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200} m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 16 controlID: 31
--- !u!114 &6 --- !u!114 &9
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -133,8 +207,8 @@ MonoBehaviour: ...@@ -133,8 +207,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Children: m_Children:
- {fileID: 7}
- {fileID: 10} - {fileID: 10}
- {fileID: 13}
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
...@@ -144,8 +218,8 @@ MonoBehaviour: ...@@ -144,8 +218,8 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200} m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192} m_MaxSize: {x: 16192, y: 16192}
vertical: 1 vertical: 1
controlID: 17 controlID: 32
--- !u!114 &7 --- !u!114 &10
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -158,8 +232,8 @@ MonoBehaviour: ...@@ -158,8 +232,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Children: m_Children:
- {fileID: 8} - {fileID: 11}
- {fileID: 9} - {fileID: 12}
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
...@@ -169,8 +243,8 @@ MonoBehaviour: ...@@ -169,8 +243,8 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100} m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096} m_MaxSize: {x: 16192, y: 8096}
vertical: 0 vertical: 0
controlID: 18 controlID: 69
--- !u!114 &8 --- !u!114 &11
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -191,12 +265,12 @@ MonoBehaviour: ...@@ -191,12 +265,12 @@ MonoBehaviour:
height: 444 height: 444
m_MinSize: {x: 201, y: 221} m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 13} m_ActualView: {fileID: 17}
m_Panes: m_Panes:
- {fileID: 13} - {fileID: 17}
m_Selected: 0 m_Selected: 0
m_LastSelected: 0 m_LastSelected: 0
--- !u!114 &9 --- !u!114 &12
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -215,15 +289,15 @@ MonoBehaviour: ...@@ -215,15 +289,15 @@ MonoBehaviour:
y: 0 y: 0
width: 864.5 width: 864.5
height: 444 height: 444
m_MinSize: {x: 202, y: 221} m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4002, y: 4021} m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 14} m_ActualView: {fileID: 18}
m_Panes: m_Panes:
- {fileID: 12} - {fileID: 16}
- {fileID: 14} - {fileID: 18}
m_Selected: 1 m_Selected: 1
m_LastSelected: 0 m_LastSelected: 0
--- !u!114 &10 --- !u!114 &13
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -242,15 +316,15 @@ MonoBehaviour: ...@@ -242,15 +316,15 @@ MonoBehaviour:
y: 444 y: 444
width: 1147 width: 1147
height: 422 height: 422
m_MinSize: {x: 101, y: 121} m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 16} m_ActualView: {fileID: 20}
m_Panes: m_Panes:
- {fileID: 15} - {fileID: 19}
- {fileID: 16} - {fileID: 20}
m_Selected: 1 m_Selected: 1
m_LastSelected: 0 m_LastSelected: 0
--- !u!114 &11 --- !u!114 &14
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -269,14 +343,65 @@ MonoBehaviour: ...@@ -269,14 +343,65 @@ MonoBehaviour:
y: 0 y: 0
width: 365 width: 365
height: 866 height: 866
m_MinSize: {x: 276, y: 71} m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 17} m_ActualView: {fileID: 21}
m_Panes: m_Panes:
- {fileID: 17} - {fileID: 21}
m_Selected: 0 m_Selected: 0
m_LastSelected: 0 m_LastSelected: 0
--- !u!114 &12 --- !u!114 &15
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12043, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 640, y: 580}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Build Settings
m_Image: {fileID: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0
y: 66
width: 1107
height: 580
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_OverlaysVisible: 1
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs:
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 0}
m_SearchString:
--- !u!114 &16
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -292,7 +417,7 @@ MonoBehaviour: ...@@ -292,7 +417,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4000, y: 4000}
m_TitleContent: m_TitleContent:
m_Text: Scene m_Text: Scene
m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000,
type: 0} type: 0}
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
...@@ -638,7 +763,7 @@ MonoBehaviour: ...@@ -638,7 +763,7 @@ MonoBehaviour:
m_SceneVisActive: 1 m_SceneVisActive: 1
m_LastLockedObject: {fileID: 0} m_LastLockedObject: {fileID: 0}
m_ViewIsLockedToObject: 0 m_ViewIsLockedToObject: 0
--- !u!114 &13 --- !u!114 &17
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -654,7 +779,7 @@ MonoBehaviour: ...@@ -654,7 +779,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4000, y: 4000}
m_TitleContent: m_TitleContent:
m_Text: Hierarchy m_Text: Hierarchy
m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000,
type: 0} type: 0}
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
...@@ -671,9 +796,9 @@ MonoBehaviour: ...@@ -671,9 +796,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 04b00000 m_SelectedIDs:
m_LastClickedID: 45060 m_LastClickedID: 0
m_ExpandedIDs: c6f5ffff16f6ffffecf9ffff06fbffff m_ExpandedIDs: 5634e9ffa634e9ff7238e9ff705ff1ffc05ff1ff9663f1ff8447f2ff304bf2ff704df2ff944df2ff9a4df2ffa64df2ff0e4ff2ff5250f2ffa250f2ff7854f2ff1c6af4ff6c6af4ff426ef4fff08cfcff408dfcff1691fcffb032feff0033feffd636feff06fbffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -689,7 +814,7 @@ MonoBehaviour: ...@@ -689,7 +814,7 @@ MonoBehaviour:
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 0 m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 8} m_ClientGUIView: {fileID: 11}
m_SearchString: m_SearchString:
m_ExpandedScenes: [] m_ExpandedScenes: []
m_CurrenRootInstanceID: 0 m_CurrenRootInstanceID: 0
...@@ -697,7 +822,7 @@ MonoBehaviour: ...@@ -697,7 +822,7 @@ MonoBehaviour:
m_IsLocked: 0 m_IsLocked: 0
m_CurrentSortingName: TransformSorting m_CurrentSortingName: TransformSorting
m_WindowGUID: 4c969a2b90040154d917609493e03593 m_WindowGUID: 4c969a2b90040154d917609493e03593
--- !u!114 &14 --- !u!114 &18
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -713,7 +838,7 @@ MonoBehaviour: ...@@ -713,7 +838,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4000, y: 4000}
m_TitleContent: m_TitleContent:
m_Text: Simulator m_Text: Simulator
m_Image: {fileID: 8720083202187608617, guid: 0000000000000000d000000000000000, m_Image: {fileID: 3038311277492192215, guid: 0000000000000000d000000000000000,
type: 0} type: 0}
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
...@@ -735,7 +860,7 @@ MonoBehaviour: ...@@ -735,7 +860,7 @@ MonoBehaviour:
m_ShowGizmos: 0 m_ShowGizmos: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 1} m_ClearColor: {r: 0, g: 0, b: 0, a: 1}
m_TargetSize: {x: 2778, y: 1284} m_TargetSize: {x: 1920, y: 1080}
m_TextureFilterMode: 0 m_TextureFilterMode: 0
m_TextureHideFlags: 61 m_TextureHideFlags: 61
m_RenderIMGUI: 1 m_RenderIMGUI: 1
...@@ -758,7 +883,7 @@ MonoBehaviour: ...@@ -758,7 +883,7 @@ MonoBehaviour:
friendlyName: Apple iPhone 13 Pro Max friendlyName: Apple iPhone 13 Pro Max
networkReachability: 1 networkReachability: 1
systemLanguage: 10 systemLanguage: 10
--- !u!114 &15 --- !u!114 &19
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -774,14 +899,14 @@ MonoBehaviour: ...@@ -774,14 +899,14 @@ MonoBehaviour:
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
m_TitleContent: m_TitleContent:
m_Text: Project m_Text: Project
m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000,
type: 0} type: 0}
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 540 y: 540
width: 1148 width: 1146
height: 401 height: 401
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
...@@ -813,9 +938,9 @@ MonoBehaviour: ...@@ -813,9 +938,9 @@ MonoBehaviour:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 100} scrollPos: {x: 0, y: 100}
m_SelectedIDs: cebf0000 m_SelectedIDs: fcc10000
m_LastClickedID: 49102 m_LastClickedID: 49660
m_ExpandedIDs: 0000000070ae000072ae000074ae000076ae000078ae00007aae00007cae0000 m_ExpandedIDs: 0000000068ae00006aae00006cae00006eae000070ae000072ae000074ae000000ca9a3bffffff7f
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -831,7 +956,7 @@ MonoBehaviour: ...@@ -831,7 +956,7 @@ MonoBehaviour:
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 10} m_ClientGUIView: {fileID: 13}
m_SearchString: m_SearchString:
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
...@@ -843,7 +968,7 @@ MonoBehaviour: ...@@ -843,7 +968,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 0000000070ae000072ae000074ae000076ae000078ae00007aae00007cae0000 m_ExpandedIDs: 0000000068ae00006aae00006cae00006eae000070ae000072ae000074ae0000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -870,7 +995,7 @@ MonoBehaviour: ...@@ -870,7 +995,7 @@ MonoBehaviour:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c62300000000000096d2000090d20000 m_ExpandedInstanceIDs: c62300000000000096d2000090d20000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
...@@ -887,7 +1012,7 @@ MonoBehaviour: ...@@ -887,7 +1012,7 @@ MonoBehaviour:
m_IsRenaming: 0 m_IsRenaming: 0
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 10} m_ClientGUIView: {fileID: 13}
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
m_InstanceID: 0 m_InstanceID: 0
...@@ -899,7 +1024,7 @@ MonoBehaviour: ...@@ -899,7 +1024,7 @@ MonoBehaviour:
m_GridSize: 64 m_GridSize: 64
m_SkipHiddenPackages: 0 m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 207 m_DirectoriesAreaWidth: 207
--- !u!114 &16 --- !u!114 &20
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -915,7 +1040,7 @@ MonoBehaviour: ...@@ -915,7 +1040,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4000, y: 4000}
m_TitleContent: m_TitleContent:
m_Text: Console m_Text: Console
m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000,
type: 0} type: 0}
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
...@@ -929,7 +1054,7 @@ MonoBehaviour: ...@@ -929,7 +1054,7 @@ MonoBehaviour:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
m_SaveData: [] m_SaveData: []
m_OverlaysVisible: 1 m_OverlaysVisible: 1
--- !u!114 &17 --- !u!114 &21
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
......
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