Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GameObject instantedBomb = Instantiate(bombPrefab, new Vector3(posX,
- bombPrefab.transform.position.y, posY),
- bombPrefab.transform.rotation);
- var script = instantedBomb.GetComponent<Bomb>();
- script.player = gameObject;
- Bomb:
- public Component player;
- private void AddBombInt()
- {
- player.addBomb();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement