28 {
30 p.SetActive(enable: true);
32 {
33 p.anime.transform.localPosition =
new Vector3(p.
posFix.x + p.
posRandom.x * UnityEngine.Random.Range(-1f, 1f), p.
posFix.y + p.
posRandom.y * UnityEngine.Random.Range(-1f, 1f), p.
posFix.z - 0.01f * (
float)
list.Count);
34 }
35 else
36 {
37 p.anime.transform.position =
new Vector3(pos.x + p.
posFix.x + p.
posRandom.x * UnityEngine.Random.Range(-1f, 1f), pos.y + p.
posFix.y + p.
posRandom.y * UnityEngine.Random.Range(-1f, 1f), pos.z + p.
posFix.z - 0.01f * (
float)
list.Count);
38 }
39 p.
anime.onComplete.AddListener(delegate
40 {
42 });
43 if (func != null)
44 {
45 p.
anime.onUpdate.AddListener(delegate
46 {
47 p.transform.position = func();
48 });
49 }
50 DOTweenAnimation[] componentsInChildren = p.GetComponentsInChildren<DOTweenAnimation>();
51 for (int i = 0; i < componentsInChildren.Length; i++)
52 {
53 componentsInChildren[i].DORestart(fromHere: true);
54 }
56 return p;
57 }
static Transform Spawn(string id, string path, Transform parent)