Esempio n. 1
0
        public Vector3 GetVectorFromData(LevelObjectData ld_)
        {
            Vector3 temp = Vector3.zero;

            temp.x = ld_._positionX;
            temp.y = ld_._positionY;
            temp.z = ld_._positionZ;
            return(temp);
        }
Esempio n. 2
0
        private LevelData GetDataFromCurrentLevel()
        {
            LevelData LevelData = new LevelData();

            foreach (ILevelObject obj in GetCurrentLevelObjects())
            {
                LevelObjectData LevelObjectData = new LevelObjectData();
                LevelObjectData._blockType   = obj.GetBlockType;
                LevelObjectData._rotationY   = obj.GetTransform.localRotation.eulerAngles.y;
                LevelObjectData._isPlaceable = obj.IsPlaceable;
                SetPositionsToData(LevelObjectData, obj.GetTransform);
                LevelData._levelObjects.Add(LevelObjectData);
            }

            return(LevelData);
        }
Esempio n. 3
0
 private void SetPositionsToData(LevelObjectData ld_, Transform t_)
 {
     ld_._positionX = t_.transform.localPosition.x;
     ld_._positionY = t_.transform.localPosition.y;
     ld_._positionZ = t_.transform.localPosition.z;
 }