Commit 0e97c63e authored by wanqing's avatar wanqing

增加z轴限制

parent 4576e969
......@@ -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++)
{
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment