forked from akanyan/mu3-mods
feat: implement Pause, better InfiniteGP
This commit is contained in:
45
InfiniteGP/MU3.User/patch_UIMoneyExchange.cs
Normal file
45
InfiniteGP/MU3.User/patch_UIMoneyExchange.cs
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma warning disable CS0626
|
||||
#pragma warning disable CS0649
|
||||
|
||||
using MU3.CustomUI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
public class patch_UICredit: UICredit {
|
||||
private Animator gpAnimator_;
|
||||
private GameObject creditRoot_;
|
||||
private MU3UICounter credit_;
|
||||
private GameObject freePlayRoot_;
|
||||
private GameObject gpRoot_;
|
||||
private MU3UICounter gp_;
|
||||
private MU3UICounter gpPlus_;
|
||||
private MU3UICounter gpMinus_;
|
||||
private MU3UIImageChanger netIcon_;
|
||||
private void onUpdateGP(int value) { /* nop */ }
|
||||
|
||||
public extern void orig_initialize();
|
||||
|
||||
public new void initialize() {
|
||||
orig_initialize();
|
||||
|
||||
DestroyImmediate(gpAnimator_);
|
||||
|
||||
creditRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
credit_.transform.localScale = new Vector3(0, 0, 0);
|
||||
freePlayRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gp_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpPlus_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpMinus_.transform.localScale = new Vector3(0, 0, 0);
|
||||
|
||||
var tf = (RectTransform)netIcon_.transform;
|
||||
tf.localPosition = new Vector3(35, netIcon_.transform.localPosition.y, netIcon_.transform.localPosition.z);
|
||||
for(int i = 0; i < 3; ++i) {
|
||||
tf.anchorMin = new Vector2(0f, 0.5f);
|
||||
tf.anchorMax = new Vector2(1f, 0.5f);
|
||||
tf = (RectTransform)tf.parent;
|
||||
}
|
||||
netIcon_.image.rectTransform.pivot = new Vector2(0f, 0.5f);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user