x020010_g_scriptId=020010

x020010_g_MonsterIdList={}
x020010_g_MonsterIdList[1]={5020}  

x020010_g_MonsterPosList={}
x020010_g_MonsterPosList[1]={{54,23,2.9}}



x020010_g_CSParamIdxCurStage=0                     -- 场景切换波数
x020010_g_CSParamIdxCurSubStage=1				   -- 同一场景中的时间点	


function x020010_OnCopySceneTick(scene,tickCount)					--副本阶段
	local curStage = GetCopySceneParam(scene,x020010_g_CSParamIdxCurStage) +1
	local curSubStage = GetCopySceneParam(scene,x020010_g_CSParamIdxCurSubStage) +1

	SetCopySceneParam(scene,x020010_g_CSParamIdxCurSubStage,curSubStage)
	if curStage == 1 then
		x020010_Stage_1(scene,curStage,curSubStage)
	elseif curStage == 2 then
		SetCopySceneSuccess(scene);
	end

end

function x020010_OnObjDie( scene,objId,rolebaseId,killerId )					--战斗（）
	local MonCount = GetHostileMonsterCount(scene)
	if MonCount == 0 then
		local nCurStage = GetCopySceneParam(scene,x020010_g_CSParamIdxCurStage)
		SetCopySceneParam(scene,x020010_g_CSParamIdxCurStage,nCurStage+1)
		SetCopySceneParam(scene,x020010_g_CSParamIdxCurSubStage,0)
	end
end

function x020010_CreateMonster(scene, idx, camp)
	if idx <= #x020010_g_MonsterIdList then
		local nCount = #x020010_g_MonsterIdList[idx]
		for i = 1, nCount do
			local nObjId = CreateMonster(scene,x020010_g_MonsterIdList[idx][i],x020010_g_MonsterPosList[idx][i][3],x020010_g_MonsterPosList[idx][i][1],x020010_g_MonsterPosList[idx][i][2])
			SetNpcCampByObjId(scene,nObjId,camp)
		end
	end
end

function  x020010_Stage_1(scene, stage, subStage)
	if subStage == 1 then
		x020010_CreateMonster(scene,1,3)
	end
end