void NpcDisappear(byte[] _packet) { // AsNotify.Log( "NpcDisappear"); AS_SC_NPC_DISAPPEAR_1 disappear = new AS_SC_NPC_DISAPPEAR_1(); disappear.PacketBytesToClass(_packet); AsEntityManager.Instance.NpcDisappear(disappear); }
public void NpcDisappear( AS_SC_NPC_DISAPPEAR_1 _appear)//game process { for( int i=0; i<_appear.nNpcCnt; ++i) { AS_SC_NPC_DISAPPEAR_2 appear = _appear.body[i]; AsInGameEventManager.instance.DelNpcAppear(appear); if( m_dicNpcEntity_SessionId.ContainsKey( appear.nNpcIdx) == true) { AsNpcEntity entity = AsEntityManager.Instance.GetNpcEntityBySessionId( appear.nNpcIdx); if( eFsmType.OBJECT == entity.FsmType && eOBJECT_PROP.STEPPING_LEAF == entity.GetProperty<eOBJECT_PROP>( eComponentProperty.OBJ_TYPE)) { ObjSteppingMgr.Instance.RemoveNpcIdx( appear.nNpcIdx); } AsEntityManager.Instance.RemoveEntity( m_dicNpcEntity_SessionId[appear.nNpcIdx]); } else { Debug.LogWarning( "[AsEntityManager]NpcDisappear: there is no [id:" + appear.nNpcIdx + "] character"); continue; } } UnloadAssetsForMemory(); }