SK_LongZhu
parent
3d81d77cc4
commit
6101f4ef40
|
|
@ -374,7 +374,7 @@ local MoveMentPosition = {
|
||||||
|
|
||||||
Enemy_All = Vector3.New(0,-1.3, 0), --全部
|
Enemy_All = Vector3.New(0,-1.3, 0), --全部
|
||||||
Enemy_Front = Vector3.New(0,-1.3, 0),--前面一列
|
Enemy_Front = Vector3.New(0,-1.3, 0),--前面一列
|
||||||
Enemy_Behind = Vector3.New(0,-1.5 , 0), --后面一列
|
Enemy_Behind = Vector3.New(0.5,-1.5 , 0), --后面一列
|
||||||
Enemy_COL_1 = Vector3.New(-0.5,-0.7, 0),--第一行
|
Enemy_COL_1 = Vector3.New(-0.5,-0.7, 0),--第一行
|
||||||
Enemy_COL_2 = Vector3.New(-0.5,-1.5, 0),--第二行
|
Enemy_COL_2 = Vector3.New(-0.5,-1.5, 0),--第二行
|
||||||
Enemy_COL_3 = Vector3.New(-0.5,-2.8, 0),--第三行
|
Enemy_COL_3 = Vector3.New(-0.5,-2.8, 0),--第三行
|
||||||
|
|
@ -396,6 +396,7 @@ function SkillCaster:GetEffectPosition(skill)
|
||||||
return FullEffectPosition.My_All
|
return FullEffectPosition.My_All
|
||||||
end
|
end
|
||||||
function SkillCaster:GetMovePosition(skill)
|
function SkillCaster:GetMovePosition(skill)
|
||||||
|
|
||||||
local chooseId = skill:GetDirectChooseId()
|
local chooseId = skill:GetDirectChooseId()
|
||||||
local chooseLimit = math.floor(chooseId / 10000) % 10
|
local chooseLimit = math.floor(chooseId / 10000) % 10
|
||||||
local targets = skill:GetDirectTargets()
|
local targets = skill:GetDirectTargets()
|
||||||
|
|
@ -403,14 +404,30 @@ function SkillCaster:GetMovePosition(skill)
|
||||||
local targetCamp = targets[1].camp
|
local targetCamp = targets[1].camp
|
||||||
local targetPos = targets[1].position
|
local targetPos = targets[1].position
|
||||||
|
|
||||||
|
LogError("选择目标方式:"..tostring(chooseLimit))
|
||||||
if chooseLimit == 0 or chooseLimit == 4 or chooseLimit == 5 then
|
if chooseLimit == 0 or chooseLimit == 4 or chooseLimit == 5 then
|
||||||
return targetCamp == 0 and MoveMentPosition.My_All or MoveMentPosition.Enemy_All
|
return targetCamp == 0 and MoveMentPosition.My_All or MoveMentPosition.Enemy_All
|
||||||
elseif chooseLimit == 1 or chooseLimit == 2 then --前排,后排
|
elseif chooseLimit == 1 or chooseLimit == 2 then --前排,后排
|
||||||
|
local targetY = 0
|
||||||
|
for _, target in ipairs(targets) do
|
||||||
|
local tv = self.owner.RootPanel.GetRoleView(target)
|
||||||
|
targetY = targetY + tv.GameObject.transform.position.y
|
||||||
|
end
|
||||||
|
targetY = targetY/#targets
|
||||||
if targetCamp == 0 then
|
if targetCamp == 0 then
|
||||||
return targetPos <= 3 and MoveMentPosition.My_Front or MoveMentPosition.My_Behind
|
if targetPos <= 3 then
|
||||||
|
return Vector3.New(MoveMentPosition.My_Front.x,targetY,MoveMentPosition.My_Front.z)
|
||||||
|
else
|
||||||
|
return Vector3.New(MoveMentPosition.My_Behind.x,targetY,MoveMentPosition.My_Behind.z)
|
||||||
|
end
|
||||||
|
--return targetPos <= 3 and MoveMentPosition.My_Front or MoveMentPosition.My_Behind
|
||||||
else
|
else
|
||||||
return targetPos <= 3 and MoveMentPosition.Enemy_Front or MoveMentPosition.Enemy_Behind
|
if targetPos <= 3 then
|
||||||
|
return Vector3.New(MoveMentPosition.Enemy_Front.x,targetY,MoveMentPosition.Enemy_Front.z)
|
||||||
|
else
|
||||||
|
return Vector3.New(MoveMentPosition.Enemy_Behind.x,targetY,MoveMentPosition.Enemy_Behind.z)
|
||||||
|
end
|
||||||
|
--return targetPos <= 3 and MoveMentPosition.Enemy_Front or MoveMentPosition.Enemy_Behind
|
||||||
end
|
end
|
||||||
elseif chooseLimit == 3 then --队列
|
elseif chooseLimit == 3 then --队列
|
||||||
local col = (targetPos-1) % 3 + 1
|
local col = (targetPos-1) % 3 + 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue