仙缘事件界面提交

jiaoyangna 2020-10-10 19:18:27 +08:00
parent 57c7fd0890
commit ba75aab424
14 changed files with 13181 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66c1c03cc58fc854986cbcda452d4d08
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c69fdd0a27e96064ab599c12b7baf1a8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: faac7f20568fb39488738ab6596bd78f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 72194955aa96bff429546b839ffe6e08
timeCreated: 1555918210
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7d2b3dac6aaf9fc4391fd67621cde6a5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,134 @@
require("Base/BasePanel")
local XiaoYaoLuckyBossPopup = Inherit(BasePanel)
local this = XiaoYaoLuckyBossPopup
local monsterGroupId
local _LiveName
local _LiveNode
local MapPanel
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local MonsterConfig=ConfigManager.GetConfig(ConfigName.MonsterConfig)
local MonsterGroupConfig = ConfigManager.GetConfig(ConfigName.MonsterGroup)
local ArtConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local herosList={}
function this:InitComponent()
this.root = self.gameObject
this.btnBack =Util.GetGameObject(this.root,"Panel/bg/btnBack")
this.title =Util.GetGameObject(this.root,"Panel/bg/title"):GetComponent("Text")
this.e_liveRoot=Util.GetGameObject(this.root,"Panel/EnemyInfo/liveRoot")
this.e_name=Util.GetGameObject(this.root,"Panel/EnemyInfo/name/text"):GetComponent("Text")
this.e_level=Util.GetGameObject(this.root,"Panel/EnemyInfo/name/level/Text"):GetComponent("Text")
this.e_fightBtn=Util.GetGameObject(this.root,"Panel/EnemyInfo/fight")
this.heroList=Util.GetGameObject(this.root,"Panel/EnemyInfo/Scroll/heroList")
this.iconPre=Util.GetGameObject(this.root,"Panel/EnemyInfo/Scroll/pre")
end
function this:BindEvent()
Util.AddClick(this.btnBack,function()
self:ClosePanel()
end)
Util.AddClick(this.e_fightBtn,function()
end)
end
function this:OnOpen(...)
end
function this:OnShow()
monsterGroupId = 0
this.SetSelectHero()
end
function this.SetSelectHero()
local itemId = 10001
local itemNum = 1
local t = MonsterGroupConfig[monsterGroupId].Contents[1][2]
local monsterId = MonsterConfig[t].MonsterId
local paintingId = heroConfig[monsterId].Live
local pos = heroConfig[monsterId].Position
_LiveName = ArtConfig[paintingId].Name
_LiveNode = poolManager:LoadLive(_LiveName, this.e_liveRoot.transform, Vector3.one * heroConfig[monsterId].Scale*0.7, Vector3.New(pos[1], pos[2], 0))
this.e_level.text = "lv."..MonsterConfig[t].Level
this.e_name.text = MonsterConfig[t].ReadingName
local d={}
d = {}--MapManager.trialHeroInfo
for k = 1, this.heroGrid.transform.childCount do
this.heroGrid.transform:GetChild(k-1).gameObject:SetActive(false)
end
local closeChoosed=function() --有开着选择的全关了
for i, v in ipairs(herosList) do
local c=Util.GetGameObject(v,"choosed").gameObject
if c.activeSelf then
c:SetActive(false)
end
end
end
for index, value in ipairs(d) do
local item = herosList[index]
if not item then
item=newObjToParent(this.iconPre,this.heroGrid)
item.name="pre"..index
herosList[index]=item
end
item.gameObject:SetActive(true)
local frame=Util.GetGameObject(item,"frame"):GetComponent("Image")
local icon=Util.GetGameObject(item,"icon"):GetComponent("Image")
local pro=Util.GetGameObject(item,"proIcon"):GetComponent("Image")
local lv=Util.GetGameObject(item,"lv/Text"):GetComponent("Text")
local star=Util.GetGameObject(item,"star")
local choosed=Util.GetGameObject(item,"choosed")
local hpExp=Util.GetGameObject(item,"hpExp"):GetComponent("Slider")
frame.sprite=Util.LoadSprite(GetHeroQuantityImageByquality(heroConfig[value.tmpId].Quality,value.star))
icon.sprite= Util.LoadSprite(GetResourcePath(heroConfig[value.tmpId].Icon))
pro.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig[value.tmpId].PropertyName))
lv.text=value.level
SetHeroStars(star, value.star)
--选择
choosed:SetActive(MapTrialManager.selectHeroDid==value.heroId)
Util.AddOnceClick(item,function()
if value.heroHp>0 then
closeChoosed()
choosed:SetActive(true)
MapTrialManager.selectHeroDid=value.heroId
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
else
PopupTipPanel.ShowTip(Language[11247])
end
end)
--血量相关
hpExp.value=value.heroHp/10000
Util.SetGray(item,value.heroHp<=0)--死啦
end
end
function this:OnClose()
end
function this:OnDestroy()
_LiveName = {}
_LiveNode = {}
herosList={}
end
return this

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e257b7f3452862949aac6f130b989c3b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,157 @@
require("Base/BasePanel")
XiaoYaoLuckyTurnTablePopup = Inherit(BasePanel)
local this=XiaoYaoLuckyTurnTablePopup
local _itemsList = {}
local _ItemViewList={}
local _itemsPosList={}
local canGetTime = 3
local isActive = true
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local atrConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local id
local num
function XiaoYaoLuckyTurnTablePopup:InitComponent()
this.titleText = Util.GetGameObject(self.transform, "Panel/bg/titleText"):GetComponent("Text")
this.closeBtn = Util.GetGameObject(self.transform, "Panel/bg/closeBtn"):GetComponent("Button")
this.itemsLayout = Util.GetGameObject(self.transform, "Panel/items")
this.btn = Util.GetGameObject(self.transform, "start")
for i = 1, this.itemsLayout.transform.childCount do
_itemsList[i] = this.itemsLayout.transform:GetChild(i - 1)
end
end
function XiaoYaoLuckyTurnTablePopup:BindEvent()
Util.AddClick(this.closeBtn,function()
self:ClosePanel()
end)
Util.AddOnceClick(this.btnStart,function()
this.btnStart:GetComponent("Button").interactable = false
TrialMiniGameManager.GameOperate(0, function(msg)
--转起来
this.test(msg.drop.itemlist[1].itemId)
id = msg.drop.itemlist[1].itemId
num = msg.drop.itemlist[1].itemNum
end)
end)
end
--添加事件监听(用于子类重写)
function XiaoYaoLuckyTurnTablePopup:AddListener()
end
--移除事件监听(用于子类重写)
function XiaoYaoLuckyTurnTablePopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function XiaoYaoLuckyTurnTablePopup:OnOpen(...)
end
function XiaoYaoLuckyTurnTablePopup:OnShow()
local red = Util.GetGameObject(this.itemsList[1],"Red")
red:SetActive(true)
for index, item in pairs(this.itemsList) do
local reward = Util.GetGameObject(item,"reward"):GetComponent("Image")
local Name = ""--this.ArtConfig[this.ItemConfig[this.TrialGameConfig[this.list[index]].RewardID].ResourceID].Name--Index->奖励id->itemID->资源名字)
reward.sprite = Util.LoadSprite(Name)
local Num = Util.GetGameObject(item,"Num"):GetComponent("Text")
Num.text =""--this.TrialGameConfig[this.list[index]].Max
end
end
--加减速
function XiaoYaoLuckyTurnTablePopup:test(itemId)
local t =1
local thread=coroutine.start(function()
--加速阶段
if this.turnEffect2 then
this.turnEffect2:Stop()
this.turnEffect2 = nil
end
if not this.turnEffect2 then
this.turnEffect2 = Timer.New(function()
this.tableTurnEffect(1/t)
t=t+5
end,0.2,10,true)
this.turnEffect2:Start()
end
coroutine.wait(2)
--减速阶段
if this.turnEffect2 then
this.turnEffect2:Stop()
this.turnEffect2 = nil
end
if not this.turnEffect2 then
this.turnEffect2 = Timer.New(function()
this.tableTurnEffect(1/t)
t=t-3.3
end,0.2,10,true)
this.turnEffect2:Start()
end
coroutine.wait(2)
this.tableTurnEffect(0.4,itemId)
end)
end
--设置速度
local index = 1
function XiaoYaoLuckyTurnTablePopup:tableTurnEffect(speed,itemId)
if this.turnEffect then
this.turnEffect:Stop()
this.turnEffect = nil
end
if not this.turnEffect then
this.turnEffect = Timer.New(function()
local red = Util.GetGameObject(this.itemsList[index],"Red")
red:SetActive(false)
if index == 12 then--t归零
index = 0
end
local redNext = Util.GetGameObject(this.itemsList[index+1],"Red")
redNext:SetActive(true)
-- 音效
SoundManager.PlaySound(SoundConfig.Sound_zp)
index = index + 1
--检测最后的奖励
if itemId and id == this.TrialGameConfig[this.list[index]].RewardID and num == this.TrialGameConfig[this.list[index]].Max then
this.turnEffect:Stop()
--游戏结束显示掉落
Timer.New(function()
local data = TrialMiniGameManager.IdToNameIconNum(id,num)
PopupTipPanel.ShowColorTip(data[1],data[2],data[3])
end, 1,1,true):Start()
end
end,speed,-1,true)
this.turnEffect:Start()
end
end
function XiaoYaoLuckyTurnTablePopup:OnClose()
for index, value in ipairs(this.itemsList) do
local red = Util.GetGameObject(this.itemsList[index],"Red")
red:SetActive(false)
end
index = 1
if this.turnEffect2 then
this.turnEffect2:Stop()
this.turnEffect2 = nil
end
if this.turnEffect then
this.turnEffect:Stop()
this.turnEffect = nil
end
end
function XiaoYaoLuckyTurnTablePopup:OnDestroy()
end
return this

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3190eb48cda9dd94da876637727ccde9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,128 @@
require("Base/BasePanel")
XiaoyaoHeroGetPopup = Inherit(BasePanel)
local this=XiaoyaoHeroGetPopup
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local heroSId
local heroStar
local allSkillDatas = {}
--初始化组件(用于子类重写)
function XiaoyaoHeroGetPopup:InitComponent()
this.BtnBack=Util.GetGameObject(self.transform, "Panel/bg/btnBack")
this.liveRoot=Util.GetGameObject(self.transform, "Panel/liveRoot")
this.heroName = Util.GetGameObject(self.transform, "Panel/RoleInfo/nameAndPossLayout/heroName"):GetComponent("Text")
this.profession = Util.GetGameObject(self.transform, "Panel/RoleInfo/nameAndPossLayout/proImage/proImage"):GetComponent("Image")
this.starGrid = Util.GetGameObject(self.transform, "Panel/RoleInfo/sartAndLvLayout")
this.posBgImage = Util.GetGameObject(self.transform,"Panel/RoleInfo/pos"):GetComponent("Image")
this.posImage=Util.GetGameObject(self.transform,"Panel/RoleInfo/pos/posImage"):GetComponent("Image")
this.posText=Util.GetGameObject(self.transform,"Panel/RoleInfo/pos/posText"):GetComponent("Text")
this.skillName=Util.GetGameObject(self.transform,"Panel/RoleInfo/skillName")
this.skillGrid=Util.GetGameObject(self.transform,"Panel/RoleInfo/skill")
this.talismanBtn=Util.GetGameObject(self.transform,"Panel/RoleInfo/Other/TalismanBtn")
this.talismanIcon=Util.GetGameObject(self.transform,"Panel/RoleInfo/Other/TalismanBtn/Icon"):GetComponent("Image")
this.talentBtn=Util.GetGameObject(self.transform,"Panel/RoleInfo/Other/talentBtn")
this.talentProgress=Util.GetGameObject(self.transform,"Panel/RoleInfo/Other/talentBtn/progress"):GetComponent("Text")
end
local triggerCallBack
--绑定事件(用于子类重写)
function XiaoyaoHeroGetPopup:BindEvent()
Util.AddClick(this.BtnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function XiaoyaoHeroGetPopup:AddListener()
end
--移除事件监听(用于子类重写)
function XiaoyaoHeroGetPopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function XiaoyaoHeroGetPopup:OnOpen(...)
heroSId = 10001
heroStar = 10
end
function XiaoyaoHeroGetPopup:OnShow()
allSkillDatas = HeroManager.GetCurHeroSidAndCurStarAllSkillDatas(heroSId,heroStar)
local heroSData=ConfigManager.GetConfigData(ConfigName.HeroConfig, heroSId)
this.NoGetShowPanelData()
this.skillGrid:GetComponent("Canvas").sortingOrder = self.sortingOrder + 1
local skillList = HeroManager.GetCurHeroSidAndCurStarAllSkillDatas(heroSData.Id,heroSData.Star)
for i = 1, this.skillGrid.transform.childCount do
this.skillGrid.transform:GetChild(i-1).gameObject:SetActive(false)
end
for i = 1, #skillList do
if skillList[i] and skillList[i].skillConfig and skillList[i].skillConfig.Name then
local go = this.skillGrid.transform:GetChild(i-1).gameObject
go:SetActive(true)
Util.GetGameObject(go.transform,"s"):GetComponent("Image").sprite=Util.LoadSprite(GetResourcePath(skillList[i].skillConfig.Icon))
Util.GetGameObject(go.transform,"s/Text"):GetComponent("Text").text=skillList[i].skillConfig.Name--Language[10470].. 1(skillList[i].skillConfig.Id % 10)
Util.GetGameObject(go.transform,"SkillTypeImage"):GetComponent("Image").sprite=Util.LoadSprite(GetSkillType(allSkillDatas[i]))
Util.AddOnceClick(Util.GetGameObject(go.transform,"s"), function()
local skillData = {}
skillData.skillConfig = skillList[i].skillConfig
local maxLv= HeroManager.GetHeroSkillMaxLevel(heroSData.Id,skillData.skillConfig.Type)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup,skillData,1,10,maxLv,i)
end)
end
end
--法宝
this.talismanBtn.gameObject:SetActive(heroSData.EquipTalismana~=nil)
if heroSData.EquipTalismana~=nil then
this.talismanIcon.sprite = Util.LoadSprite(GetResourcePath(itemConfig[heroSData.EquipTalismana[2]].ResourceID))
end
Util.AddOnceClick(this.talismanBtn.gameObject,function()
UIManager.OpenPanel(UIName.TalismanInfoPopup,heroSData,1,1)
end)
end
function this.ShowHeroLive(_heroSConfigData)
this.testLiveGO = poolManager:LoadLive(GetResourcePath(_heroSConfigData.Live), this.liveRoot.transform,
Vector3.one * _heroSConfigData.Scale*0.7, Vector3.New(_heroSConfigData.PositionView[1], _heroSConfigData.PositionView[2], 0))
local SkeletonGraphic = this.testLiveGO:GetComponent("SkeletonGraphic")
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
poolManager:SetLiveClearCall(GetResourcePath(_heroSConfigData.Live), this.testLiveGO, function ()
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
end)
this.posBgImage.sprite=Util.LoadSprite(GetHeroPosBgStr(_heroSConfigData.Profession))
this.posImage.sprite=Util.LoadSprite(GetHeroPosStr(_heroSConfigData.Profession))
this.posText.text=_heroSConfigData.HeroLocation
this.heroName.text = _heroSConfigData.ReadingName
this.profession.sprite = Util.LoadSprite(GetProStrImageByProNum(_heroSConfigData.PropertyName))
end
function this.NoGetShowPanelData()
local heroSData=ConfigManager.GetConfigData(ConfigName.HeroConfig, heroSId)
this.ShowHeroLive(heroSData)
--星级
SetHeroStars(this.starGrid, heroStar,2,Vector2.New(60,60),-11.92)
end
--界面关闭时调用(用于子类重写)
function XiaoyaoHeroGetPopup:OnClose()
poolManager:UnLoadLive(this.testLiveGO.name, this.testLiveGO)
this.testLiveGO = nil
end
--界面销毁时调用(用于子类重写)
function XiaoyaoHeroGetPopup:OnDestroy()
end
return XiaoyaoHeroGetPopup

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 94e2c2c99259e1649a2833722dc78e75
timeCreated: 1555918363
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: