| 210 | } |
| 211 | |
| 212 | bool AFCEntity::SwitchScene(const int32_t map_id, const int32_t map_inst_id, const AFVector3D& pos) |
| 213 | { |
| 214 | ARK_ASSERT_RET_VAL(m_pCallBackManager != nullptr && opt_charactor_ != nullptr, false); |
| 215 | |
| 216 | if (opt_charactor_->map_id_ == map_id && opt_charactor_->map_entity_id_ == map_inst_id) |
| 217 | { |
| 218 | return false; |
| 219 | } |
| 220 | |
| 221 | m_pCallBackManager->OnLeaveSceneEvent(guid_, opt_charactor_->map_id_, opt_charactor_->map_entity_id_); |
| 222 | |
| 223 | opt_charactor_->map_id_ = map_id; |
| 224 | opt_charactor_->map_entity_id_ = map_inst_id; |
| 225 | opt_charactor_->pos_ = pos; |
| 226 | |
| 227 | m_pCallBackManager->OnEnterSceneEvent(guid_, opt_charactor_->map_id_, opt_charactor_->map_entity_id_); |
| 228 | |
| 229 | return true; |
| 230 | } |
| 231 | |
| 232 | const AFVector3D& AFCEntity::GetPosition() const |
| 233 | { |
no test coverage detected