public void ShootArrow() { GameObject arrow = Instantiate(Resources.Load <GameObject> ("arrow")); ArrowScript arrowScript = arrow.GetComponent <ArrowScript> (); if (isFacingRight) { arrow.transform.position = shootPointRight.position; } else { arrow.transform.position = shootPointLeft.position; } Debug.Log("shoot arrow face right " + isFacingRight); arrowScript.SetDirection(isFacingRight); stepManager.AddObserver(arrowScript); stepManager.Notify(); }