diff --git a/Role/Bullet.cs b/Role/Bullet.cs index 6bb1be1..0aaa310 100644 --- a/Role/Bullet.cs +++ b/Role/Bullet.cs @@ -157,8 +157,10 @@ public class Bullet : MonoBehaviour { if (effectPre!=null) { - Instantiate(effectPre, collision.transform).transform.position=new Vector2(collision.transform.position.x, collision.transform.position.y+0.2f); - + GameObject go = Instantiate(effectPre, collision.transform); + go.transform.position = new Vector2(collision.transform.position.x, collision.transform.position.y + 0.2f); + // go.GetComponent().bullet = transform.GetComponent(); + //go.GetComponent().Crole = Crole; Debug.Log("´´½¨»ًرو"); } }