Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     for (int i = 0; i < ObjectCount.Count; i++)
     {
         ObjectsLeft[i] = ObjectCount[i];
         SetText(ObjectList[i], i);
     }
 }
Esempio n. 2
0
    ////////////////////////////////////////////////////////////////////////////////



    // Use this for initialization
    void Awake()
    {
        instance = this;
        DateTime epochTime = new System.DateTime(1970, 1, 1, 0, 0, 0, System.DateTimeKind.Utc);
        int      currTime  = (int)(System.DateTime.UtcNow - epochTime).TotalSeconds;

        sessionStartTime = DateTime.Now;
        sessionID        = SystemInfo.deviceUniqueIdentifier.ToString() + "_" + currTime.ToString();

        consoleList          = new List <string>();
        UIConsoleText        = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_Canvas").FindChild("ConsoleSet").FindChild("_ConsoleWindow").gameObject.GetComponent <Text>();
        UIInteractText       = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_Canvas").FindChild("InteractSet").FindChild("_InteractWindow").gameObject.GetComponent <Text>();
        UIInteractBackground = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_Canvas").FindChild("InteractSet").FindChild("Background").gameObject.GetComponent <Image>();

        int_Player = transform.FindChild("[CameraRig]").FindChild("Camera (eye)").gameObject;

        int_rightLaser = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_LaserPicker").gameObject.GetComponent <LaserPicker>();

        int_Model           = transform.FindChild("_Model").gameObject;
        modelStartPos       = model.transform.position;
        modelStartScale     = model.transform.localScale;
        scaledModelLocation = modelStartPos;
        scaledModelScale    = new Vector3(0.005f, 0.005f, 0.005f);

        int_ModelObjects    = model.transform.FindChild("_Objects").gameObject;
        deleteHoldingObject = model.transform.FindChild("_Deleted").gameObject;
        deleteHoldingObject.SetActive(false);

        layerManager = transform.FindChild("[CameraRig]").FindChild("Controller (left)").FindChild("_ToolBox").FindChild("Screen_LayerManagement").GetComponent <LayerManager>();

        actionSwitcherObject = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_ActionSwitcher").gameObject;
        actionSwitcher       = actionSwitcherObject.GetComponent <ActionSwitcher>();

        objectMenuHolderObject = transform.FindChild("[CameraRig]").FindChild("Controller (right)").FindChild("_ObjectMenuCanvas").gameObject;
        objMenuManager         = objectMenuHolderObject.GetComponent <ObjectMenuManager>();
        prevMenu = new GameObject();
        prevMenu.SetActive(false);

        blackScreen = player.transform.FindChild("_BlackScreen").FindChild("Image").gameObject.GetComponent <Image>();

        activeSnaps = new HashSet <SnapType>();
        addToActiveSnaps(SnapType.MID);
        addToActiveSnaps(SnapType.END);

        addLineToConsole(System.String.Format("Session Start Time: {0}", sessionStartTime.ToLongTimeString()));
        addLineToConsole(System.String.Format("Session ID: {0}", sessionID));
        addLineToConsole(System.String.Format("Session Name: {0}", sessionName));
        addLineToConsole("v " + version);
        addLineToConsole(applicationName);
        addLineToConsole(developerName);
        addLineToConsole("Hi there!");


        defaultLightColor = UIInteractBackground.color;
        highLightColor    = new Color(0.3f, 0.55f, 0f, 0.8f);
        flashLightColor   = new Color(0.1f, 0.45f, 0.3f, 0.8f);
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     menuManager = transform.parent.GetComponentInParent <ObjectMenuManager>();
     cap         = menuManager.objectGenerationLimitList[menuManager.currentObject];
     currentQty  = cap;
     foreach (Transform child in transform.GetChild(0).transform)
     {
         if (child.name.Equals("Quantity", StringComparison.InvariantCultureIgnoreCase))
         {
             text = child.GetComponent <Text>();
             AssignValue();
         }
     }
 }
 void Awake()
 {
     trackedObj = GetComponent <SteamVR_TrackedObject>();
     objectMenu = transform.GetChild(1).gameObject;
     omm        = objectMenu.GetComponent <ObjectMenuManager>();
 }
 // Use this for initialization
 void Start()
 {
     objectMenuManager = GetComponentInChildren <ObjectMenuManager>();
 }