void Start() { //装载所有图标预设,用于随机生成图标 prefabss = transform.parent.parent.GetComponent <StopController>().prefabss; // Resources.LoadAll(SceneManager.PreabsPath); sScript = transform.GetComponentInParent <stopSelf>(); InitValue(); }
void Start() { //装载所有图标预设,用于随机生成图标 // prefabss = Resources.LoadAll(SceneManager.PreabsPath); //该对象将移到的位置 int vIndex = int.Parse(transform.parent.name); targetPos = -180 * (((curPrefabsFlag - 4 * (vIndex - 1)) % 4) + 1); arrived = false; sScript = transform.GetComponentInParent <stopSelf>(); GetComponent <Animator> ().SetTrigger(gameObject.name); }