Commit 0fa55877 authored by wanqing's avatar wanqing

脚本优化

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