Ejemplo n.º 1
0
    private void CalculateTOF()
    {
        EnemyFireWeapon efw = this.GetComponentInChildren <EnemyFireWeapon>();

        timeOfFlight = Vector3.Distance(this.transform.position, targetRB.transform.position) / efw.projectileSpeed;
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     shootGun = this.GetComponent <EnemyFireWeapon>();
 }