public static bool FaceToTarget(ref Entity.CtrlInput input, Walker self, Walker target) { if (target.transform.position.x - self.transform.position.x < 0 == self.GetSide()) { input.MoveAxis = self.GetSide() ? -1 : 1; return(true); } return(false); }
public override bool WhileDo(ref Entity.CtrlInput input) { return(Self.Target != null && Self.Target.transform.position.x - Self.transform.position.x < 0 == Self.GetSide()); }