public virtual void Bow_Attack() { GameObject arrowInstance = Instantiate(arrow, new Vector3(transform.position.x, transform.position.y + 0.9f, transform.position.z), Quaternion.identity); Аrrow arrowScript = arrowInstance.GetComponent <Аrrow> (); arrowScript.SetDirection(unit.direction); }
//Выпустить стрелу public void CreateArrow() { GameObject arrowInstance = Instantiate(arrow, new Vector3(transform.position.x, transform.position.y + 0.9f, transform.position.z), Quaternion.identity); Аrrow arrowScript = arrowInstance.GetComponent <Аrrow> (); arrowScript.SetDirection(direction); }