Esempio 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);
        }
Esempio n. 2
0
 public virtual void Action(GravityBody body)
 {
     if (onAction != null)
     {
         onAction.Invoke(body);
     }
 }