//Start - Starting position //Dir - Direction to throw the boomarang public void Throw(Vector2 start, Vector2 dir) { gameObject.SetActive(true); transform.position = start + dir.normalized; rb2D.velocity = dir.normalized * speed; anim.SetBool("IsFlying", true); isReturning = false; if (timer == null) { timer = new Randall.Timer(); } timer.maxTime = returnTime; }
private void Start() { timer = new Randall.Timer(); }