Exemplo n.º 1
0
 private void Start()
 {
     _rb  = GetComponent <Rigidbody>();
     _hOO = GetComponent <HoverOverObject>();
     _hOO.ToggleActive();
     _fileButton.SetActive(false);
 }
Exemplo n.º 2
0
 private void Update()
 {
     if (_rb.IsSleeping() && _rb.useGravity)
     {
         _rb.useGravity  = false;
         _rb.isKinematic = true;
         _hOO.ToggleActive();
         _hOO.SetOriginPoints();
     }
 }
Exemplo n.º 3
0
    /// <summary>
    /// Files the page provided into the current casefolder.
    /// </summary>
    /// <param name="pageToFile"></param>
    public void FilePage(PrintPage pageToFile)
    {
        pages.Enqueue(pageToFile);
        pagesL.Add(pageToFile);
        var transform1 = pageToFile.transform;

        transform1.SetParent(_documentPosition, true);
        HoverOverObject hoo = pageToFile.GetComponent <HoverOverObject>();

        hoo.ForceQuitInspect();
        hoo.ToggleActive();
        transform1.position      = FilePositionByIndex(pages.Count);
        transform1.localRotation = Quaternion.Euler(new Vector3(0, 0, Random.Range(-5f, 5f)));
        SortFrontToBack();
    }