123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using System;
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- using System.Collections.Generic;
- using LitJson;
- using Random = UnityEngine.Random;
- public class CommentItemLabel
- {
- public static string Title = "Title";
- public static string VisitButtonTitle = "VisitButtonTitle";
- public static string VisitButton = "VisitButton";
- public static string Content = "Content";
- public static string AddFriendButton = "AddFriendButton";
- public static string AddFriendButtonTitle = "AddFriendButtonTitle";
- public static string SendMessageButton = "SendMessageButton";
- public static string SendMessageButtonTitle = "SendMessageButtonTitle";
- public static string NewMessageFlagImage = "NewMessageFlagImage";
- }
- public class CommentData
- {
- public string SerialNumber;
- public string Content;
- public string NickName;
- public CommentData(JsonData jsonData)
- {
- SerialNumber = jsonData["s"].ToString();
- Content = jsonData["c"].ToString();
- NickName = jsonData["n"].ToString();
- }
- public static bool operator ==(CommentData r1, CommentData r2)
- {
- if ((r1.SerialNumber == r2.SerialNumber) && (r1.Content == r2.Content) && (r1.NickName == r2.NickName))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- public static bool operator !=(CommentData r1, CommentData r2)
- {
- return !(r1 == r2);
- }
- public override bool Equals(object obj)
- {
- return this == (CommentData)obj;
- }
- public override int GetHashCode()
- {
- return SerialNumber.GetHashCode() + Content.GetHashCode() + NickName.GetHashCode();
- }
- }
- public class CommentItem : BaseComment
- {
- public override void Visit()
- {
- SocialManager.CloseCommentPanel();
- SocialManager.RecordCommentPanel();
- base.Visit();
- }
- }
|