コード例 #1
0
 public void UseRotation()
 {
     foreach (GameObject OrbitManager in OrbitManagers)
     {
         OrbitManagement OM = OrbitManager.GetComponent <OrbitManagement>();
         OM.UseRotation = UseRotationToggle.isOn;
         OM.ObjectGenerator();
     }
 }
コード例 #2
0
 //Global Line toggle - defaulted to off, as should be set by Json file
 //Values for each Orbit Manager able to be changed independantly.
 public void GlobalToggleLineDraw()
 {
     foreach (GameObject OrbitManager in OrbitManagers)
     {
         //when toggled on, if OrbitManagers > 10 - should maybe reduce Line tolerance to preserve framerate.
         OrbitManagement OM = OrbitManager.GetComponent <OrbitManagement>();
         OM.Orbiter.GetComponent <SatelliteInteract>().CancelInvoke("DelayedExit");
         OM.Line = GlobalLineToggle.isOn;
         OM.ObjectGenerator();
     }
 }
コード例 #3
0
    private void OnMouseOver()
    {
        if (gameObject.layer == 5)
        {
            return;
        }
        else
        {
            if (!triggered)
            {
                triggered = true;
                AM.Play("ButtonClick");
                if (OM.UITag == true)
                {
                    TagWasEnabled = true;
                }

                if (OM.Line == true)
                {
                    LineWasEnabled = true;
                }
                if (OM.UITag == false)
                {
                    OM.UITag      = true;
                    TagWasEnabled = false;
                }

                if (OM.Line == false)
                {
                    OM.Line = true;
                    OM.ObjectGenerator();
                    LineWasEnabled = false;
                }
            }
        }
    }
コード例 #4
0
 public void OnToggle()
 {
     if (LineToggle.GetComponent <Toggle>().isOn)
     {
         OM      = OrbitManager.GetComponent <OrbitManagement>();
         OM.Line = true;
         OM.ObjectGenerator();
     }
     if (!LineToggle.GetComponent <Toggle>().isOn)
     {
         OM      = OrbitManager.GetComponent <OrbitManagement>();
         OM.Line = false;
         OM.ObjectGenerator();
     }
 }