public LAppModel(ModelProxy p) { if (isInitialized()) { return; } parent = p; if (parent.GetComponent <AudioSource>() != null) { asVoice = parent.gameObject.GetComponent <AudioSource>(); asVoice.playOnAwake = false; } else { if (LAppDefine.DEBUG_LOG) { Debug.Log("Live2D : AudioSource Component is NULL !"); } } bounds = parent.GetComponent <MeshFilter>().sharedMesh.bounds; view = new LAppView(this, parent.transform, GameManager.Instance.Camera); view.StartAccel(); //if (LAppDefine.DEBUG_LOG) mainMotionManager.setMotionDebugMode(true); }
public override void initModel() { base.initModel(); if (isInitialized()) { return; } asVoice = this.gameObject.AddComponent <AudioSource>(); asVoice.playOnAwake = false; bounds = this.GetComponent <MeshFilter>().mesh.bounds; view = new LAppView(this, this.transform); view.startAccel(); if (modelJson != null) { load(null); } if (LAppDefine.DEBUG_LOG) { mainMotionManager.setMotionDebugMode(true); } if (LAppDefine.DEBUG_DRAW_HIT_AREA) { createHitAreaMaterial(); } }
public LAppModel(LAppModelProxy p) { if (isInitialized()) return; parent = p; if (parent.GetComponent<AudioSource>() != null) { asVoice = parent.gameObject.GetComponent<AudioSource>(); asVoice.playOnAwake = false; } else { if (LAppDefine.DEBUG_LOG) { Debug.Log("Live2D : AudioSource Component is NULL !"); } } bounds = parent.GetComponent<MeshFilter>().sharedMesh.bounds; view = new LAppView(this, parent.transform); view.StartAccel(); //if (LAppDefine.DEBUG_LOG) mainMotionManager.setMotionDebugMode(true); }
public LAppModel(LAppModelProxy p) { if (!base.isInitialized()) { this.parent = p; if (this.parent.audio != null) { this.asVoice = this.parent.gameObject.audio; this.asVoice.playOnAwake = false; } else if (LAppDefine.DEBUG_LOG) { Debug.Log("Live2D : AudioSource Component is NULL !"); } this.bounds = this.parent.GetComponent<MeshFilter>().sharedMesh.bounds; this.view = new LAppView(this, this.parent.transform); this.view.StartAccel(); } }