Example #1
0
    IEnumerator BulletCoroutine(GameObject hSend, GameObject ObjectHit, Vector3 vImpact, M_Bullet bullet)
    {
        bTimeStoped = true;
        UpdateTimeScale();
        yield return(new WaitForSeconds(bullet.fTimeStopAtImpact * Time.timeScale));

        C_Bullet bulComp = hSend ? hSend.GetComponent <C_Bullet>() : null;

        if (bulComp != null)
        {
            bulComp.OnBulletHit(ObjectHit, vImpact);
        }
        bTimeStoped = false;
        AddSlowMo(bullet.fSlowMoPower, bullet.fSlowMoDuration, 0, bullet.fSlowMoProbability);
        yield break;
    }
Example #2
0
 public void CloseBullet(C_Bullet _bullet, Transform _trans)
 {
     _bullet.isActive  = false;
     _trans.localScale = Vector3.zero;
 }