123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using LitJson;
- using UnityEngine;
- public class GetFashionShowData : FashionShowData
- {
- public int showId;
- public int cuteScore;
- public int vividScore;
- public int simpleScore;
- public int graceScore;
- public int gloryScore;
- public int scoreCnt;
- public int praiseCnt;
- public bool praised;
- public string playerNickName;
- public bool rated;
- public GetFashionShowData()
- {
- }
- public GetFashionShowData(GetFashionShowData data)
- {
- playerId = data.playerId;
- title = data.title;
- content = data.content;
- head = data.head;
- headwear = data.headwear;
- eye = data.eye;
- mouth = data.mouth;
- top = data.top;
- skirt = data.skirt;
- shoe = data.shoe;
- wing = data.wing;
- showId = data.showId;
- cuteScore = data.cuteScore;
- vividScore = data.vividScore;
- simpleScore = data.simpleScore;
- graceScore = data.graceScore;
- gloryScore = data.gloryScore;
- scoreCnt = data.scoreCnt;
- praiseCnt = data.praiseCnt;
- praised = data.praised;
- playerNickName = data.playerNickName;
- }
- public GetFashionShowData(JsonData data)
- {
- playerId = long.Parse(data["user_id"].ToString());
- title = (string) data["title"];
- content = (string) data["content"];
- head = (int) data["head"];
- headwear = (int) data["headwear"];
- eye = (int) data["eyes"];
- mouth = (int) data["mouth"];
- top = (int) data["clothes"];
- skirt = (int) data["skirt"];
- shoe = (int) data["shoes"];
- wing = (int) data["wing"];
- showId = (int) data["id"];
- cuteScore = (int) data["score1"];
- graceScore = (int) data["score2"];
- vividScore = (int) data["score3"];
- simpleScore = (int) data["score4"];
- gloryScore = (int) data["score5"];
- scoreCnt = (int) data["num_scored"];
- praiseCnt = (int) data["likes"];
- praised = ((int) data["liked"]).ToBool();
- playerNickName = (string) data["nickname"];
- rated = ((int) data["scored"]).ToBool();
- }
- public float GetCuteRate()
- {
- return (float) cuteScore/scoreCnt;
- }
- public float GetVividRate()
- {
- return (float) vividScore/scoreCnt;
- }
- public float GetSimpleRate()
- {
- return (float) simpleScore/scoreCnt;
- }
- public float GetGloryRate()
- {
- return (float) gloryScore/scoreCnt;
- }
- public float GetGraceRate()
- {
- return (float) graceScore/scoreCnt;
- }
- }
|