public static ArrowShootAction GetSSAction(GameObject gameObject, Vector3 wind, ISSActionCallback _callback) { ArrowShootAction action = ScriptableObject.CreateInstance <ArrowShootAction>(); action.gameobject = gameObject; action.force = new Vector3(0, 0, 20); action.wind = wind; action.rigidbody = gameObject.GetComponent <Rigidbody>(); action.callback = _callback; return(action); }
public void shoot(GameObject arrow, Ruler ruler) { SSAction action = ArrowShootAction.GetSSAction(arrow, ruler.getWind(), this); addAction(action); }