【御剑行】提交
parent
fa1c5a5dee
commit
660a88b965
|
@ -248,6 +248,74 @@ Camera:
|
||||||
m_OcclusionCulling: 1
|
m_OcclusionCulling: 1
|
||||||
m_StereoConvergence: 10
|
m_StereoConvergence: 10
|
||||||
m_StereoSeparation: 0.022
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!1 &3538734015905229980
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2818214805368628324}
|
||||||
|
- component: {fileID: 5128772928494202939}
|
||||||
|
- component: {fileID: 5071314327545560368}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RoadList
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2818214805368628324
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3538734015905229980}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 9188273079090957529}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: -225}
|
||||||
|
m_SizeDelta: {x: 0, y: -550}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5128772928494202939
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3538734015905229980}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &5071314327545560368
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3538734015905229980}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Padding:
|
||||||
|
m_Left: 0
|
||||||
|
m_Right: 0
|
||||||
|
m_Top: 0
|
||||||
|
m_Bottom: 0
|
||||||
|
m_ChildAlignment: 3
|
||||||
|
m_Spacing: 0
|
||||||
|
m_ChildForceExpandWidth: 0
|
||||||
|
m_ChildForceExpandHeight: 1
|
||||||
|
m_ChildControlWidth: 0
|
||||||
|
m_ChildControlHeight: 0
|
||||||
--- !u!1 &5957260780606310171
|
--- !u!1 &5957260780606310171
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -279,6 +347,7 @@ RectTransform:
|
||||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 503164458346680140}
|
- {fileID: 503164458346680140}
|
||||||
|
- {fileID: 2818214805368628324}
|
||||||
m_Father: {fileID: 2950903234662441284}
|
m_Father: {fileID: 2950903234662441284}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
|
@ -0,0 +1,151 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &5077064202207718042
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2310722302838262445}
|
||||||
|
- component: {fileID: 5592663840833343251}
|
||||||
|
- component: {fileID: 6156725674730646753}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: roadPre
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2310722302838262445
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5077064202207718042}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 8297825075348053570}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 9500, y: 100}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5592663840833343251
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5077064202207718042}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &6156725674730646753
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5077064202207718042}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.6792453, g: 0.20185119, b: 0.20185119, a: 0.5254902}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
--- !u!1 &5928634754176360334
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8297825075348053570}
|
||||||
|
- component: {fileID: 6862682349730503354}
|
||||||
|
- component: {fileID: 7147974330802186210}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Player
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8297825075348053570
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5928634754176360334}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 2310722302838262445}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -4500, y: 100}
|
||||||
|
m_SizeDelta: {x: 100, y: 300}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6862682349730503354
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5928634754176360334}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &7147974330802186210
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5928634754176360334}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5290e194eb52a474ab36affde622e271
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1092,7 +1092,6 @@ MonoBehaviour:
|
||||||
- Assets/ManagedResources/~Lua/Modules/XiaoYao
|
- Assets/ManagedResources/~Lua/Modules/XiaoYao
|
||||||
- Assets/ManagedResources/~Lua/Modules/XunBaoMiZong
|
- Assets/ManagedResources/~Lua/Modules/XunBaoMiZong
|
||||||
- Assets/ManagedResources/~Lua/Modules/YuJianXing
|
- Assets/ManagedResources/~Lua/Modules/YuJianXing
|
||||||
- Assets/ManagedResources/~Lua/Modules/ZhiZunHaoLi
|
|
||||||
- Assets/ManagedResources/~Lua/protobuf
|
- Assets/ManagedResources/~Lua/protobuf
|
||||||
- Assets/ManagedResources/~Lua/socket
|
- Assets/ManagedResources/~Lua/socket
|
||||||
- Assets/ManagedResources/~Lua/System
|
- Assets/ManagedResources/~Lua/System
|
||||||
|
@ -57227,6 +57226,14 @@ MonoBehaviour:
|
||||||
extension: .prefab
|
extension: .prefab
|
||||||
resPathIndex: 731
|
resPathIndex: 731
|
||||||
resAbNameIndex: 3234
|
resAbNameIndex: 3234
|
||||||
|
- resName: RiceCtrl
|
||||||
|
extension: .prefab
|
||||||
|
resPathIndex: 732
|
||||||
|
resAbNameIndex: 3234
|
||||||
|
- resName: RiceSinglePlayerView
|
||||||
|
extension: .prefab
|
||||||
|
resPathIndex: 732
|
||||||
|
resAbNameIndex: 3234
|
||||||
- resName: YuJianXingPanel
|
- resName: YuJianXingPanel
|
||||||
extension: .prefab
|
extension: .prefab
|
||||||
resPathIndex: 732
|
resPathIndex: 732
|
||||||
|
|
|
@ -208,6 +208,8 @@ local ManagerNames = {
|
||||||
"WorldArena/WorldArenaManager",
|
"WorldArena/WorldArenaManager",
|
||||||
--秘宝管理器
|
--秘宝管理器
|
||||||
"GeneralPanel/GeneralTreasureMangaer",
|
"GeneralPanel/GeneralTreasureMangaer",
|
||||||
|
--御剑行管理器
|
||||||
|
"YuJianXing/YuJianXingManager",
|
||||||
--!!!!红点管理(尽量放在最后)!!!!--
|
--!!!!红点管理(尽量放在最后)!!!!--
|
||||||
"Player/RedpotManager",
|
"Player/RedpotManager",
|
||||||
}
|
}
|
||||||
|
|
|
@ -453,6 +453,7 @@ SubUIConfig = {
|
||||||
SingleFightPlayerView = { name = "SingleFightPlayerView",assetName = "SingleFightPlayerView",script = "View/SingleFightPlayerView" }, -- 挂机界面一个人
|
SingleFightPlayerView = { name = "SingleFightPlayerView",assetName = "SingleFightPlayerView",script = "View/SingleFightPlayerView" }, -- 挂机界面一个人
|
||||||
SingleStoryPlayerView = { name = "SingleStoryPlayerView",assetName = "SingleStoryPlayerView",script = "View/SingleStoryPlayerView" } , --剧情界面一个对象
|
SingleStoryPlayerView = { name = "SingleStoryPlayerView",assetName = "SingleStoryPlayerView",script = "View/SingleStoryPlayerView" } , --剧情界面一个对象
|
||||||
PlayerTitle = {name = "PlayerTitle",assetName = "PlayerTitle",script = "View/PlayerTitle"},
|
PlayerTitle = {name = "PlayerTitle",assetName = "PlayerTitle",script = "View/PlayerTitle"},
|
||||||
|
PlayerRiceView = {name = "RiceSinglePlayerView",assetName = "RiceSinglePlayerView",script = "Modules/YuJianXing/RiceSinglePlayerView"},
|
||||||
[1] = {name = "EveryDayGift",assetName = "EveryDayGift",script = "Modules/Recharge/View/EveryDayGift"},
|
[1] = {name = "EveryDayGift",assetName = "EveryDayGift",script = "Modules/Recharge/View/EveryDayGift"},
|
||||||
[2] = {name = "GiftPre",assetName = "GiftPre",script = "Modules/Recharge/View/GiftPre"},
|
[2] = {name = "GiftPre",assetName = "GiftPre",script = "Modules/Recharge/View/GiftPre"},
|
||||||
[3] = {name = "RechargeView",assetName = "RechargeView",script = "Modules/Recharge/View/RechargeView"},
|
[3] = {name = "RechargeView",assetName = "RechargeView",script = "Modules/Recharge/View/RechargeView"},
|
||||||
|
|
|
@ -1,56 +1,82 @@
|
||||||
require("Base/Stack")
|
require("Base/Stack")
|
||||||
local this = {}
|
-- local PlayerView = require("Modules/YuJianXing/RiceSinglePlayerView")
|
||||||
|
local RiceCtrlView = {}
|
||||||
local riceCtrl = "RiceCtrl"
|
local riceCtrl = "RiceCtrl"
|
||||||
local bgNameList = {}
|
local bgNameList = {}
|
||||||
|
local playerDataList = {}
|
||||||
|
|
||||||
function this.Init()
|
function RiceCtrlView:Awake(_bgList,_playerList)
|
||||||
this.spLoader = SpriteLoader.New()
|
|
||||||
end
|
|
||||||
|
|
||||||
function this.Awake(_bgList)
|
|
||||||
UIManager.camera.clearFlags = CameraClearFlags.Depth
|
|
||||||
this.Ctrl = poolManager:LoadAsset(riceCtrl, PoolManager.AssetType.GameObject)
|
|
||||||
this.Ctrl.transform:SetParent(UIManager.uiRoot.transform.parent)
|
|
||||||
this.Ctrl.transform.position = Vector3(-100, -100, -100)
|
|
||||||
this.bgList = Util.GetGameObject(this.Ctrl.gameObject,"Canvas/BgList")
|
|
||||||
this.imgPre = Util.GetGameObject(this.bgList,"imgPre")
|
|
||||||
|
|
||||||
if not this.bgItemList then
|
|
||||||
this.bgItemList = {}
|
|
||||||
end
|
|
||||||
if _bgList then
|
if _bgList then
|
||||||
bgNameList = _bgList
|
bgNameList = _bgList
|
||||||
end
|
end
|
||||||
for i,v in ipairs(this.bgItemList) do
|
if _playerList then
|
||||||
v.gameObject:SetActive(false)
|
playerDataList = _playerList
|
||||||
end
|
end
|
||||||
|
self.speed = 0
|
||||||
|
self.bgItemList = {}
|
||||||
|
self.playerList = {}
|
||||||
|
self.spLoader = SpriteLoader.New()
|
||||||
|
UIManager.camera.clearFlags = CameraClearFlags.Depth
|
||||||
|
self.Ctrl = poolManager:LoadAsset(riceCtrl, PoolManager.AssetType.GameObject)
|
||||||
|
self.Ctrl.name = "riceCtrl"
|
||||||
|
self.Ctrl.transform:SetParent(UIManager.uiRoot.transform.parent)
|
||||||
|
self.Ctrl.transform.position = Vector3(-100, -100, -100)
|
||||||
|
self.bgList = Util.GetGameObject(self.Ctrl.gameObject,"Canvas/BgList")
|
||||||
|
self.imgPre = Util.GetGameObject(self.bgList,"imgPre")
|
||||||
|
self.camara = Util.GetGameObject(self.Ctrl.gameObject,"Camera")
|
||||||
|
self.roadList = Util.GetGameObject(self.Ctrl.gameObject,"Canvas/RoadList")
|
||||||
|
|
||||||
|
--加载背景--并不滚动,有几个加载几个
|
||||||
|
self:SetBg()
|
||||||
|
self:SetPlayer()
|
||||||
|
return self.Ctrl
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceCtrlView:SetGameState(_state)
|
||||||
|
self.isRunning = _state
|
||||||
|
for i,v in ipairs(self.playerList) do
|
||||||
|
v:SetSinglePlayerState(self.isRunning)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceCtrlView:SetBg()
|
||||||
for i = 1, #bgNameList do
|
for i = 1, #bgNameList do
|
||||||
local go = this.bgItemList[i]
|
local go = {}
|
||||||
if not go then
|
go = newObjToParent(self.imgPre,Util.GetTransform(self.Ctrl, "Canvas/BgList"))
|
||||||
go = newObjToParent(this.imgPre,Util.GetTransform(this.Ctrl, "Canvas/BgList"))
|
go.name = "bg"..i
|
||||||
go.name = "bg"..i
|
go:GetComponent("Image").sprite = self.spLoader:LoadSprite(bgNameList[i])
|
||||||
this.bgItemList[i] = go
|
|
||||||
end
|
|
||||||
go:GetComponent("Image").sprite = this.spLoader:LoadSprite(bgNameList[i])
|
|
||||||
go:GetComponent("Image"):SetNativeSize()
|
go:GetComponent("Image"):SetNativeSize()
|
||||||
go.gameObject:SetActive(true)
|
go.gameObject:SetActive(true)
|
||||||
|
self.bgItemList[i] = go
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.Dispose()
|
function RiceCtrlView:SetPlayer()
|
||||||
if this.Ctrl then
|
for i = 1, 4 do--#playerDataList do
|
||||||
poolManager:UnLoadAsset(riceCtrl, this.Ctrl, PoolManager.AssetType.GameObject)
|
self.playerList[i] = {}
|
||||||
this.Ctrl = nil
|
self.playerList[i] = SubUIManager.Open(SubUIConfig.PlayerRiceView,self.roadList.transform,i)--playerDataList[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceCtrlView:Dispose()
|
||||||
|
self.speed = 0
|
||||||
|
for i,v in ipairs(self.bgItemList) do
|
||||||
|
destroy(v.gameObject)
|
||||||
|
end
|
||||||
|
for i,v in ipairs(self.playerList) do
|
||||||
|
SubUIManager.Close(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
--卸载地图
|
||||||
|
if self.Ctrl then
|
||||||
|
poolManager:UnLoadAsset(riceCtrl, self.Ctrl, PoolManager.AssetType.GameObject)
|
||||||
|
self.Ctrl = nil
|
||||||
end
|
end
|
||||||
UIManager.camera.clearFlags = CameraClearFlags.Skybox
|
UIManager.camera.clearFlags = CameraClearFlags.Skybox
|
||||||
end
|
if self.spLoader then
|
||||||
|
self.spLoader:Destroy()
|
||||||
function this.Destroy()
|
self.spLoader = nil
|
||||||
if this.spLoader then
|
|
||||||
this.spLoader:Destroy()
|
|
||||||
this.spLoader = nil
|
|
||||||
end
|
end
|
||||||
this.bgItemList = {}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return this
|
return RiceCtrlView
|
|
@ -0,0 +1,52 @@
|
||||||
|
local RiceSinglePlayerView = {}
|
||||||
|
|
||||||
|
function RiceSinglePlayerView:New(gameObject)
|
||||||
|
local b = {}
|
||||||
|
b.gameObject = gameObject
|
||||||
|
b.transform = gameObject.transform
|
||||||
|
setmetatable(b, { __index = RiceSinglePlayerView })
|
||||||
|
return b
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceSinglePlayerView:InitComponent()
|
||||||
|
self.gameObject:GetComponent("RectTransform").sizeDelta = Vector2.New(10000,100)
|
||||||
|
end
|
||||||
|
|
||||||
|
--绑定事件(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:BindEvent()
|
||||||
|
end
|
||||||
|
--添加事件监听(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:AddListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
--移除事件监听(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:RemoveListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceSinglePlayerView:SetSinglePlayerState(_state)
|
||||||
|
self.isRunning = _state
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceSinglePlayerView:Update()
|
||||||
|
if self.isRunning then
|
||||||
|
LogGreen(self.data.."的speed:"..tostring(self.speed))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面打开时调用(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:OnOpen(_data)
|
||||||
|
self.data = _data
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:OnShow()
|
||||||
|
end
|
||||||
|
|
||||||
|
function RiceSinglePlayerView:OnClose()
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面销毁时调用(用于子类重写)
|
||||||
|
function RiceSinglePlayerView:OnDestroy()
|
||||||
|
end
|
||||||
|
|
||||||
|
return RiceSinglePlayerView
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4823e5f5eac0f7d4a9c4bf3156881e2e
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
||||||
|
YuJianXingManager = {}
|
||||||
|
local this = YuJianXingManager
|
||||||
|
local riceCtrl = require("Modules/YuJianXing/RiceCtrlView")
|
||||||
|
local bgList = {"y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg"}
|
||||||
|
|
||||||
|
function this.Initialize()
|
||||||
|
this.curState = 0 --当前比赛状态
|
||||||
|
this.nextSession = 0 --当前比赛场次
|
||||||
|
this.curRankId = 0 --当前排行剧本Id
|
||||||
|
this.curRecordList = 0 --当前纪录数据
|
||||||
|
this.curBetList = 0 --当前竞猜数据
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.UpdataServerData(msg)
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.InitMap()
|
||||||
|
this.riceCtrl = riceCtrl:Awake(bgList)
|
||||||
|
LogRed(tostring(this.riceCtrl.name))
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.SetGameState(_state)
|
||||||
|
this.riceCtrl:SetGameState(_state)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.DestroyMap()
|
||||||
|
-- riceCtrl:SetGameState(false)--结束比赛
|
||||||
|
if this.riceCtrl then
|
||||||
|
Timer.New(function ()
|
||||||
|
this.riceCtrl:Dispose()
|
||||||
|
end,5):Start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return YuJianXingManager
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fe0a4c8e22b9684498a41daecb8eb684
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,7 +1,6 @@
|
||||||
require("Base/BasePanel")
|
require("Base/BasePanel")
|
||||||
local riceCtrl = require("Modules/YuJianXing/RiceCtrlView")
|
-- local riceCtrl = require("Modules/YuJianXing/RiceCtrlView")
|
||||||
local YuJianXingPanel = Inherit(BasePanel)
|
local YuJianXingPanel = Inherit(BasePanel)
|
||||||
local bgList = {"y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg"}
|
|
||||||
|
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function YuJianXingPanel:InitComponent()
|
function YuJianXingPanel:InitComponent()
|
||||||
|
@ -20,12 +19,11 @@ function YuJianXingPanel:InitComponent()
|
||||||
self.canBetTime = Util.GetGameObject(self.gameObject, "Bgs/Up/Board/time3"):GetComponent("Text")
|
self.canBetTime = Util.GetGameObject(self.gameObject, "Bgs/Up/Board/time3"):GetComponent("Text")
|
||||||
--Bg
|
--Bg
|
||||||
self.bg = Util.GetGameObject(self.gameObject, "Bgs/Bg")
|
self.bg = Util.GetGameObject(self.gameObject, "Bgs/Bg")
|
||||||
riceCtrl.Init()
|
|
||||||
|
|
||||||
--testBtn
|
--testBtn
|
||||||
self.start = Util.GetGameObject(self.gameObject, "Button (4)")
|
self.start = Util.GetGameObject(self.gameObject, "Button (4)")
|
||||||
self.speedUp = Util.GetGameObject(self.gameObject, "Button (3)")
|
-- self.speedUp = Util.GetGameObject(self.gameObject, "Button (3)")
|
||||||
self.speedDown = Util.GetGameObject(self.gameObject, "Button (2)")
|
-- self.speedDown = Util.GetGameObject(self.gameObject, "Button (2)")
|
||||||
self.reset = Util.GetGameObject(self.gameObject, "Button (1)")
|
self.reset = Util.GetGameObject(self.gameObject, "Button (1)")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -57,20 +55,10 @@ function YuJianXingPanel:BindEvent()
|
||||||
|
|
||||||
-----test
|
-----test
|
||||||
Util.AddOnceClick(self.start,function ()
|
Util.AddOnceClick(self.start,function ()
|
||||||
-- self.bg.transform:DOLocalMove(targetPos, 10, false):OnStart(function ()
|
YuJianXingManager.SetGameState(true)
|
||||||
-- end):OnUpdate(function() --TODO:测试速度
|
|
||||||
-- end):OnComplete(function ()
|
|
||||||
-- end):SetEase(Ease.Linear)
|
|
||||||
end)
|
|
||||||
Util.AddOnceClick(self.speedUp,function ()
|
|
||||||
self:CLosePanel()
|
|
||||||
end)
|
|
||||||
Util.AddOnceClick(self.speedDown,function ()
|
|
||||||
self:CLosePanel()
|
|
||||||
end)
|
end)
|
||||||
Util.AddOnceClick(self.reset,function ()
|
Util.AddOnceClick(self.reset,function ()
|
||||||
self.bg.localPosition = Vector2.zero
|
YuJianXingManager.SetGameState(false)
|
||||||
self.speed = 0
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -87,21 +75,20 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function YuJianXingPanel:OnOpen()
|
function YuJianXingPanel:OnOpen()
|
||||||
riceCtrl.Awake(bgList)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 打开,重新打开时回调
|
-- 打开,重新打开时回调
|
||||||
function YuJianXingPanel:OnShow()
|
function YuJianXingPanel:OnShow()
|
||||||
|
YuJianXingManager.InitMap()
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function YuJianXingPanel:OnClose()
|
function YuJianXingPanel:OnClose()
|
||||||
riceCtrl.Dispose()
|
YuJianXingManager.DestroyMap()
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
function YuJianXingPanel:OnDestroy()
|
function YuJianXingPanel:OnDestroy()
|
||||||
riceCtrl.Destroy()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return YuJianXingPanel
|
return YuJianXingPanel
|
Loading…
Reference in New Issue