예제 #1
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);
            }
        }
예제 #2
0
        private void Awake()
        {
            keyboardCreator = target as KeyboardCreator;

            if (!Application.isPlaying || !keyboardCreator.gameObject.isStatic) // Always when not playing or (playing and keyboard is not static)
            {
                keyboardCreator.wasStaticOnStart = false;
                KeyboardItem.forceInit           = true;
                if (keyboardCreator.RaycastingSource != null)
                {
                    keyboardCreator.ManageKeys();
                }
                keyboardScale = keyboardCreator.transform.localScale;
            }
        }
예제 #3
0
        public override void OnInspectorGUI()
        {
            keyboardCreator = target as KeyboardCreator;
            keyboardCreator.checkErrors();
            errorReporter = ErrorReporter.Instance;

            if (errorReporter.currentStatus == ErrorReporter.Status.None || !Application.isPlaying) // (Playing and was static at start) or always when not playing
            {
                DrawPrimary();
                DrawMaterials();
                DrawSpace();
                GUI.enabled = true;
                CameraFinder();
                HandleValuesChanges();
            }
            DisplayWarnings();
        }
예제 #4
0
 public SpaceMeshCreator(KeyboardCreator creator)
 {
     this.creator = creator;
 }