Commit 0c195f46 authored by 赤子奈落's avatar 赤子奈落

add new shortcut function: F4 for switch card description

parent d4085c3c
...@@ -13,6 +13,8 @@ public class upMode : MonoBehaviour ...@@ -13,6 +13,8 @@ public class upMode : MonoBehaviour
Transform ui_main_2d; Transform ui_main_2d;
Transform new_toolBar_watchRecord; Transform new_toolBar_watchRecord;
Transform new_toolBar_watchDuel; Transform new_toolBar_watchDuel;
Transform chat_;
Transform confirmed;
public float timescale = 1; public float timescale = 1;
YGOSharp.OCGWrapper.Enums.GameMessage message = YGOSharp.OCGWrapper.Enums.GameMessage.Waiting; YGOSharp.OCGWrapper.Enums.GameMessage message = YGOSharp.OCGWrapper.Enums.GameMessage.Waiting;
void Start() void Start()
...@@ -21,11 +23,29 @@ public class upMode : MonoBehaviour ...@@ -21,11 +23,29 @@ public class upMode : MonoBehaviour
hasChanged = false; hasChanged = false;
ui_back_ground_2d = GameObject.Find("ui_back_ground_2d").transform; ui_back_ground_2d = GameObject.Find("ui_back_ground_2d").transform;
ui_main_2d = GameObject.Find("ui_main_2d").transform; ui_main_2d = GameObject.Find("ui_main_2d").transform;
chat_ = GameObject.Find("ui_back_ground_2d").transform.Find("new_cardDescriptionRemaster/chat_");
confirmed = GameObject.Find("ui_back_ground_2d").transform.Find("new_gameInfoRemaster/confirmed");
} }
void Update() void Update()
{ {
if (Input.GetKeyUp(KeyCode.F4))
{
if(Program.I().cardDescription.isShowed)
{
Program.I().cardDescription.hide();
chat_.GetComponent<UILabel>().fontSize = 0;
confirmed.GetComponent<UILabel>().fontSize = 0;
}
else
{
Program.I().cardDescription.show();
chat_.GetComponent<UILabel>().fontSize = 20;
confirmed.GetComponent<UILabel>().fontSize = 20;
}
}
if (Input.GetKeyDown(KeyCode.F5)) if (Input.GetKeyDown(KeyCode.F5))
{ {
if (upmode) if (upmode)
......
...@@ -11415,15 +11415,15 @@ PrefabInstance: ...@@ -11415,15 +11415,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3} - target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 0.0021459227 value: 0.0027359782
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3} - target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 0.0021459227 value: 0.0027359782
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3} - target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 0.0021459227 value: 0.0027359782
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3} - target: {fileID: 455926, guid: 110e0a191727d5f4f8860ae0957652dd, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
......
...@@ -129,9 +129,7 @@ public class CardDescription : Servant ...@@ -129,9 +129,7 @@ public class CardDescription : Servant
{ {
underSprite.height = Utils.UIHeight() + 4; underSprite.height = Utils.UIHeight() + 4;
gameObject.transform.DOMove( gameObject.transform.DOMove(
Utils.UIToWorldPoint(new Vector3(-underSprite.width - 20, Utils.UIToWorldPoint(new Vector3(-underSprite.width - 20, (float)Utils.UIHeight() / 2, 0)), 0.6f);
(float) Utils.UIHeight() / 2, 0)),
1.2f);
setTitle(""); setTitle("");
resizer.gameObject.GetComponent<BoxCollider>().enabled = false; resizer.gameObject.GetComponent<BoxCollider>().enabled = false;
} }
...@@ -142,7 +140,7 @@ public class CardDescription : Servant ...@@ -142,7 +140,7 @@ public class CardDescription : Servant
if (gameObject != null) if (gameObject != null)
{ {
underSprite.height = Utils.UIHeight() + 4; underSprite.height = Utils.UIHeight() + 4;
gameObject.transform.DOMove(Utils.UIToWorldPoint(new Vector3(-2, (float) Utils.UIHeight() / 2, 0)), 1.2f); gameObject.transform.DOMove(Utils.UIToWorldPoint(new Vector3(-2, (float) Utils.UIHeight() / 2, 0)), 0.6f);
resizer.gameObject.GetComponent<BoxCollider>().enabled = true; resizer.gameObject.GetComponent<BoxCollider>().enabled = true;
} }
} }
......
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