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