不断检查子d是否接触过节点

不断检查子d是否接触过节点,第1张

不断检查子d是否接触过节点

您可以使用提供给每个相关对象的自定义样式检查

bullet
相交。下面的片段添加了一个到,但你需要一个相同的,每个方向一个。实现是线性的,只是返回不变,但是您也可以查看此抛物线插值器。我还制作了一个类变量,可以访问。我毫不迟疑地将十几发子d飞向空中。请注意,您不需要一个值:“将使用当时的当前目标值合成一个”。
other
Shape.intersect()
Interpolator
KeyValue
Interpolator``shoot()``t
other``shoot()``start

private Circle other = new Circle(100, 100, 10);…else {    KeyValue end = new KeyValue(bullet.translateYProperty(), -800, new Interpolator() {        @Override        protected double curve(double t) { if (!Shape.intersect(bullet, other).getBoundsInLocal().isEmpty()) {     System.out.println("Intersection"); } return t;        }    });    Keyframe endF = new Keyframe(Duration.seconds(10), end);    timeline.getKeyframes().addAll(endF);}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5506018.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-13
下一篇 2022-12-13

发表评论

登录后才能评论

评论列表(0条)

保存