|
@@ -142,7 +142,7 @@ public class YuMenGuan : Boss
|
|
|
for (int i = 0; i < need; i++)
|
|
for (int i = 0; i < need; i++)
|
|
|
{
|
|
{
|
|
|
GameObject g;
|
|
GameObject g;
|
|
|
- g = Instantiate(prefab, Vector3.zero, new Quaternion(0, 0, 0, 0), null);
|
|
|
|
|
|
|
+ g = PoolManager.Instantiate(prefab, Vector3.zero, new Quaternion(0, 0, 0, 0), null);
|
|
|
g.SetActive(false);
|
|
g.SetActive(false);
|
|
|
pool.Add(g.GetComponent<Bullet>());
|
|
pool.Add(g.GetComponent<Bullet>());
|
|
|
hasNum[(int)id] += 1;
|
|
hasNum[(int)id] += 1;
|
|
@@ -379,7 +379,7 @@ public class YuMenGuan : Boss
|
|
|
for(int i = curBlocks; i > 0; i--)
|
|
for(int i = curBlocks; i > 0; i--)
|
|
|
{
|
|
{
|
|
|
Vector3 pos = new Vector3(transform.position.x + Random.Range(minX, maxX), -2, 0);
|
|
Vector3 pos = new Vector3(transform.position.x + Random.Range(minX, maxX), -2, 0);
|
|
|
- GameObject bl = Instantiate(block, pos, new Quaternion(0, 0, 0, 0), null);
|
|
|
|
|
|
|
+ GameObject bl = PoolManager.Instantiate(block, pos, new Quaternion(0, 0, 0, 0), null);
|
|
|
blocks[i - 1] = bl.GetComponent<Block>();
|
|
blocks[i - 1] = bl.GetComponent<Block>();
|
|
|
blocks[i - 1].ymg = this;
|
|
blocks[i - 1].ymg = this;
|
|
|
blocks[i - 1].Ready();
|
|
blocks[i - 1].Ready();
|
|
@@ -391,7 +391,7 @@ public class YuMenGuan : Boss
|
|
|
public void SpecialBlockOut(Block bl)
|
|
public void SpecialBlockOut(Block bl)
|
|
|
{
|
|
{
|
|
|
Vector3 pos = bl.transform.position;
|
|
Vector3 pos = bl.transform.position;
|
|
|
- GameObject sb = Instantiate(specialBlock, pos, new Quaternion(0, 0, 0, 0), null);
|
|
|
|
|
|
|
+ GameObject sb = PoolManager.Instantiate(specialBlock, pos, new Quaternion(0, 0, 0, 0), null);
|
|
|
Block speblo = sb.GetComponent<Block>();
|
|
Block speblo = sb.GetComponent<Block>();
|
|
|
speblo.ymg = this;
|
|
speblo.ymg = this;
|
|
|
speblo.height = bl.height;
|
|
speblo.height = bl.height;
|