/// <summary> /// 建一个宝箱,宝箱号码boxindex(角色图片,type为4), /// 位置为(x,y),id为操作号(与NPC共用) /// </summary> public void CreateBox(int id, int boxIndex, int x, int y) { SceneObj newBox = Context.LibData.GetCharacter(4, boxIndex) as SceneObj; newBox.SetPosInMap(x, y); SceneNPCs[id] = newBox; }