void OnRenderObject() { if (!isVisible) { return; } if (model == null) { return; } if (model.GetLive2DModelUnity().getRenderMode() == Live2D.L2D_RENDER_DRAW_MESH_NOW) { model.Update(); model.Draw(); } if (LAppDefine.DEBUG_DRAW_HIT_AREA) { model.DrawHitArea(); } }
void Update() { if (!isVisible) { return; } if (model == null) { return; } model.Update(); if (model.GetLive2DModelUnity().getRenderMode() == Live2D.L2D_RENDER_DRAW_MESH) { model.Draw(); } }
void Update() { if (!isVisible) { return; } if (model == null) { return; } model.Update(); if (model.GetLive2DModelUnity().getRenderMode() == Live2D.L2D_RENDER_DRAW_MESH) { model.Draw(); } if (GameManager.Instance != null) { if (GameManager.Instance.gameOver) { isRunningAway = false; return; } } if (isRunningAway) { transform.Translate(Vector3.right * moveSpeed * Time.deltaTime); } if (GameManager.Instance != null) { if (GameManager.Instance.badBoyScript.isDefeat) { transform.position = Vector3.Lerp(transform.position, initPos, 0.1f); } } }
// public void ChangeCloth() // { // string paht = curClothIndex % 2 == 0? "haru/haru_01.1024/texture_03.png" : "haru/haru_01.1024/texture_02.png"; // curClothIndex ++; // model.loadTexture(2, paht); // } private void Update() { if (model == null) { return; } if (Input.GetKeyDown(KeyCode.Space)) { // model.ShakeEvent(); model.StartRandomMotion(LAppDefine.MOTION_GROUP_PINCH_OUT, LAppDefine.PRIORITY_FORCE); } Vector2 mousePosition = Input.mousePosition; model.Update(); if (Input.GetMouseButtonDown(0)) { lastX = mousePosition.x; lastY = mousePosition.y; TouchesBegan(Input.mousePosition); } else if (Input.GetMouseButtonUp(0)) { lastX = -1; lastY = -1; TouchesEnded(Input.mousePosition); } if (lastX == mousePosition.x && lastY == mousePosition.y) { return; } // lastX = Input.mousePosition.x; lastY = Input.mousePosition.y; TouchesMoved(Input.mousePosition); }