Commit 03cbf456 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 6f2a7aa4
Pipeline #5230 failed with stage
in 10 minutes and 15 seconds
...@@ -78,34 +78,30 @@ public class gameInfo : MonoBehaviour ...@@ -78,34 +78,30 @@ public class gameInfo : MonoBehaviour
.color = c; .color = c;
} }
var k = (Screen.width - Program.I().cardDescription.width) / 1200f; var k = Mathf.Clamp((Utils.UIWidth() - Program.I().cardDescription.width) / 1200f, 0.8f, 1.2f);
if (k > 1.2f) k = 1.2f; var ks = k * Vector3.one;
if (k < 0.8f) k = 0.8f; var kb = Mathf.Clamp((Utils.UIWidth() - Program.I().cardDescription.width) / 1200f, 0.73f, 1.2f);
var ks = new Vector3(k, k, k); var ksb = kb * Vector3.one;
var kb = (Screen.width - Program.I().cardDescription.width) / 1200f;
if (kb > 1.2f) kb = 1.2f;
if (kb < 0.73f) kb = 0.73f;
var ksb = new Vector3(kb, kb, kb);
instance_btnPan.gameObject.transform.localScale = ksb; instance_btnPan.gameObject.transform.localScale = ksb;
opponent.transform.localScale = ks; opponent.transform.localScale = ks;
me.transform.localScale = ks; me.transform.localScale = ks;
if (!swaped) if (!swaped)
{ {
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14); opponent.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 14, Utils.UIHeight() / 2 - 14);
me.transform.localPosition = me.transform.localPosition =
new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * opponent.under.height); new Vector3(Utils.UIWidth() / 2 - 14, Utils.UIHeight() / 2 - 14 - k * opponent.under.height);
} }
else else
{ {
me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14); me.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 14, Utils.UIHeight() / 2 - 14);
opponent.transform.localPosition = opponent.transform.localPosition =
new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * opponent.under.height); new Vector3(Utils.UIWidth() / 2 - 14, Utils.UIHeight() / 2 - 14 - k * opponent.under.height);
} }
width = 150 * kb + 15f; width = 150 * kb + 15f;
var localPositionPanX = (Screen.width - 150 * kb) / 2 - 15f; var localPositionPanX = (Utils.UIWidth() - 150 * kb) / 2 - 15f;
instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 145, 0); instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 145, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width / 2 - 315, -Screen.height / 2 + 90, 0); instance_lab.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 315, -Utils.UIHeight() / 2 + 90, 0);
var j = 0; var j = 0;
foreach (var t in HashedButtons) foreach (var t in HashedButtons)
if (t.gameObject != null) if (t.gameObject != null)
...@@ -113,16 +109,14 @@ public class gameInfo : MonoBehaviour ...@@ -113,16 +109,14 @@ public class gameInfo : MonoBehaviour
if (t.dying) if (t.dying)
{ {
t.gameObject.transform.localPosition += t.gameObject.transform.localPosition +=
(new Vector3(0, -120, 0) - t.gameObject.transform.localPosition) * (new Vector3(0, -120, 0) - t.gameObject.transform.localPosition) * Program.deltaTime * 20f;
Program.deltaTime * 20f; if (Math.Abs(t.gameObject.transform.localPosition.y - -120) < 1) t.dead = true;
if (Math.Abs(t.gameObject.transform.localPosition.y - -120) < 1)
t.dead = true;
} }
else else
{ {
t.gameObject.transform.localPosition += t.gameObject.transform.localPosition +=
(new Vector3(0, -145 - j * 50, 0) - t.gameObject.transform.localPosition) * (new Vector3(0, -145 - j * 50, 0) - t.gameObject.transform.localPosition) * Program.deltaTime *
Program.deltaTime * 10f; 10f;
j++; j++;
} }
} }
......
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