コード例 #1
0
ファイル: UICursor.cs プロジェクト: crafics/globetrotter2
        void Update()
        {
            UnitPlayer player = GameControl.GetPlayer();

            if (player == null)
            {
                return;
            }

            cursorT.localPosition = Input.mousePosition * UIMainControl.GetScaleFactor();

            rectDefaultCursor.sizeDelta = cursorDefaultSize + new Vector2(player.GetRecoil() * 2, player.GetRecoil() * 2);

            if (player.Reloading())
            {
                ShowReloading();
                imgReloading.fillAmount = player.GetCurrentReload() / player.GetReloadDuration();
            }
            else
            {
                HideReloading();
            }
        }