Ejemplo n.º 1
0
        void ToggleWindows(AdminChatWindow window)
        {
            adminPlayerChat.gameObject.SetActive(false);
            adminToAdminChat.gameObject.SetActive(false);
            playerPrayerWindow.gameObject.SetActive(false);

            switch (window)
            {
            case AdminChatWindow.AdminPlayerChat:
                adminPlayerChat.gameObject.SetActive(true);
                SelectedWindow = AdminChatWindow.AdminPlayerChat;
                break;

            case AdminChatWindow.AdminToAdminChat:
                adminToAdminChat.gameObject.SetActive(true);
                SelectedWindow = AdminChatWindow.AdminToAdminChat;
                break;

            case AdminChatWindow.PrayerWindow:
                playerPrayerWindow.gameObject.SetActive(true);
                SelectedWindow = AdminChatWindow.PrayerWindow;
                break;

            default:
                SelectedWindow = AdminChatWindow.None;
                break;
            }

            if (WindowChangeEvent != null)
            {
                WindowChangeEvent.Invoke(SelectedWindow);
            }
        }
Ejemplo n.º 2
0
 private void Awake()
 {
     lastScreenSize = new Vector2(Screen.width, Screen.height);
     instance       = this;
 }