// Start is called before the first frame update void Start() { if (m_arrBarrageInfos.Length > 0) { m_oCurrentInfos = m_arrBarrageInfos[0]; } m_fFireTimer = m_oCurrentInfos.m_fBulletDelayTime; ActivateSystem(true); }
void ResetBarrageState() { if (m_arrBarrageInfos.Length > 0) { m_bStartShoot = false; m_nBulletAmountTemp = 0; CancelInvoke("SpawnBullet"); m_oCurrentInfos = m_arrBarrageInfos[0]; } }
public void ChangeBarrageState(int nState, float fTime) { if (m_arrBarrageInfos.Length > nState) { m_bStartShoot = false; m_nBulletAmountTemp = 0; CancelInvoke("SpawnBullet"); m_oCurrentInfos = m_arrBarrageInfos[nState]; Invoke("ResetBarrageState", fTime); } }