修改细节,增加图标和splash image,最后需要用破解版打包

This commit is contained in:
Caiyanpeng committed 2021-04-29 18:05:00 +08:00
1 parent b15a4fe2c1
commit 4cb40f2c8e
58 files changed
+3580 -1487

No files matched your search

+2 -2
View File
@@ -100,8 +100,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
transform.Find("Hot").gameObject.SetActive(myMap.IsFire);
var props = transform.Find("Props");
props.Find("DistanceText").GetComponent<Text>().text = $"{myMap.Distance.ToString("#0.00")}KM";
props.Find("EleText").GetComponent<Text>().text = $"{(myMap.TotalClimb ?? 0.0).ToString("#0.00")}M";
props.Find("DistanceText").GetComponent<Text>().text = $"{myMap.Distance.ToString(myMap.Distance>1000? "#0" : "#0.00")}KM";
props.Find("EleText").GetComponent<Text>().text = $"{(myMap.TotalClimb ?? 0.0).ToString(myMap.TotalClimb > 1000 ? "#0" : "#0.00")}M";
props.Find("SlopeText").GetComponent<Text>().text = $"{myMap.AverageGrade.ToString("#0.00")}%";
props.Find("rideText").GetComponent<Text>().text = myMap.TheHeat.ToString();
var tabContainer = transform.Find("TabContainer");
+1 -1
View File
@@ -13,6 +13,6 @@ public class RotateBg : MonoBehaviour
// Update is called once per frame
void Update()
{
transform.Rotate(new Vector3(0,0,-Time.deltaTime * 1/3));
transform.Rotate(new Vector3(0,0,-Time.deltaTime * 1/4));
}
}
+8 -7
View File
@@ -22,14 +22,15 @@ public class NewsController : PFUIPanel
Get();
}
Transform content,exit;
async void Get()
void Get()
{
var r = await ConfigHelper.userApi.GetNotify();
if (r.result)
{
content.GetComponent<Text>().text = r.data.Value<string>("Content");
//content.GetComponent<Text>().text
}
//var r = await ConfigHelper.userApi.GetNotify();
//if (r.result)
//{
// content.GetComponent<Text>().text = r.data.Value<string>("Content");
// //content.GetComponent<Text>().text
//}
content.GetComponent<Text>().text = App.notifyContent;
}
// Update is called once per frame
void Update()
@@ -254,7 +254,11 @@ public class EditUserController : PFUIPanel
}
private void Switch(BaseEventData arg0)
{
SceneManager.LoadScene("1-Login");
UIManager.ShowConfirm("Logout", "Do you want to log out and change accounts?", () =>
{
SceneManager.LoadScene("1-Login");
UIManager.CloseConfirm();
});
}
// Update is called once per frame
@@ -283,66 +287,67 @@ public class EditUserController : PFUIPanel
void Save(BaseEventData e)
{
UIManager.ShowConfirm("Confirm", "Are you sure to edit?", async () =>
{
var user = JsonConvert.DeserializeObject<UserResultModel>(JsonConvert.SerializeObject(App.CurrentUser));
user.Birthday = new DateTime(int.Parse(mYearDropdown.SelectedItem), int.Parse(mMonthDropdown.SelectedItem), int.Parse(mDayDropdown.SelectedItem));
user.Sex = mSexDropdown.SelectedItem == "男" ? 1 : 2;
user.Nickname = mNickName.Text;
user.Country = UIManager.Instance.loginRegOptions.GetCountryName(mConutryDropdown.SelectedIndex);
var errorList = new List<object>();
if (string.IsNullOrEmpty(mNickName.Text)) errorList.Add(new { Field = "Nickname", ErrMsg = "请填写昵称" });
if (string.IsNullOrEmpty(mFTP.Text)) errorList.Add(new { Field = "FTP", ErrMsg = "请填写FTP" });
if (string.IsNullOrEmpty(mHeight.Text)) errorList.Add(new { Field = "Height", ErrMsg = "请填写身高" });
if (string.IsNullOrEmpty(mWeight.Text)) errorList.Add(new { Field = "Weight", ErrMsg = "请填写体重" });
if (string.IsNullOrEmpty(mMHR.Text)) errorList.Add(new { Field = "MaxHeartRate", ErrMsg = "请填写最大心率" });
if (string.IsNullOrEmpty(mBW.Text)) errorList.Add(new { Field = "BicycleWeight", ErrMsg = "请填写车重" });
if (string.IsNullOrEmpty(mWD.Text)) errorList.Add(new { Field = "WheelDiameter", ErrMsg = "请填写轮径" });
if (errorList.Count > 0)
{
Utils.SetValidate(dict, JArray.FromObject(errorList));
Utils.showToast(gameObject, "Please fill in the information");//请填写相关信息
return;
}
user.FTP = int.Parse(mFTP.Text);
user.Height = int.Parse(mHeight.Text);
user.Weight = int.Parse(mWeight.Text);
user.MaxHeartRate = int.Parse(mMHR.Text);
user.BicycleWeight = int.Parse(mBW.Text);
user.WheelDiameter = int.Parse(mWD.Text);
user.Unit = mUnitDropdown.SelectedIndex;
user.Contact = mName.Text;
user.ContactPhone = mPhone.Text;
user.ContactAddress = mAddr.Text;
var result = await userApi.Update(user);
App.isChanged = false;
if (result.result == false)
{
Utils.SetValidate(dict, JArray.FromObject(result.data));
Utils.showToast(gameObject, result.errMsg);
//UIManager.ShowAlert(result.errMsg);
}
else
{
App.CurrentUser = user;
var userinfos = UIManager.Instance.userInfos;
var i = userinfos.FindIndex(x => x.Id == App.CurrentUser.Id);
if (i != -1)
{
userinfos[i].NickName = user.Nickname;
UIManager.Instance.userInfos = userinfos;
}
Utils.showToast(gameObject, "Success", type: 1);
//UIManager.ShowAlert("Success");
}
LoadDataSync();
});
//UIManager.ShowConfirm("Confirm", "Are you sure to edit?", SaveFunc);
SaveFunc();
//App.CurrentUser = user;
//UIManager.ShowAlert("result.errMsg");
}
async void SaveFunc()
{
var user = JsonConvert.DeserializeObject<UserResultModel>(JsonConvert.SerializeObject(App.CurrentUser));
user.Birthday = new DateTime(int.Parse(mYearDropdown.SelectedItem), int.Parse(mMonthDropdown.SelectedItem), int.Parse(mDayDropdown.SelectedItem));
user.Sex = mSexDropdown.SelectedItem == "男" ? 1 : 2;
user.Nickname = mNickName.Text;
user.Country = UIManager.Instance.loginRegOptions.GetCountryName(mConutryDropdown.SelectedIndex);
var errorList = new List<object>();
if (string.IsNullOrEmpty(mNickName.Text)) errorList.Add(new { Field = "Nickname", ErrMsg = "请填写昵称" });
if (string.IsNullOrEmpty(mFTP.Text)) errorList.Add(new { Field = "FTP", ErrMsg = "请填写FTP" });
if (string.IsNullOrEmpty(mHeight.Text)) errorList.Add(new { Field = "Height", ErrMsg = "请填写身高" });
if (string.IsNullOrEmpty(mWeight.Text)) errorList.Add(new { Field = "Weight", ErrMsg = "请填写体重" });
if (string.IsNullOrEmpty(mMHR.Text)) errorList.Add(new { Field = "MaxHeartRate", ErrMsg = "请填写最大心率" });
if (string.IsNullOrEmpty(mBW.Text)) errorList.Add(new { Field = "BicycleWeight", ErrMsg = "请填写车重" });
if (string.IsNullOrEmpty(mWD.Text)) errorList.Add(new { Field = "WheelDiameter", ErrMsg = "请填写轮径" });
if (errorList.Count > 0)
{
Utils.SetValidate(dict, JArray.FromObject(errorList));
Utils.showToast(gameObject, "Please fill in the information");//请填写相关信息
return;
}
user.FTP = int.Parse(mFTP.Text);
user.Height = int.Parse(mHeight.Text);
user.Weight = int.Parse(mWeight.Text);
user.MaxHeartRate = int.Parse(mMHR.Text);
user.BicycleWeight = int.Parse(mBW.Text);
user.WheelDiameter = int.Parse(mWD.Text);
user.Unit = mUnitDropdown.SelectedIndex;
user.Contact = mName.Text;
user.ContactPhone = mPhone.Text;
user.ContactAddress = mAddr.Text;
var result = await userApi.Update(user);
App.isChanged = false;
if (result.result == false)
{
Utils.SetValidate(dict, JArray.FromObject(result.data));
Utils.showToast(gameObject, result.errMsg);
//UIManager.ShowAlert(result.errMsg);
}
else
{
App.CurrentUser = user;
var userinfos = UIManager.Instance.userInfos;
var i = userinfos.FindIndex(x => x.Id == App.CurrentUser.Id);
if (i != -1)
{
userinfos[i].NickName = user.Nickname;
UIManager.Instance.userInfos = userinfos;
}
Utils.showToast(gameObject, "Success", type: 1);
//UIManager.ShowAlert("Success");
}
LoadDataSync();
}
async void ChangeAvatar(string path)
{
var r = await userApi.Update(App.CurrentUser, path);
@@ -370,18 +375,19 @@ public class EditUserController : PFUIPanel
}
void Cancel(BaseEventData e)
{
if (App.isChanged)
{
UIManager.ShowConfirm("Tips", "It is detected that you have modified, do you want to give up and return?", () =>
{
UIManager.ShowPrePanel();
UIManager.CloseConfirm();
});
UIManager.ShowPrePanel();
//if (App.isChanged)
//{
// UIManager.ShowConfirm("Tips", "It is detected that you have modified, do you want to give up and return?", () =>
// {
// UIManager.ShowPrePanel();
// UIManager.CloseConfirm();
// });
}
else
{
UIManager.ShowPrePanel();
}
//}
//else
//{
// UIManager.ShowPrePanel();
//}
}
}
@@ -23,7 +23,7 @@ public class MapDetailController : PFUIPanel
}
else
{
Utils.showToast(gameObject, r.errMsg, 1);
Utils.showToast(gameObject, r.errMsg);
}
}
if (transform.Find("BtnGoRide") != null)
@@ -30,7 +30,11 @@ public class UserInfoController : PFUIPanel
UIManager.AddEvent(transform.Find("InfoPanel").Find("SwitchAccountButton").gameObject,
EventTriggerType.PointerClick, (b) =>
{
SceneManager.LoadScene("1-Login");
UIManager.ShowConfirm("Logout", "Do you want to log out and change accounts?", () =>
{
SceneManager.LoadScene("1-Login");
UIManager.CloseConfirm();
});
});
infoPanel = transform.Find("InfoPanel").Find("P");
@@ -92,11 +96,11 @@ public class UserInfoController : PFUIPanel
infoPanel.Find("Weight").Find("Value").GetComponent<Text>().text = $"{user.Weight}KG";
infoPanel.Find("BW").Find("Value").GetComponent<Text>().text = $"{user.BicycleWeight}KG";
infoPanel.Find("WD").Find("Value").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
//infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("yyyy-MM-dd");
//infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.MaxHeartRate.ToString();
//infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("yyyy-MM-dd");
//infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("yyyy-MM-dd");
//infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("yyyy-MM-dd");
infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("yyyy-MM-dd");
infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("yyyy-MM-dd");
infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToString("yyyy-MM-dd");
infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToString("yyyy-MM-dd");
if (user.Sex == 2)
{
infoPanel.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/woman");