示例#1
0
        public void Initialize([NotNull] PostObject post)
        {
            headerImage.sprite   = post.character.profilePicture;
            headerName.text      = post.character.GetNameString();
            headerTimestamp.text = post.GetTimestampString();

            if (post.image != null)
            {
                image.sprite = post.image;
            }
            else
            {
                Destroy(image.gameObject);
            }

            text.text = Localization.Localization.Get(post.text);

            _commentCollection = GetComponentInChildren <CommentCollection>();
            if (post.comments.Length == 0)
            {
                Destroy(_commentCollection.gameObject);
            }
            else
            {
                _commentCollection.Initialize(post.comments);
            }
        }