|
9 | 9 |
|
10 | 10 | import com.live2d.sdk.cubism.framework.math.CubismMatrix44; |
11 | 11 | import com.live2d.sdk.cubism.framework.motion.ACubismMotion; |
| 12 | +import com.live2d.sdk.cubism.framework.motion.IBeganMotionCallback; |
12 | 13 | import com.live2d.sdk.cubism.framework.motion.IFinishedMotionCallback; |
13 | 14 |
|
14 | 15 | import java.io.IOException; |
@@ -154,7 +155,7 @@ else if (model.hitTest(HitAreaName.BODY.getId(), x, y)) { |
154 | 155 | LAppPal.printLog("hit area: " + HitAreaName.HEAD.getId()); |
155 | 156 | } |
156 | 157 |
|
157 | | - model.startRandomMotion(MotionGroup.TAP_BODY.getId(), Priority.NORMAL.getPriority(), finishedMotion); |
| 158 | + model.startRandomMotion(MotionGroup.TAP_BODY.getId(), Priority.NORMAL.getPriority(), finishedMotion, beganMotion); |
158 | 159 | } |
159 | 160 | } |
160 | 161 | } |
@@ -218,7 +219,7 @@ public void changeScene(int index) { |
218 | 219 | LAppDelegate.getInstance().getView().switchRenderingTarget(useRenderingTarget); |
219 | 220 |
|
220 | 221 | // 別レンダリング先を選択した際の背景クリア色 |
221 | | - float[] clearColor = {1.0f, 1.0f, 1.0f}; |
| 222 | + float[] clearColor = {0.0f, 0.0f, 0.0f}; |
222 | 223 | LAppDelegate.getInstance().getView().setRenderingTargetClearColor(clearColor[0], clearColor[1], clearColor[2]); |
223 | 224 | } |
224 | 225 |
|
@@ -256,6 +257,18 @@ public int getModelNum() { |
256 | 257 | return models.size(); |
257 | 258 | } |
258 | 259 |
|
| 260 | + /** |
| 261 | + * モーション再生時に実行されるコールバック関数 |
| 262 | + */ |
| 263 | + private static class BeganMotion implements IBeganMotionCallback { |
| 264 | + @Override |
| 265 | + public void execute(ACubismMotion motion) { |
| 266 | + LAppPal.printLog("Motion Began: " + motion); |
| 267 | + } |
| 268 | + } |
| 269 | + |
| 270 | + private static final BeganMotion beganMotion = new BeganMotion(); |
| 271 | + |
259 | 272 | /** |
260 | 273 | * モーション終了時に実行されるコールバック関数 |
261 | 274 | */ |
|
0 commit comments