| 82 | } |
| 83 | |
| 84 | void zPendulum_Update(_zPendulum* pend, xScene* sc, F32 dt) |
| 85 | { |
| 86 | F32 lt, t; |
| 87 | |
| 88 | xEntUpdate((xEnt*)pend, sc, dt); |
| 89 | |
| 90 | t = pend->motion.t; |
| 91 | lt = pend->lt; |
| 92 | xEntMotionPenData* pen = &pend->motion.asset->pen; |
| 93 | |
| 94 | if (t < lt) |
| 95 | { |
| 96 | t += pen->period; |
| 97 | } |
| 98 | |
| 99 | if (lt <= pend->q1t && t > pend->q1t) |
| 100 | { |
| 101 | zEntEvent((xBase*)pend, eEventSwoosh); |
| 102 | } |
| 103 | else if (lt <= pend->q3t && t > pend->q3t) |
| 104 | { |
| 105 | zEntEvent((xBase*)pend, eEventSwoosh); |
| 106 | } |
| 107 | |
| 108 | pend->lt = pend->motion.t; |
| 109 | } |
| 110 | |
| 111 | void zPendulum_Move(_zPendulum* pend, xScene* sc, F32 dt, xEntFrame* frame) |
| 112 | { |
nothing calls this directly
no test coverage detected