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)); } }
/// <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); } }