Commit 0fa55877 authored by wanqing's avatar wanqing

脚本优化

parent b9ec4809
...@@ -78,7 +78,6 @@ public class BattleUI : MonoBehaviour ...@@ -78,7 +78,6 @@ public class BattleUI : MonoBehaviour
// 当前关卡再来一次 // 当前关卡再来一次
void LoadCurLevel() void LoadCurLevel()
{ {
DestroyRayFire();
m_loseObj.SetActive(false); m_loseObj.SetActive(false);
m_successObj.SetActive(false); m_successObj.SetActive(false);
BattleCtrl.instance.levelManager.LoadCurLevel(); BattleCtrl.instance.levelManager.LoadCurLevel();
......
...@@ -22,10 +22,6 @@ public class LevelBtnItem : MonoBehaviour ...@@ -22,10 +22,6 @@ public class LevelBtnItem : MonoBehaviour
} }
public void OnClickLevel(int level) public void OnClickLevel(int level)
{ {
if (level == LevelEnum.levelSixIndex)
{
BattleCtrl.instance.battleUI.DestroyRayFire();
}
BattleCtrl.instance.levelManager.LoadSelectLevel(level); BattleCtrl.instance.levelManager.LoadSelectLevel(level);
} }
} }
...@@ -36,6 +36,7 @@ public class LevelManager : MonoBehaviour ...@@ -36,6 +36,7 @@ public class LevelManager : MonoBehaviour
/// <param name="level">第几关</param> /// <param name="level">第几关</param>
public LevelCtrl LoadLevel(int levelIndex) public LevelCtrl LoadLevel(int levelIndex)
{ {
BattleCtrl.instance.battleUI.DestroyRayFire();
if (levelIndex >= 0 && levelIndex < levelPrefs.Count) if (levelIndex >= 0 && levelIndex < levelPrefs.Count)
{ {
//加载新关卡 //加载新关卡
......
...@@ -556,11 +556,10 @@ MonoBehaviour: ...@@ -556,11 +556,10 @@ MonoBehaviour:
m_GameObject: {fileID: 4681400717269551354} m_GameObject: {fileID: 4681400717269551354}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb6e52f37bca2404fac00b69fd8d21f8, type: 3} m_Script: {fileID: 11500000, guid: 98242d500b962df40b0c3a3896d7fb1c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
initialization: 1 initialization: 1
initialized: 0
simulationType: 1 simulationType: 1
objectType: 0 objectType: 0
demolitionType: 3 demolitionType: 3
...@@ -572,16 +571,6 @@ MonoBehaviour: ...@@ -572,16 +571,6 @@ MonoBehaviour:
colliderType: 0 colliderType: 0
useGravity: 1 useGravity: 1
dampening: 0.8 dampening: 0.8
recorder: 0
exclude: 0
destructible: 0
materialSolidity: 1
rotation: {x: 0, y: 0, z: 0, w: 1}
position: {x: 0, y: 0, z: 0}
velocity: {x: 0, y: 0, z: 0}
initScale: {x: 1, y: 1, z: 1}
initPosition: {x: 0, y: 0, z: 0}
initRotation: {x: 0, y: 0, z: 0, w: 1}
rigidBody: {fileID: 0} rigidBody: {fileID: 0}
meshCollider: {fileID: 0} meshCollider: {fileID: 0}
clusterColliders: [] clusterColliders: []
...@@ -593,38 +582,19 @@ MonoBehaviour: ...@@ -593,38 +582,19 @@ MonoBehaviour:
byImpact: 0 byImpact: 0
byConnectivity: 0 byConnectivity: 0
unyielding: 0 unyielding: 0
activated: 0 activatable: 0
restriction:
enable: 0
breakAction: 9
actionDelay: 0
checkInterval: 5
distance: 30
position: 0
target: {fileID: 0}
collider: {fileID: 0}
region: 0
broke: 0
limitations: limitations:
solidity: 0.1 solidity: 0.1
depth: 1 depth: 1
time: 0.2 time: 0.2
size: 0.1 size: 0.1
visible: 0
sliceByBlade: 0 sliceByBlade: 0
slicePlanes: []
contactPoint: {x: 0, y: 0, z: 0}
demolitionShould: 0
demolished: 0
birthTime: 0
bboxSize: 0
currentDepth: 0
bound: bound:
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0}
ancestor: {fileID: 0}
descendants: []
meshDemolition: meshDemolition:
amount: 30 amount: 8
variation: 0 variation: 0
depthFade: 0.5 depthFade: 0.5
contactBias: 0 contactBias: 0
...@@ -635,7 +605,7 @@ MonoBehaviour: ...@@ -635,7 +605,7 @@ MonoBehaviour:
colliderType: 0 colliderType: 0
sizeFilter: 0 sizeFilter: 0
decompose: 0 decompose: 0
removeCollinear: 1 removeCollinear: 0
layer: layer:
runtimeCaching: runtimeCaching:
type: 0 type: 0
...@@ -645,28 +615,58 @@ MonoBehaviour: ...@@ -645,28 +615,58 @@ MonoBehaviour:
inProgress: 0 inProgress: 0
wasUsed: 0 wasUsed: 0
stop: 0 stop: 0
badMesh: 0
shatterMode: 1
totalAmount: 0
innerSubId: 0
compressPrefab: 1
cacheRotationStart: {x: 0, y: 0, z: 0, w: 1} cacheRotationStart: {x: 0, y: 0, z: 0, w: 1}
mesh: {fileID: 0} mesh: {fileID: 0}
scrShatter: {fileID: 0} scrShatter: {fileID: 0}
clusterDemolition: clusterDemolition:
meshDemolition: 0
connectivity: 0 connectivity: 0
contactRadius: 15 minimumArea: 0
minimumSize: 0
percentage: 0
seed: 0
type: 0
ratio: 15
units: 1
shardArea: 100
shardDemolition: 0
minAmount: 3
maxAmount: 6
demolishable: 1
collapse:
type: 1
start: 0
end: 75
steps: 10
duration: 15
clsCount: 1
cluster: cluster:
id: 0 id: -1
tm: {fileID: 0} tm: {fileID: 0}
rootParent: {fileID: 0}
depth: 0 depth: 0
damageRadius: 0 pos: {x: 0, y: 0, z: 0}
rot: {x: 0, y: 0, z: 0, w: 0}
bound:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
demolishable: 1
rigid: {fileID: 0}
shards: []
areaCollapse: 0
minimumArea: 0
maximumArea: 0
sizeCollapse: 0
minimumSize: 0
maximumSize: 0
randomCollapse: 0
randomSeed: 0
minorClusters: []
cn: 0
nd: 0
referenceDemolition: referenceDemolition:
reference: {fileID: 0} reference: {fileID: 0}
randomList: [] randomList: []
addRigid: 1 addRigid: 1
inheritScale: 1
materials: materials:
innerMaterial: {fileID: 0} innerMaterial: {fileID: 0}
mappingScale: 0.1 mappingScale: 0.1
...@@ -680,16 +680,13 @@ MonoBehaviour: ...@@ -680,16 +680,13 @@ MonoBehaviour:
multiplier: 1 multiplier: 1
fading: fading:
onDemolition: 1 onDemolition: 1
onActivation: 1 onActivation: 0
lifeType: 4 lifeType: 4
lifeTime: 2 lifeTime: 3
lifeVariation: 0 lifeVariation: 1
fadeType: 3 fadeType: 3
fadeTime: 1 fadeTime: 2
sizeFilter: 0 sizeFilter: 0
state: 0
stop: 0
position: {x: 0, y: 0, z: 0}
reset: reset:
transform: 1 transform: 1
damage: 1 damage: 1
...@@ -697,8 +694,8 @@ MonoBehaviour: ...@@ -697,8 +694,8 @@ MonoBehaviour:
destroyDelay: 1 destroyDelay: 1
mesh: 4 mesh: 4
fragments: 0 fragments: 0
toBeDestroyed: 0 shards: 0
counter: 0 initialized: 0
meshes: [] meshes: []
pivots: [] pivots: []
rfMeshes: [] rfMeshes: []
...@@ -713,6 +710,8 @@ MonoBehaviour: ...@@ -713,6 +710,8 @@ MonoBehaviour:
skinnedMeshRend: {fileID: 0} skinnedMeshRend: {fileID: 0}
debrisList: [] debrisList: []
dustList: [] dustList: []
restriction: {fileID: 0}
sound: {fileID: 0}
--- !u!1 &4681400717455122977 --- !u!1 &4681400717455122977
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
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