Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void shoot(GameObject arrow, Ruler ruler)
        {
            SSAction action = ArrowShootAction.GetSSAction(arrow, ruler.getWind(), this);

            addAction(action);
        }