Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
林新发
UnityXFramework
提交
fda96fc9
U
UnityXFramework
项目概览
林新发
/
UnityXFramework
通知
1399
Star
143
Fork
77
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
U
UnityXFramework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fda96fc9
编写于
12月 14, 2021
作者:
L
linxinfa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增红点系统
上级
d6e61dba
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
430 addition
and
430 deletion
+430
-430
Assembly-CSharp-Editor.csproj
Assembly-CSharp-Editor.csproj
+197
-200
Assembly-CSharp.csproj
Assembly-CSharp.csproj
+199
-190
Assets/GameRes/UIPrefabs/GameHall/GameHallPanel.prefab
Assets/GameRes/UIPrefabs/GameHall/GameHallPanel.prefab
+2
-4
Assets/GameRes/UIPrefabs/Redpoint/RedpointPanel.prefab
Assets/GameRes/UIPrefabs/Redpoint/RedpointPanel.prefab
+6
-6
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointNode.lua
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointNode.lua
+4
-2
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointTree.lua
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointTree.lua
+18
-17
Assets/LuaFramework/Lua/View/GameHall/GameHallPanel.lua
Assets/LuaFramework/Lua/View/GameHall/GameHallPanel.lua
+1
-0
Assets/Scenes/Main.unity
Assets/Scenes/Main.unity
+1
-1
Assets/luabundle.meta
Assets/luabundle.meta
+0
-8
ProjectSettings/ProjectVersion.txt
ProjectSettings/ProjectVersion.txt
+2
-2
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
+0
-0
未找到文件。
Assembly-CSharp-Editor.csproj
浏览文件 @
fda96fc9
此差异已折叠。
点击以展开。
Assembly-CSharp.csproj
浏览文件 @
fda96fc9
此差异已折叠。
点击以展开。
Assets/GameRes/UIPrefabs/GameHall/GameHallPanel.prefab
浏览文件 @
fda96fc9
...
...
@@ -299,8 +299,6 @@ MonoBehaviour:
obj
:
{
fileID
:
3190646328964235041
}
-
name
:
redpointBtn
obj
:
{
fileID
:
1170740374806143586
}
-
name
:
redpointObj
obj
:
{
fileID
:
2231633638448600168
}
-
name
:
redpointText
obj
:
{
fileID
:
6154726871490356
}
---
!u!1
&1346032198865300369
...
...
@@ -641,7 +639,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&1174548104332698780
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1714,7 +1712,7 @@ MonoBehaviour:
m_Calls
:
[]
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
22
m_FontSize
:
16
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
2
...
...
Assets/GameRes/UIPrefabs/Redpoint/RedpointPanel.prefab
浏览文件 @
fda96fc9
...
...
@@ -298,7 +298,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&8630817889605702701
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -532,7 +532,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&885348046922738247
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -682,7 +682,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&5851606526797702846
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1112,7 +1112,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&9035606793222068818
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1851,7 +1851,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&3809102330246643935
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -2197,7 +2197,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&704922229448584010
RectTransform
:
m_ObjectHideFlags
:
0
...
...
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointNode.lua
浏览文件 @
fda96fc9
...
...
@@ -4,8 +4,10 @@ RedpointNode = RedpointNode or {}
RedpointNode
.
__index
=
RedpointNode
function
RedpointNode
.
New
()
function
RedpointNode
.
New
(
name
)
local
self
=
{}
-- 节点名
self
.
name
=
name
-- 节点被经过的次数
self
.
passCnt
=
0
-- 节点作为末尾节点的次数
...
...
@@ -13,7 +15,7 @@ function RedpointNode.New()
-- 红点数(子节点的红点数的和)
self
.
redpointCnt
=
0
-- 子节点
self
.
nexts
=
{}
self
.
children
=
{}
-- 红点更新时回调
self
.
updateCb
=
{}
setmetatable
(
self
,
RedpointNode
)
...
...
Assets/LuaFramework/Lua/Logic/Redpoint/RedpointTree.lua
浏览文件 @
fda96fc9
...
...
@@ -3,6 +3,7 @@
RedpointTree
=
RedpointTree
or
{}
local
this
=
RedpointTree
-- 根节点
this
.
root
=
nil
-- 节点名
...
...
@@ -20,7 +21,7 @@ RedpointTree.NodeNames = {
function
RedpointTree
.
Init
()
-- 先创建根节点
this
.
root
=
RedpointNode
.
New
()
this
.
root
=
RedpointNode
.
New
(
"Root"
)
-- 构建前缀树
for
_
,
name
in
pairs
(
RedpointTree
.
NodeNames
)
do
this
.
InsertNode
(
name
)
...
...
@@ -50,10 +51,10 @@ function RedpointTree.InsertNode(name)
node
.
passCnt
=
node
.
passCnt
+
1
local
pathList
=
LuaUtil
.
SplitString
(
name
,
"|"
)
for
_
,
path
in
pairs
(
pathList
)
do
if
nil
==
node
.
nexts
[
path
]
then
node
.
nexts
[
path
]
=
RedpointNode
.
New
(
)
if
nil
==
node
.
children
[
path
]
then
node
.
children
[
path
]
=
RedpointNode
.
New
(
path
)
end
node
=
node
.
nexts
[
path
]
node
=
node
.
children
[
path
]
node
.
passCnt
=
node
.
passCnt
+
1
end
node
.
endCnt
=
node
.
endCnt
+
1
...
...
@@ -67,10 +68,10 @@ function RedpointTree.SearchNode(name)
local
node
=
this
.
root
local
pathList
=
LuaUtil
.
SplitString
(
name
,
"|"
)
for
_
,
path
in
pairs
(
pathList
)
do
if
nil
==
node
.
nexts
[
path
]
then
if
nil
==
node
.
children
[
path
]
then
return
nil
end
node
=
node
.
nexts
[
path
]
node
=
node
.
children
[
path
]
end
if
node
.
endCnt
>
0
then
return
node
...
...
@@ -87,13 +88,13 @@ function RedpointTree.DeleteNode(name)
node
.
passCnt
=
node
.
passCnt
-
1
local
pathList
=
LuaUtil
.
SplitString
(
name
,
'.'
)
for
_
,
path
in
pairs
(
pathList
)
do
local
nextNode
=
node
.
nexts
[
path
]
nextNode
.
passCnt
=
next
Node
.
passCnt
-
1
if
0
==
next
Node
.
passCnt
then
node
.
nexts
[
path
]
=
nil
local
childNode
=
node
.
children
[
path
]
childNode
.
passCnt
=
child
Node
.
passCnt
-
1
if
0
==
child
Node
.
passCnt
then
node
.
children
[
path
]
=
nil
return
end
node
=
next
Node
node
=
child
Node
end
node
.
endCnt
=
node
.
endCnt
-
1
end
...
...
@@ -112,9 +113,9 @@ function RedpointTree.ChangeRedpointCnt(name, delta)
local
node
=
this
.
root
local
pathList
=
LuaUtil
.
SplitString
(
name
,
"|"
)
for
_
,
path
in
pairs
(
pathList
)
do
local
nextNode
=
node
.
nexts
[
path
]
nextNode
.
redpointCnt
=
next
Node
.
redpointCnt
+
delta
node
=
next
Node
local
childNode
=
node
.
children
[
path
]
childNode
.
redpointCnt
=
child
Node
.
redpointCnt
+
delta
node
=
child
Node
-- 调用回调函数
for
_
,
cb
in
pairs
(
node
.
updateCb
)
do
cb
(
node
.
redpointCnt
)
...
...
@@ -122,7 +123,7 @@ function RedpointTree.ChangeRedpointCnt(name, delta)
end
end
--
获取
节点的红点数
--
查询
节点的红点数
function
RedpointTree
.
GetRedpointCnt
(
name
)
local
node
=
this
.
SearchNode
(
name
)
if
nil
==
node
then
...
...
@@ -142,9 +143,9 @@ end
-- 递归获取整棵树的路径
function
RedpointTree
.
GetFullTreePath
(
parent
,
pathList
)
for
path
,
node
in
pairs
(
parent
.
nexts
)
do
for
path
,
node
in
pairs
(
parent
.
children
)
do
table.insert
(
pathList
,
path
)
if
LuaUtil
.
TableCount
(
node
.
nexts
)
>
0
then
if
LuaUtil
.
TableCount
(
node
.
children
)
>
0
then
this
.
GetFullTreePath
(
node
,
pathList
)
end
end
...
...
Assets/LuaFramework/Lua/View/GameHall/GameHallPanel.lua
浏览文件 @
fda96fc9
...
...
@@ -48,6 +48,7 @@ function GameHallPanel:SetUi(binder)
end
-- 更新红点
function
GameHallPanel
:
UpdateRedPoint
(
redpointCnt
)
self
.
redpointText
.
text
=
tostring
(
redpointCnt
)
LuaUtil
.
SafeActiveObj
(
self
.
redpointText
.
transform
.
parent
,
redpointCnt
>
0
)
...
...
Assets/Scenes/Main.unity
浏览文件 @
fda96fc9
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.373119
53
,
g
:
0.38074014
,
b
:
0.3587274
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.373119
92
,
g
:
0.38074034
,
b
:
0.35872713
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
Assets/luabundle.meta
已删除
100644 → 0
浏览文件 @
d6e61dba
fileFormatVersion: 2
guid: 659d8d4d3b8b1694b851a28a79baae38
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
ProjectSettings/ProjectVersion.txt
浏览文件 @
fda96fc9
m_EditorVersion: 2021.1.
7
f1c1
m_EditorVersionWithRevision: 2021.1.
7f1c1 (4e944ebb9621
)
m_EditorVersion: 2021.1.
9
f1c1
m_EditorVersionWithRevision: 2021.1.
9f1c1 (a9c352b271d7
)
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
浏览文件 @
fda96fc9
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录