protected override void OnUpdated() { time++; if (time == 10) { Console.WriteLine("Vanish Object1"); obj1.Vanish(); } if (time == 60) { Console.WriteLine("Vanish Layer1"); layer1.Vanish(); } }
private IEnumerator <object> GetFlow() { int loop = 0; while (true) { obj.Position += new Vector2DF(1, 0); loop++; if (loop < 9) { child.Position += new Vector2DF(1, 0); } if (loop == 10) { child.Vanish(); } yield return(null); } }