Ejemplo n.º 1
0
 //创建泡泡
 void InstanceBubble(Transform contain, char id)
 {
     GameObject obj = PoolManager.GetObject(PrefabKey.Bubble);
     obj.SetActive(true);
     //设置层级位置
     Transform BubbleTran = obj.transform;
     BubbleTran.parent = contain;
     BubbleTran.localPosition = Position;
     BubbleTran.localScale = Vector2.zero;//用于缩放
     //初始化泡泡
     Bubble = BubbleTran.GetComponent<Bubble>();
     Bubble.InitComponent();
     Bubble.InitBubble(id);
     Bubble.Slot = this;
     Bubble.isAbsorb = true;
 }