コード例 #1
0
        public ShowRoomDescriptionsEvent Configure(
            LocalizedString roomDescription,
            float secondsDelay,
            RoomDescriptionLayout layout)
        {
            this.RoomDescription = roomDescription;
            this.Delay           = secondsDelay;
            this.TextLayout      = layout;

            return(this);
        }
コード例 #2
0
        private Text ToggleAndRetrieveTextElement(RoomDescriptionLayout layout)
        {
            switch (layout)
            {
            case RoomDescriptionLayout.ScreenTop:
                _screenTopText.gameObject.SetActive(true);
                _screenBottomText.gameObject.SetActive(false);
                _screenLeftText.gameObject.SetActive(false);
                _screenRightText.gameObject.SetActive(false);
                return(_screenTopText);

            case RoomDescriptionLayout.ScreenBottom:
                _screenTopText.gameObject.SetActive(false);
                _screenBottomText.gameObject.SetActive(true);
                _screenLeftText.gameObject.SetActive(false);
                _screenRightText.gameObject.SetActive(false);
                return(_screenBottomText);

            case RoomDescriptionLayout.ScreenLeft:
                _screenTopText.gameObject.SetActive(false);
                _screenBottomText.gameObject.SetActive(false);
                _screenLeftText.gameObject.SetActive(true);
                _screenRightText.gameObject.SetActive(false);
                return(_screenLeftText);

            case RoomDescriptionLayout.ScreenRight:
                _screenTopText.gameObject.SetActive(false);
                _screenBottomText.gameObject.SetActive(false);
                _screenLeftText.gameObject.SetActive(false);
                _screenRightText.gameObject.SetActive(true);
                return(_screenRightText);

            default:
                Debug.LogWarning("Unsupported Room Description Layout enum", this);
                return(_screenBottomText);
            }
        }