From a7c78891e2763b922c8c92c17ccadce3b14fd447 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Fri, 20 Dec 2024 17:39:48 +0800 Subject: [PATCH] gg --- Role/Bullet.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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("´´½¨»ًرو"); } }