static public void AddBullet(BaseRole locker, HitData bullet, float time) { m_unFollowBulletMakeID++; OneFollowBlt blt = new OneFollowBlt(); blt.id = m_unFollowBulletMakeID; blt.beginpos = bullet.transform.position; blt.locker = locker; blt.blt_hd = bullet; blt.costtime = 0; blt.maxtime = time; Transform real_track = bullet.transform.FindChild("t"); if (real_track != null) { //HitData hd = m_linkProfessionRole.Link_PRBullet(2004, 2f, bult, real_track); //hd.m_Color_Main = Color.gray; //hd.m_Color_Rim = Color.white; blt.aniTrack = real_track.GetComponent <Animator>(); real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT; Transform real_fx = real_track.FindChild("f"); if (real_fx != null) { blt.aniFx = real_fx.GetComponent <Animator>(); } } m_mapFollowBullet.Add(m_unFollowBulletMakeID, blt); }
public static void AddBullet(BaseRole locker, HitData bullet, float time) { FollowBullet_Mgr.m_unFollowBulletMakeID += 1u; OneFollowBlt oneFollowBlt = new OneFollowBlt(); oneFollowBlt.id = FollowBullet_Mgr.m_unFollowBulletMakeID; oneFollowBlt.beginpos = bullet.transform.position; oneFollowBlt.locker = locker; oneFollowBlt.blt_hd = bullet; oneFollowBlt.costtime = 0f; oneFollowBlt.maxtime = time; Transform transform = bullet.transform.FindChild("t"); bool flag = transform != null; if (flag) { oneFollowBlt.aniTrack = transform.GetComponent <Animator>(); transform.gameObject.layer = EnumLayer.LM_BT_FIGHT; Transform transform2 = transform.FindChild("f"); bool flag2 = transform2 != null; if (flag2) { oneFollowBlt.aniFx = transform2.GetComponent <Animator>(); } } FollowBullet_Mgr.m_mapFollowBullet.Add(FollowBullet_Mgr.m_unFollowBulletMakeID, oneFollowBlt); }