Пример #1
0
 public GlobalTimerInfo(GlobalTimeOrientation _orientation, GlobalTimeCountingMode _countingMode, float _maxTime, bool _min, bool _sec, bool _millisec)
 {
     _globalTimeOrientation  = _orientation;
     _globalTimeCountingMode = _countingMode;
     MaxTime         = _maxTime;
     useMinutes      = _min;
     useSeconds      = _sec;
     useMilliseconds = _millisec;
 }
Пример #2
0
    public void AnchorDown(GlobalTimeOrientation orientation)
    {
        var parTransform = Parent.GetComponent <RectTransform>();

        if (orientation == GlobalTimeOrientation.bottom)
        {
            parTransform.anchorMin = new Vector2(0.5f, 0);
            parTransform.anchorMax = new Vector2(0.5f, 0);
            parTransform.pivot     = new Vector2(0.5f, -0.1f);
        }
        else if (orientation == GlobalTimeOrientation.top)
        {
            parTransform.anchorMin = new Vector2(0.5f, 1);
            parTransform.anchorMax = new Vector2(0.5f, 1);
            parTransform.pivot     = new Vector2(0.5f, 1.1f);
        }

        parTransform.anchoredPosition = Vector3.zero;
    }