Ejemplo n.º 1
0
        public void CreateWindow()
        {
            ThisWindow.CreateWindow("Selection", SelectionSize, false);

            Content      = new GameObject();
            Content.name = "Content";
            Content.transform.position = ThisWindow.WindowContainer.transform.position;
            Content.transform.parent   = ThisWindow.WindowContainer.transform;

            SelectionPrompt      = Object.Instantiate(Resources.Load("Prefabs/MessageWindow/SelectorCursor")) as GameObject;
            SelectionPrompt.name = "SelectionCursor";
            SelectionPrompt.transform.position  = ThisWindow.WindowContainer.transform.position;
            SelectionPrompt.transform.position += new Vector3(((ThisWindow.WindowSize.x * -1) + 1 * 0.40f), (ThisWindow.WindowSize.y) + TopPadding);
            SelectionPrompt.transform.parent    = ThisWindow.WindowContainer.transform;

            GameObject SelectionBack;

            for (int i = 0; i < (ThisWindow.WindowSize.x * 2) - 1; i++)
            {
                SelectionBack      = Object.Instantiate(Resources.Load("Prefabs/MessageWindow/SelectionBack")) as GameObject;
                SelectionBack.name = "SelectionBack";
                SelectionBack.transform.position  = SelectionPrompt.transform.position;
                SelectionBack.transform.position += new Vector3(i + 0.80f, 0, 0);
                SelectionBack.transform.parent    = SelectionPrompt.transform;
            }
        }
        public void CreateWindow(GameObject Player)
        {
            switch (WindowLocation)
            {
            case WindowLocation.BOTTOM:
            {
                CurrentLocation = new Vector3(0, -3);
                break;
            }

            case WindowLocation.TOP:
            {
                CurrentLocation = new Vector3(0, 3);
                break;
            }

            case WindowLocation.CENTER:
            {
                CurrentLocation = Vector3.zero;
                break;
            }

            default:
            {
                CurrentLocation = new Vector3(0, 3);
                WindowLocation  = WindowLocation.BOTTOM;
                break;
            }
            }

            //
            ThisWindow.CreateWindow("Message", new Vector2(5, 1), CurrentLocation, false, Player);

            //
            NextPrompt      = Object.Instantiate(Resources.Load("Prefabs/MessageWindow/NextCursor")) as GameObject;
            NextPrompt.name = "NextCursor";
            NextPrompt.transform.position  = ThisWindow.WindowContainer.transform.position;
            NextPrompt.transform.position += new Vector3(0, ThisWindow.WindowSize.y - 2.5f, 0);
            NextPrompt.transform.parent    = ThisWindow.WindowContainer.transform;
        }