示例#1
0
        private void PlaceChristmasTree(Vector2 screenTouchPos)
        {
            Pose placementPose = arRayHits[0].pose;

            christmasTree = Instantiate(christmasTreePrefab, placementPose.position, placementPose.rotation).GetComponent <ChristmasTree>();

            // execute loading if user pressed "Load" button.
            if (ChristmasTree.isLoadingON)
            {
                var loadObj = SaveLoadManager <TreeSaveData> .GetLoadData(Application.persistentDataPath + "/save.txt");

                christmasTree.DecorateWithLoadData(loadObj);
            }

            christmasTree.SetTreeLight(false);
            Snow.SetActive(true);
            FindObjectOfType <UIController>().tabBar.SetActive(true);

            SwitchToOcclusionPlane();
        }
示例#2
0
 /// <summary>
 /// set saving data when creating save object
 /// </summary>
 public TreeSaveData(ChristmasTree christmasTree)
 {
     this.decorationItemLocalPos = christmasTree.decorationItemLocalPos;
     this.decorationItemColors   = christmasTree.decorationItemColors;
 }