void Update() { // ------------------------------------------------------------ // // 원근법이 심해 얼굴 부분이 움직이는 것처럼 보이므로. if (this.main_camera != null) { Vector3 camera_direction = this.transform.InverseTransformPoint(this.main_camera.transform.position); camera_direction.Normalize(); camera_direction.x *= this.face_center / camera_direction.z; camera_direction.y *= this.face_center / camera_direction.z; camera_direction.z = this.face_center; this.face.transform.localPosition = camera_direction; } // ------------------------------------------------------------ // MOUTH_TYPE mouth_type = this.cloud_root.getMouthType(); this.change_mouth_type(mouth_type); this.change_eye_type(); // ------------------------------------------------------------ // this.timer += Time.deltaTime; }
protected void change_mouth_type(MOUTH_TYPE mouth_type) { if(this.mouth_type != mouth_type) { this.mouth_type = mouth_type; for(int i = 0;i < this.mouths.Count;i++) { GameObject mouth = this.mouths[i]; mouth.SetActive((i == (int)this.mouth_type)); } } }
protected void change_mouth_type(MOUTH_TYPE mouth_type) { if (this.mouth_type != mouth_type) { this.mouth_type = mouth_type; for (int i = 0; i < this.mouths.Count; i++) { GameObject mouth = this.mouths[i]; mouth.SetActive((i == (int)this.mouth_type)); } } }