·
This commit is contained in:
parent
6bb2af9350
commit
8866aa0e4b
@ -9953,7 +9953,7 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
|
||||
@ -251,7 +251,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &46038311
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -108,8 +108,10 @@ public class Shot : MonoBehaviour
|
||||
isCanShot = true;// !isAutoLock;//如果不是自动锁定,开火按钮设成True
|
||||
_cam = Camera.main;
|
||||
|
||||
|
||||
if (transform.parent != null)
|
||||
{
|
||||
_qiuObjects = transform.parent.GetComponentsInChildren<QiuObject>();
|
||||
}
|
||||
// 初始化对象池(使用Queue而非全局List)
|
||||
InitializePool();
|
||||
|
||||
@ -353,6 +355,7 @@ public class Shot : MonoBehaviour
|
||||
// 7. 获取子弹组件并重置状态
|
||||
var bulletComp = bulletObj.GetComponent<Bullet>();
|
||||
bulletComp.IsAutoLock = isAutoLock;
|
||||
bulletComp.IsShoting = true;
|
||||
if ((isAutoLock || initBulletPos != null) && lockEnemy != null && !lockEnemy.IsDestroyed())
|
||||
{
|
||||
bulletComp.LockTarget = lockEnemy;
|
||||
@ -440,16 +443,15 @@ public class Shot : MonoBehaviour
|
||||
//);
|
||||
//bulletComp.ShotTargetPosition = bulletComp.LockTarget.transform.position;
|
||||
}
|
||||
////非自动锁定状态,在轨迹更新过程中也判断是否击中
|
||||
//if (!isAutoLock)
|
||||
//{
|
||||
// CheckBulletBoom(bulletComp, bulletComp.LockTarget);
|
||||
//}
|
||||
//非自动锁定状态,在轨迹更新过程中也判断是否击中
|
||||
if (!isAutoLock)
|
||||
{
|
||||
CheckBulletBoom(bulletComp, bulletComp.LockTarget);
|
||||
}
|
||||
|
||||
})
|
||||
.OnPlay(() =>
|
||||
{
|
||||
bulletComp.IsShoting = true;
|
||||
})
|
||||
.OnComplete(() =>
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user