// ================================================================ // // 생성 직후에 호출됩니다. public void initialize() { this.item_favor = new ItemFavor(); this.preset_texts = new List<string>(); this.is_texts_editable = true; this.initialize_item(); this.is_texts_editable = false; // 대야는 그림자를 조금 움직입니다. // (숨어버리므로). do { if(this.gameObject.name != "Tarai") { break; } var shadow = this.gameObject.GetComponentInChildren<Projector>(); if(shadow == null) { break; } shadow.transform.localPosition += new Vector3(0.1f, 0.0f, -0.1f); } while(false); }
// ================================================================ // // 생성 직후에 호출됩니다. public void initialize() { this.item_favor = new ItemFavor(); this.preset_texts = new List <string>(); this.is_texts_editable = true; this.initialize_item(); this.is_texts_editable = false; // 대야는 그림자를 조금 움직입니다. // (숨어버리므로). do { if (this.gameObject.name != "Tarai") { break; } var shadow = this.gameObject.GetComponentInChildren <Projector>(); if (shadow == null) { break; } shadow.transform.localPosition += new Vector3(0.1f, 0.0f, -0.1f); } while(false); }
// 장비 아이템의 특전을 반환한다. public ItemFavor getItemFavor() { ItemFavor favor = null; do { ItemController item = this.item_carrier.item; if (item == null) { break; } if (item.behavior.item_favor == null) { break; } favor = item.behavior.item_favor; } while(false); if (favor == null) { favor = new ItemFavor(); } return(favor); }
// 이사할 수 있는가?. public bool isEnableHouseMove() { bool ret = false; do { if (!this.is_within_house_move_event_box) { break; } ItemFavor favor = this.controll.getItemFavor(); if (favor == null) { break; } ret = favor.is_enable_house_move; } while(false); return(ret); }
public override void execute() { // 아이템과 캐릭터를 클릭했을 때 // // 클릭한 아이템과 캐릭터의 컬리전에 부딪혔으면 // 멈춘다. // if (this.move_target_item != "") { if (this.move_target_item == this.collision) { this.move_target = this.controll.getPosition(); } } // ---------------------------------------------------------------- // // 조정이 끝난 쿼리 실행. base.execute_queries(); // ---------------------------------------------------------------- // // 다음 상태로 이동할지 체크한다. switch (this.step.do_transition()) { case STEP.MOVE: { } break; case STEP.WAIT_QUERY: { if (this.controll.queries.Count <= 0) { this.step.set_next(STEP.MOVE); } } break; } // ---------------------------------------------------------------- // // 상태 전환 시 초기화. while (this.step.get_next() != STEP.NONE) { switch (this.step.do_initialize()) { case STEP.OUTER_CONTROL: { this.rigidbody.Sleep(); } break; case STEP.MOVE: { this.move_target = this.transform.position; } break; case STEP.HOUSE_MOVE: { this.initialize_step_house_move(); } break; } } // ---------------------------------------------------------------- // // 각 상태에서의 실행 결과. switch (this.step.do_execution(Time.deltaTime)) { case STEP.MOVE: { this.exec_step_move(); } break; case STEP.HOUSE_MOVE: { this.execute_step_house_move(); } break; } this.collision = ""; // ---------------------------------------------------------------- // GameInput gi = this.controll.game_input; if (gi.serif_text.trigger_on) { // 어미(장비 아이템 특전). ItemFavor item_favor = this.controll.getItemFavor(); gi.serif_text.text += item_favor.term_word; this.controll.cmdQueryTalk(gi.serif_text.text, true); } // ---------------------------------------------------------------- // // 10 프레임에 1회, 좌표를 네트워크로 전송한다(테스트). { do { if (GameRoot.get().net_player == null) { break; } if (this.step.get_current() == STEP.OUTER_CONTROL) { break; } m_send_count = (m_send_count + 1) % SplineData.SEND_INTERVAL; if (m_send_count != 0) { break; } // 통신용 좌표 송신. Vector3 target = this.controll.getPosition() + Vector3.left; CharacterCoord coord = new CharacterCoord(target.x, target.z); Vector3 diff = m_prev - target; if (diff.sqrMagnitude > 0.0001f) { m_culling.Add(coord); //Debug.Log("SendCharacterCoord[index:" + m_plotIndex + "]"); CharacterRoot.get().SendCharacterCoord(controll.account_name, m_plotIndex, m_culling); ++m_plotIndex; if (m_culling.Count >= PLOT_NUM) { m_culling.RemoveAt(0); } m_prev = target; } } while(false); } }