public void bulletFir(string type, Vector3 pos, Vector3 dir) { ST_Gamebullet BULLET = mapBullet[type]; mapBullet.TryGetValue(type, out BULLET); if (BULLET.Prev == BULLET.Size) { BULLET.Prev = 0; } if (BULLET.ArrGameOBJ[BULLET.Prev].GameOBJ.gameObject.GetComponent <Rigidbody>() != null) { BULLET.ArrGameOBJ[BULLET.Prev].GameOBJ.gameObject.GetComponent <Rigidbody>().Sleep(); } BULLET.ArrGameOBJ[BULLET.Prev].GameOBJ.transform.position = pos + dir + BULLET.Group.transform.position; //BULLET.ArrGameOBJ[BULLET.Prev].GameOBJ.transform.forward = dir; BULLET.ArrGameOBJ[BULLET.Prev].GameOBJ.SetActive(true); BULLET.Prev++; mapBullet[type] = BULLET; }
public void inputBullet(ST_Gamebullet pbullet, string type) { mapBullet.Add(type, pbullet); }