Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Storage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanqing
Storage
Commits
0e97c63e
Commit
0e97c63e
authored
Apr 06, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加z轴限制
parent
4576e969
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
StorageView.cs
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
+4
-3
GlobalConfig.cs
Storage/Assets/#A2_Scripts/Services/GlobalConfig.cs
+29
-0
No files found.
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
View file @
0e97c63e
...
...
@@ -88,7 +88,8 @@ public class StorageView : MonoBehaviour
m_meshCollider
=
GetComponent
<
MeshCollider
>();
m_TotalNum
=
GlobalConfig
.
TotalNum
();
m_boxHeight
=
GlobalConfig
.
BoxHeight
();
if
(
m_pushObj
)
m_specialZLimit
=
GlobalConfig
.
GetMaxPosZ
();
if
(
m_pushObj
)
{
m_pushObj
.
SetActive
(
false
);
}
...
...
@@ -462,8 +463,8 @@ public class StorageView : MonoBehaviour
}
m_targetTrans
[
i
].
transform
.
position
=
varPos
;
}
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelEightIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelNineIndex
)
//
if (BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelEightIndex ||
//
BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelNineIndex)
{
for
(
int
i
=
0
;
i
<
m_targetTrans
.
Length
;
i
++)
{
...
...
Storage/Assets/#A2_Scripts/Services/GlobalConfig.cs
View file @
0e97c63e
...
...
@@ -135,6 +135,35 @@ public class GlobalConfig
}
return
varName
;
}
//通过当前关卡返回z轴最大的位置
public
static
float
GetMaxPosZ
()
{
int
varLevel
=
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
;
float
varPosZ
=
0.0f
;
if
(
varLevel
==
LevelEnum
.
levelOneIndex
)
{
}
else
if
(
varLevel
==
LevelEnum
.
levelTwoIndex
||
varLevel
==
LevelEnum
.
levelThreeIndex
)
{
varPosZ
=
-
0.7f
;
}
else
if
(
varLevel
==
LevelEnum
.
levelFourIndex
||
varLevel
==
LevelEnum
.
levelFiveIndex
)
{
varPosZ
=
1.0f
;
}
else
if
(
varLevel
==
LevelEnum
.
levelSixIndex
)
{
varPosZ
=
1.0f
;
}
else
if
(
varLevel
==
LevelEnum
.
levelSevenIndex
)
{
varPosZ
=
1.7f
;
}
else
if
(
varLevel
==
LevelEnum
.
levelEightIndex
||
varLevel
==
LevelEnum
.
levelNineIndex
)
{
}
return
varPosZ
;
}
}
public
enum
LangeType
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment