private SpriteRenderer sr;
private void Start()
{
//开启协程
StartCoroutine(DelayMethod());
sr = GetComponentInChildren<SpriteRenderer>();
}
IEnumerator DelayMethod()
{
yield return new WaitForSecondsRealtime(0.2f);
sr.color = Color.red;
yield return new WaitForSecondsRealtime(0.2f);
sr.color = Color.green;
yield return new WaitForSecondsRealtime(0.2f);
sr.color = Color.cyan;
}