public static int CalcuScoreV3(List <float> listA, List <float> listB) { // 单独评价每一项 var likeList = new List <float>(); for (int i = 0; i < listA.Count; i++) { var a = listA[i]; var b = listB[i]; var likely = RateSignleItem01(a, b); likeList.Add(likely); } // 综合评分 var aveLike = Ave(likeList); // 正选映射 double score01 = aveLike; var fixTime = int.Parse(GameManifestManager.Get("sin-fix-time")); for (int i = 0; i < fixTime; i++) { score01 = SinFix(score01); } // 映射到 0 ~ 100 var score100 = score01 * 100; return((int)score100); }
public static string Get(string key, string _default = "") { #if RELEASE return(GameManifestManager.Get(key, _default)); #else var overrideValue = GameManifestOverrider.Get(key); if (string.IsNullOrEmpty(overrideValue)) { return(GameManifestManager.Get(key, _default)); } else { return(overrideValue); } #endif }
void Start() { // 获得图片的 base64 数据 var imageBase64Data = GameManifestManager.Get("image"); EmotionSDK.SetEmotionCheck(true); EmotionSDK.SetDirectionCheck(true); // 检测表情 EmotionSDK.CheckAsync(imageBase64Data).ContinueWith(task => { // 任务返回一个字典, 使用 task.Result 访问 // 字典包含 EmotionType.cs 中每一项表情 // 对应值为各表情的权重 // * 识别失败时返回 null Debug.Log($"[C#] complete"); // Debug.Log($"Love: {task.Result?["Love"]}"); var json = CustomLitJson.JsonMapper.Instance.ToJson(task.Result); Debug.Log(json); }); }
public void OnButton(string msg) { if (msg == "play_with_friend") { var page = UIEngine.Forward <ImitateReadyPage>(); page.Title = "好友同玩"; } else if (msg == "rank") { UIEngine.Forward <ImitateRankPage>(); } else if (msg == "link") { var link = GameManifestManager.Get("link"); Application.OpenURL(link); } else if (msg == "play") { var page = UIEngine.Forward <ImitateReadyPage>(); page.Title = "闯关模式"; } }