コード例 #1
0
    void Update()
    {
        GetWorldSpeed();

        if (!FixLocation)
        {
            switch (MyOrbitType)
            {
            case OrbitType.Simple:
                SimpleRotate();
                break;

            case OrbitType.Quaternion:
                QuaternionRotate();
                break;

            case OrbitType.Trigonometric:
                EllipseRotate();
                break;

            default:
                // DERP
                break;
            }
        }

        if (FirstUpdate)
        {
            if (ExposeCapi)
            {
                ExposeMyCapi();
            }
            FirstUpdate = !FirstUpdate;
        }

        if (UpdateStagePosition)
        {
            AdjustStagePosition();
            GetWorldSpeed();
            InstantiateOrbitalPeriod();
            UpdateStagePosition = !UpdateStagePosition;

            if (MyOrbitalPath)
            {
                MyOrbitalPath.ResizeTestObjectLine(radius);
            }

            UpdateCapi();
        }
    }
コード例 #2
0
    public void OnEndDrag(PointerEventData eventData)
    {
        /*
         *      if (m_DraggingIcons[eventData.pointerId] != null)
         *              Destroy(m_DraggingIcons[eventData.pointerId]);
         */
        //m_DraggingIcons[eventData.pointerId] = null;

        UnityEngine.Cursor.visible = true;

        RepositionENVObjects();

        //MyZoneFlasher.ToggleZone = true;

        TestObjectOrbit.ResizeTestObjectLine(ENVTestObjectPrefab.GetComponent <OrbitalMovement>().radius);
    }