Violet-Nonbloosom
Violet-Nonbloosom
这个位置怎么看都在栈里吧…… 绘制这块我不熟,得等别人来改了。
一个主意,或者是更多个: 把植物、僵尸、子弹三种物体的更新函数加入事件如何? 除了难以调整 PVZ 本体的更改,这仨事件能做到的事情还真不少。 要不试一试?
> > 一个主意,或者是更多个: 把植物、僵尸、子弹三种物体的更新函数加入事件如何? 除了难以调整 PVZ 本体的更改,这仨事件能做到的事情还真不少。 要不试一试? > > 我近期比较忙,月底会尝试制作一下。不过更新事件会不会触发得过于频繁了,可能会大幅影响性能? 那恐怕得退而求其次,只在遍历更新这三种对象的代码前头加一个“某类对象更新开始”的事件了。 虽然事件触发后续效果的用时被集中到了一起,但也减少了频繁恢复上下文的影响。
我也没啥好的解决方案。 常规环境下问题不大,高速环境还是乖乖用 `Injector` 吧。
> Why are we moving it to a long? Aren’t we delaying the issue then, this isn’t solving the issue. > > should limit it to a value instead of...
> Why are we moving it to a long? Aren’t we delaying the issue then, this isn’t solving the issue. > > should limit it to a value instead of...