修改动画;漏掉的汉化;上传图标
This commit is contained in:
parent
37873427e3
commit
0a9adb19e6
@ -30,7 +30,7 @@ public class LongMessageScript : MonoBehaviour
|
|||||||
var txtTransform = transform.Find("TextContainer/Content");
|
var txtTransform = transform.Find("TextContainer/Content");
|
||||||
txtTransform.GetComponent<Text>().text = txt;
|
txtTransform.GetComponent<Text>().text = txt;
|
||||||
LayoutRebuilder.ForceRebuildLayoutImmediate(txtTransform.GetComponent<RectTransform>());
|
LayoutRebuilder.ForceRebuildLayoutImmediate(txtTransform.GetComponent<RectTransform>());
|
||||||
txtTransform.localPosition = new Vector2(startX, transform.Find("TextContainer/Content").localPosition.y);
|
txtTransform.localPosition = new Vector2(startX + maxWidth, transform.Find("TextContainer/Content").localPosition.y);
|
||||||
isAnimated = false;
|
isAnimated = false;
|
||||||
timer = 2;
|
timer = 2;
|
||||||
}
|
}
|
||||||
@ -54,19 +54,25 @@ public class LongMessageScript : MonoBehaviour
|
|||||||
//do
|
//do
|
||||||
if (textWidth.HasValue && textWidth > maxWidth)
|
if (textWidth.HasValue && textWidth > maxWidth)
|
||||||
{
|
{
|
||||||
var offset = textWidth.Value - maxWidth;
|
var offset = textWidth.Value;
|
||||||
var game = transform.Find("TextContainer/Content");
|
var game = transform.Find("TextContainer/Content");
|
||||||
var v = 30 / 0.3f;
|
var v = 20 / 0.3f;
|
||||||
playtime = offset / v;
|
playtime = offset / v;
|
||||||
//匀速播放
|
//匀速播放
|
||||||
game.DOLocalMoveX(startX - offset, playtime).onComplete
|
game.DOLocalMoveX(startX - offset, playtime).onComplete
|
||||||
= () => Invoke("returnAni", 1.5f);
|
= () =>
|
||||||
|
{
|
||||||
|
var txtTransform = transform.Find("TextContainer/Content");
|
||||||
|
txtTransform.localPosition = new Vector2(startX + maxWidth, transform.Find("TextContainer/Content").localPosition.y);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
timer += (playtime * 2f + 1.5f + 2f);
|
timer += (playtime + 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void returnAni()
|
void returnAni()
|
||||||
{
|
{
|
||||||
transform.Find("TextContainer/Content").DOLocalMoveX(startX, playtime);
|
var txtTransform = transform.Find("TextContainer/Content");
|
||||||
|
txtTransform.localPosition = new Vector2(startX + maxWidth, transform.Find("TextContainer/Content").localPosition.y);
|
||||||
|
//transform.Find("TextContainer/Content").DOLocalMoveX(startX, playtime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 11 KiB |
@ -56,7 +56,7 @@ namespace Assets.Scripts.UI.Prefab.Login
|
|||||||
}
|
}
|
||||||
|
|
||||||
days = new List<Dropdown.OptionData>();
|
days = new List<Dropdown.OptionData>();
|
||||||
genders = new List<Dropdown.OptionData>() {new Dropdown.OptionData(App.GetLocalString("Male")), new Dropdown.OptionData(App.GetLocalString("FeMale")) };
|
genders = new List<Dropdown.OptionData>() {new Dropdown.OptionData(App.GetLocalString("Male")), new Dropdown.OptionData(App.GetLocalString("Female")) };
|
||||||
var countryJson = Resources.Load<TextAsset>("UI/flags-mini").text;
|
var countryJson = Resources.Load<TextAsset>("UI/flags-mini").text;
|
||||||
countryList = JsonConvert.DeserializeObject<List<CountryModel>>(countryJson);
|
countryList = JsonConvert.DeserializeObject<List<CountryModel>>(countryJson);
|
||||||
countrys = countryList.Select(x => new Dropdown.OptionData(x.country)).ToList();
|
countrys = countryList.Select(x => new Dropdown.OptionData(x.country)).ToList();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user