剧情提交
parent
dd90a200c3
commit
f43cd38a73
|
@ -2354,6 +2354,10 @@ WALK_DIR = {
|
|||
JINGYA = 9,--惊讶
|
||||
LAUCH = 10,--发射
|
||||
TOUCH = 11,--轻按
|
||||
DEAD_LEFT = 12,
|
||||
DEAD_RIGHT = 13,
|
||||
DEAD_BACK = 14,
|
||||
DEAD_FRONT = 15,
|
||||
}
|
||||
MONSTER_WALK_DIR = {
|
||||
--没有坐骑的时候
|
||||
|
@ -2365,6 +2369,10 @@ MONSTER_WALK_DIR = {
|
|||
RUN_LEFT = {animation = "run_l", y = 0},
|
||||
RUN_UP = {animation = "run_b", y = 0},
|
||||
RUN_DOWN = {animation = "run_1", y = 0},
|
||||
DEAD_LEFT = {animation = "dead_l", y = 180},
|
||||
DEAD_RIGHT = {animation = "dead_l", y = 0},
|
||||
DEAD_BACK = {animation = "dead_b", y = 0},
|
||||
DEAD_FRONT = {animation = "dead", y = 0}
|
||||
}
|
||||
PLAYER_WALK_DIR = {
|
||||
--没有坐骑的时候
|
||||
|
|
|
@ -263,7 +263,7 @@ end
|
|||
--绑定事件(用于子类重写)
|
||||
function this:BindEvent()
|
||||
Util.AddOnceClick(this.btnEndLess,function()
|
||||
StoryMapManager.InitData(1)
|
||||
StoryMapManager.InitData(3)
|
||||
end)
|
||||
|
||||
self.trigger = Util.GetEventTriggerListener(self.ctrl)
|
||||
|
|
|
@ -13,108 +13,82 @@ ANIMATION = {
|
|||
MapFloatingConfig = {
|
||||
[0] = {name = "live2d_boss_01",
|
||||
scale = Vector3.New(0.85, 0.85, 0.85),
|
||||
scale1 = Vector3.New(0.5, 0.5, 0.5),
|
||||
position = Vector3.New(0, -10, 0)},
|
||||
[1] = {name = "live2d_boss_01",
|
||||
scale = Vector3.New(0.85, 0.85, 0.85),
|
||||
scale1 = Vector3.New(0.5, 0.5, 0.5),
|
||||
position = Vector3.New(0, -10, 0)},
|
||||
[2] = {name = "live2d_r_MapEffect_NewEvent_002",
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[3] = {name = "live2d_r_MapEffect_NewEvent_006",
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 32, 0)},
|
||||
[4] = {name = "r_Map_NewEvent_016",
|
||||
scale = Vector3.New(1, 1, 1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(-130, -5,0)},
|
||||
[5] = {name = "live2d_boss_01",
|
||||
scale = Vector3.New(0.85, 0.85, 0.85),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, -10, 0)},
|
||||
[6] = {name = "live2d_r_Map_NewEvent_007",
|
||||
scale = Vector3.New(0.2, 0.2, 0.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.zero},
|
||||
[7] = {name = "live2d_r_Map_NewEvent_009",--福星高照NPC
|
||||
scale = Vector3.New(0.23, 0.23, 0.23),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, -40, 0)},
|
||||
[8] = {name = "UI_effect_TanSuo_BaoXiang",
|
||||
scale = Vector3.New(0.35, 0.35, 0.35),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 60, 0)},
|
||||
[9] = {name = "live2d_npc_chuansong",--答题NPC
|
||||
scale = Vector3.New(0.75, 0.75, 0.75),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
|
||||
position = Vector3.New(0, -26,0)},
|
||||
[10] = {name = "live2d_boss_03",
|
||||
scale = Vector3.New(0.8, 0.8, 0.8),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, -14, 0)},
|
||||
[11] = {name = "r_Map_NewEvent_004",
|
||||
scale = Vector3.New(1, 1, 1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(-132, -5, 0)},
|
||||
[12] = {name = "live2d_r_MapEffect_NewEvent_014",
|
||||
scale = Vector3.New(0.08, 0.08, 0.08),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[13] = {name = "live2d_boss_02",
|
||||
scale = Vector3.New(0.8, 0.8, 0.8),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, -28, 0)},
|
||||
[14] = {name = "r_Map_NewEvent_011",--buff宝剑
|
||||
scale = Vector3.New(1.2, 1.2, 1.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 48, 0)},
|
||||
[15] = {name = "r_Map_NewEvent_012",--buff盾牌
|
||||
scale = Vector3.New(1.2, 1.2, 1.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 48, 0)},
|
||||
[16] = {name = "r_Map_NewEvent_013",--buff六芒星
|
||||
scale = Vector3.New(1.2, 1.2, 1.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 48, 0)},
|
||||
[17] = {name = "live2d_r_Map_NewEvent_015",--数独NPC
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
|
||||
[18] = {name = "live2d_tiangongboss",--转盘NPC
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[19] = {name = "live2d_tianjiang",--挖矿NPC
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[20] = {name = "live2d_s_bianhua",--彼岸花(挖矿道具)
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[21] = {name = "live2d_s_buffcaiji",--buff采集
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[22] = {name = "live2d_s_danyaohulu",--丹药葫芦
|
||||
scale = Vector3.New(0.1, 0.1, 0.1),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[23] = {name = "live2d_s_chuansongmen1",--传送门1
|
||||
scale = Vector3.New(0.2, 0.2, 0.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[24] = {name = "live2d_s_chuansongmen2",--传送门2
|
||||
scale = Vector3.New(0.2, 0.2, 0.2),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 40, 0)},
|
||||
[25] = {name = "live2d_r_MapEffect_NewEvent_002",--人
|
||||
scale = Vector3.New(0.05, 0.05, 0.05),
|
||||
scale1 = Vector3.New(0.1, 0.1, 0.1),
|
||||
position = Vector3.New(0, 0, 0)},
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,16 @@ function this:StackPop()
|
|||
StoryMapManager.GetSingleStoryConfig()
|
||||
end
|
||||
end
|
||||
local pos = {
|
||||
[1] = Vector3.New(-130,0,0),
|
||||
[2] = Vector3.New(0,0,0),
|
||||
[3] = Vector3.New(130,0,0),
|
||||
[4] = Vector3.New(-130,-144,0),
|
||||
[5] = Vector3.New(130,-144,0),
|
||||
[6] = Vector3.New(-130,-288,0),
|
||||
[7] = Vector3.New(0,-288,0),
|
||||
[8] = Vector3.New(130,-288,0),
|
||||
}
|
||||
|
||||
function this:CheckTrigger(data,go)
|
||||
this.go = go
|
||||
|
@ -213,20 +223,26 @@ function this:CheckTrigger(data,go)
|
|||
this.UI_Effect_ChuFaEffect_02 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_02", PoolManager.AssetType.GameObject)
|
||||
this.UI_Effect_ChuFaEffect_02.name = "UI_Effect_ChuFaEffect_02"
|
||||
this.UI_Effect_ChuFaEffect_02.transform:SetParent(this.effectRoot.transform)
|
||||
this.UI_Effect_ChuFaEffect_02.transform.localPosition = Vector3.zero
|
||||
this.UI_Effect_ChuFaEffect_02.transform.localPosition = Vector3.New(0,-300,0)
|
||||
this.UI_Effect_ChuFaEffect_02.transform.localScale = Vector3.one
|
||||
end
|
||||
if not this.UI_Effect_ChuFaEffect_05 then
|
||||
this.UI_Effect_ChuFaEffect_05 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_05", PoolManager.AssetType.GameObject)
|
||||
this.UI_Effect_ChuFaEffect_05.name = "UI_Effect_ChuFaEffect_05"
|
||||
this.UI_Effect_ChuFaEffect_05.transform:SetParent(this.effectRoot.transform)
|
||||
this.UI_Effect_ChuFaEffect_05.transform.localPosition = Vector3.zero
|
||||
this.UI_Effect_ChuFaEffect_05.transform.localPosition = pos[7]
|
||||
this.UI_Effect_ChuFaEffect_05.transform.localScale = Vector3.one
|
||||
end
|
||||
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_02,newSortingOrder - sortingOrder)
|
||||
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_05,newSortingOrder - sortingOrder)
|
||||
this.UI_Effect_ChuFaEffect_02.gameObject:SetActive(true)
|
||||
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(true)
|
||||
Timer.New(function()
|
||||
if this.PlayerGrouops and this.PlayerGrouops[7] then
|
||||
this.PlayerGrouops[7]:SetWalkDir(WALK_DIR.DEAD_BACK)
|
||||
end
|
||||
end,0.5,1,false):Start()
|
||||
|
||||
Timer.New(function()
|
||||
this.UI_Effect_ChuFaEffect_02.gameObject:SetActive(false)
|
||||
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(false)
|
||||
|
@ -245,17 +261,31 @@ function this:CheckTrigger(data,go)
|
|||
this.effectBrowList[i] = poolManager:LoadAsset("UI_Effect_ChuFaEffect_05", PoolManager.AssetType.GameObject)
|
||||
this.effectBrowList[i].name = "UI_Effect_ChuFaEffect_05"
|
||||
this.effectBrowList[i].transform:SetParent(this.effectRoot.transform)
|
||||
this.effectBrowList[i].transform.localPosition = Vector3.zero
|
||||
this.effectBrowList[i].transform.localPosition = pos[i]
|
||||
this.effectBrowList[i].transform.localScale = Vector3.one
|
||||
this.effectBrowList[i].gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
local indexTemp = 0
|
||||
LogGreen("this.PlayerGrouops[indexTemp]:"..LengthOfTable(this.PlayerGrouops))
|
||||
Timer.New(function()
|
||||
indexTemp = indexTemp + 1
|
||||
Util.AddParticleSortLayer(this.effectBrowList[indexTemp],newSortingOrder - sortingOrder)
|
||||
this.effectBrowList[indexTemp].gameObject:SetActive(true)
|
||||
if this.PlayerGrouops and this.PlayerGrouops[indexTemp] then
|
||||
LogGreen("indexTemp:"..indexTemp)
|
||||
if indexTemp > 0 and indexTemp < 4 then
|
||||
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_FRONT)
|
||||
elseif indexTemp == 4 then
|
||||
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_LEFT)
|
||||
elseif indexTemp == 5 then
|
||||
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_RIGHT)
|
||||
elseif indexTemp > 5 and indexTemp < 9 then
|
||||
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_BACK)
|
||||
end
|
||||
end
|
||||
end,data.groups[1],8,false):Start()
|
||||
|
||||
Timer.New(function()
|
||||
for i = 1 ,#this.effectBrowList do
|
||||
this.effectBrowList[i].gameObject:SetActive(false)
|
||||
|
@ -264,7 +294,7 @@ function this:CheckTrigger(data,go)
|
|||
this.UI_Effect_ChuFaEffect_03 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_03", PoolManager.AssetType.GameObject)
|
||||
this.UI_Effect_ChuFaEffect_03.name = "UI_Effect_ChuFaEffect_03"
|
||||
this.UI_Effect_ChuFaEffect_03.transform:SetParent(this.effectRoot.transform)
|
||||
this.UI_Effect_ChuFaEffect_03.transform.localPosition = Vector3.zero
|
||||
this.UI_Effect_ChuFaEffect_03.transform.localPosition = Vector3.New(0,-183,0)
|
||||
this.UI_Effect_ChuFaEffect_03.transform.localScale = Vector3.one
|
||||
end
|
||||
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_03,newSortingOrder - sortingOrder)
|
||||
|
|
|
@ -16,7 +16,7 @@ function MonsterLiveView:New(gameObj,iconId,scale)
|
|||
b.livePath = MapFloatingConfig[iconId].name
|
||||
b.iconId = iconId
|
||||
b.live2d = poolManager:LoadLive(MapFloatingConfig[iconId].name, Util.GetTransform(b.gameObject, "root"),
|
||||
MapFloatingConfig[iconId].scale1, MapFloatingConfig[iconId].position)
|
||||
MapFloatingConfig[iconId].scale, MapFloatingConfig[iconId].position)
|
||||
b.skeleton = b.live2d:GetComponent("SkeletonGraphic")
|
||||
self.oldPlayerDirAnimation = 0
|
||||
self.oldPlayerDiry = 0
|
||||
|
@ -26,27 +26,35 @@ end
|
|||
|
||||
function MonsterLiveView:SetWalkDir(dir)
|
||||
if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLE)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLE,true)
|
||||
elseif dir == WALK_DIR.IDLE_BACK then-- 站立_向后
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLEBACK)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLEBACK,true)
|
||||
elseif dir == WALK_DIR.IDLE_LEFT then-- 站立_向左
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.LEFT)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.LEFT,true)
|
||||
elseif dir == WALK_DIR.IDLE_RIGHT then-- 站立_向右
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RIGHT)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RIGHT,true)
|
||||
elseif dir == WALK_DIR.RUN_RIGHT then-- 跑_向右
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_RIGHT)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_RIGHT,true)
|
||||
elseif dir == WALK_DIR.RUN_LEFT then-- 跑_向左
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_LEFT)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_LEFT,true)
|
||||
elseif dir == WALK_DIR.RUN_UP then-- 跑_向上
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_UP)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_UP,true)
|
||||
elseif dir == WALK_DIR.RUN_DOWN then-- 跑_向下
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_DOWN)
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_DOWN,true)
|
||||
elseif dir == WALK_DIR.DEAD_LEFT then-- 死亡 左
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.DEAD_LEFT,false)
|
||||
elseif dir == WALK_DIR.DEAD_RIGHT then-- 死亡 右、
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.DEAD_RIGHT,false)
|
||||
elseif dir == WALK_DIR.DEAD_BACK then-- 死亡 后
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.DEAD_BACK,false)
|
||||
elseif dir == WALK_DIR.DEAD_FRONT then-- 死亡 前
|
||||
self:SetWalkDirInfo(MONSTER_WALK_DIR.DEAD_FRONT,false)
|
||||
end
|
||||
end
|
||||
function MonsterLiveView:SetWalkDirInfo(playerDir)
|
||||
function MonsterLiveView:SetWalkDirInfo(playerDir,isLoop)
|
||||
if playerDir and (self.oldPlayerDirAnimation ~= playerDir.animation or self.oldPlayerDiry ~= playerDir.y) then
|
||||
self.skeleton.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
|
||||
self.skeleton.AnimationState:SetAnimation(0, playerDir.animation, true)
|
||||
self.skeleton.AnimationState:SetAnimation(0, playerDir.animation, isLoop)
|
||||
self.oldPlayerDirAnimation = playerDir.animation
|
||||
self.oldPlayerDiry = playerDir.y
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue