Ejemplo n.º 1
0
        public float speed = 10f; // Speed at which it pulls a gravitybody

        public override void Action(GravityBody body)
        {
            Vector3 direction = transform.position - body.transform.position;

            body.AddForce(direction * speed);
            base.Action(body);
        }
Ejemplo n.º 2
0
 public virtual void Action(GravityBody body)
 {
     if (onAction != null)
     {
         onAction.Invoke(body);
     }
 }