Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        rect   = GetComponent <RectTransform>();
        nowOil = MoveCarsor.getOil();
        var pos = rect.anchoredPosition + new Vector2(0, Screen.height * nowOil / 100f);

        rect.anchoredPosition = pos;
        PreviousOil           = nowOil;//Update最初のif判定用のダミー
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        nowOil = MoveCarsor.getOil();

        if (nowOil != PreviousOil)
        {
            var pos = rect.anchoredPosition + new Vector2(0, Screen.height * (nowOil - PreviousOil) / 100);
            rect.anchoredPosition = pos;
        }

        PreviousOil = nowOil;
    }
Beispiel #3
0
    // Update is called once per frame
    void Update()
    {
        string nowOil = MoveCarsor.getOil().ToString();

        text.text = nowOil + " / 100";
    }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        string nowMoney = MoveCarsor.getMoney().ToString();

        text.text = "所持金:" + nowMoney + "G";
    }
Beispiel #5
0
 void Start()
 {
     MoveCarsor = GameObject.Find("Icon");
     script     = MoveCarsor.GetComponent <MoveCarsor>();
 }
Beispiel #6
0
    // Update is called once per frame
    void Update()
    {
        string nowJewels = MoveCarsor.getJewels().ToString();

        text.text = "x " + nowJewels;
    }
Beispiel #7
0
 void Start()
 {
     icon   = GameObject.Find("Icon");
     script = icon.GetComponent <MoveCarsor>();
 }