Exemplo n.º 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判定用のダミー
    }
Exemplo n.º 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;
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        string nowOil = MoveCarsor.getOil().ToString();

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

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

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