예제 #1
0
파일: UvSlicer.cs 프로젝트: CITI-USP/SOIVET
 public void CheckVerticalBorders(float current, float spacing, SpaceMeshCreator spaceMeshCreator)
 {
     if (current <= objectBorderInUnits.left && objectBorderInUnits.left <= current + spacing)  // left border shall be added??
     {
         spaceMeshCreator.AddWholeColumn(new Vector3(objectBorderInUnits.left, 0, 0));
     }
     if (objectBorderInUnits.right > current && objectBorderInUnits.right <= current + spacing)
     {
         spaceMeshCreator.AddWholeColumn(new Vector3(objectBorderInUnits.right, 0, 0));
     }
 }
예제 #2
0
        /// <summary>
        /// Changes 'space' bar mesh
        /// </summary>
        /// <param name="creator"></param>
        public void ManipulateSpace(KeyboardCreator creator, Sprite spaceSprite)
        {
            this.spaceSprite = spaceSprite;
            if (meshCreator == null)
            {
                meshCreator = new SpaceMeshCreator(creator);
            }
            meshCreator.Recalculate9Slice(spaceSprite, creator.ReferencedPixels);

            if (!creator.wasStaticOnStart)
            {
                Init();
                meshCreator.BuildFace(quadFront, true);
            }
        }