예제 #1
0
 /// <summary>
 /// The Unity Awake() method.
 /// </summary>
 public void Awake()
 {
     _cloudAnchorsExampleController =
         GameObject.Find("CloudAnchorsExampleController")
         .GetComponent <CloudAnchorsExampleController>();
     _starMesh = transform.Find("StarMesh").gameObject;
     _starMesh.SetActive(false);
 }
예제 #2
0
 /// <summary>
 /// The Unity Awake() method.
 /// </summary>
 public void Awake()
 {
     m_CloudAnchorsExampleController =
         GameObject.Find("CloudAnchorsExampleController")
         .GetComponent <CloudAnchorsExampleController>();
     m_AnchorManager = m_CloudAnchorsExampleController.AnchorManager;
     m_AnchorMesh    = transform.Find("AnchorMesh").gameObject;
     m_AnchorMesh.SetActive(false);
 }
예제 #3
0
        /// <summary>
        /// The Unity Awake() method.
        /// </summary>
        public void Awake()
        {
            // For Singleton
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != this)
            {
                Destroy(gameObject);
            }

            // Add any additional buttons for objects here
            if (DominoButton != null && MarbleButton != null && LimaconButton != null && HypotrochoidButton != null && ColaButton != null &&
                Cycloid2LoopButton != null && CannonButton != null && CannonballButton != null && SimpleRampButton != null && SpiralRampButton != null &&
                StarButton != null && ToiletRollButton != null && ZigzagButton != null)
            {
                DominoButton.onClick.AddListener(() => ChangePrefabSelection("Domino"));
                LimaconButton.onClick.AddListener(() => ChangePrefabSelection("Limacon"));
                HypotrochoidButton.onClick.AddListener(() => ChangePrefabSelection("Hypotrochoid"));
                MarbleButton.onClick.AddListener(() => ChangePrefabSelection("Marble"));
                ColaButton.onClick.AddListener(() => ChangePrefabSelection("Cola Can"));
                Cycloid2LoopButton.onClick.AddListener(() => ChangePrefabSelection("Cycloid2Loop"));
                CannonButton.onClick.AddListener(() => ChangePrefabSelection("Cannon"));
                CannonballButton.onClick.AddListener(() => ChangePrefabSelection("Cannonball"));
                SimpleRampButton.onClick.AddListener(() => ChangePrefabSelection("SimpleRamp"));
                SpiralRampButton.onClick.AddListener(() => ChangePrefabSelection("SpiralRamp"));
                StarButton.onClick.AddListener(() => ChangePrefabSelection("Star"));
                ToiletRollButton.onClick.AddListener(() => ChangePrefabSelection("ToiletRoll"));
                ZigzagButton.onClick.AddListener(() => ChangePrefabSelection("Zigzag"));
            }

            currEditType = EditType.EDIT_ROTATION;
            editTypeButton.onClick.AddListener(SwitchEditType);
            editSlider.onValueChanged.AddListener(EditSliderChanged);
        }
예제 #4
0
 /// <summary>
 /// The Unity Awake() method.
 /// </summary>
 public void Awake()
 {
     m_CloudAnchorsExampleController = CloudAnchorsExampleController.Instance;
     m_StarMesh = gameObject;
     m_StarMesh.SetActive(false);
 }