添加AI,添加云南凌沧一楼场景,修改广州场景
This commit is contained in:
@@ -116,3 +116,6 @@ MonoBehaviour:
|
||||
curRoundEnemyCount: 0
|
||||
curEnemyEventType: 0
|
||||
NpcEnemyList: []
|
||||
player: {fileID: 4948796608574586180, guid: 87ce953c4bdf37541a0348358ed9e7e7, type: 3}
|
||||
aiCharacterPre: {fileID: 3138103488680208938, guid: fd270e281173bf348a948a0a3a30594b,
|
||||
type: 3}
|
||||
|
||||
28560
Assets/_DefendNJ/Scenes/Guangdong_Guangzhou_Yanghaiyan.unity
Normal file
28560
Assets/_DefendNJ/Scenes/Guangdong_Guangzhou_Yanghaiyan.unity
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19a48a7bdc6b1fe4e8ee67ad5aa7698f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28874
Assets/_DefendNJ/Scenes/Guangdong_Shenzhen_Guangming_Wanda.unity
Normal file
28874
Assets/_DefendNJ/Scenes/Guangdong_Shenzhen_Guangming_Wanda.unity
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b13134a97c57784fbf5ac66bd61fe37
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9643,7 +9643,7 @@ MonoBehaviour:
|
||||
IncludeChildColliders: 0
|
||||
RuntimeFollower: {fileID: 0}
|
||||
colliderMaxDistance: 100
|
||||
lastTimeMaxDistanceCalced: 638948394850185306
|
||||
lastTimeMaxDistanceCalced: 638966397973620581
|
||||
--- !u!82 &675942809
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -17963,6 +17963,7 @@ MonoBehaviour:
|
||||
doorPos: {fileID: 1128989868}
|
||||
pkPos: {fileID: 107388154}
|
||||
gQPos: {fileID: 508421177}
|
||||
endPkPos: []
|
||||
doorAnim: {fileID: 3000493699664815806}
|
||||
--- !u!1 &1318686166
|
||||
GameObject:
|
||||
@@ -77613,7 +77614,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
@@ -87838,7 +87839,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -179471,7 +179472,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -190736,7 +190737,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -200241,7 +200242,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -210970,7 +210971,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -251635,7 +251636,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -266540,7 +266541,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
@@ -297913,7 +297914,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
@@ -332158,7 +332159,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -351833,7 +351834,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -356653,7 +356654,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -396864,7 +396865,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
@@ -407340,7 +407341,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -412297,7 +412298,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 500
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 1
|
||||
@@ -427036,7 +427037,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
@@ -432049,7 +432050,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 0
|
||||
gravitySource: 0
|
||||
maxNumParticles: 1000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 1
|
||||
rotation3D: 0
|
||||
@@ -437346,7 +437347,7 @@ ParticleSystem:
|
||||
m_RotationOrder: 4
|
||||
randomizeRotationDirection: 1
|
||||
gravitySource: 0
|
||||
maxNumParticles: 10000
|
||||
maxNumParticles: 50
|
||||
customEmitterVelocity: {x: 0, y: 0, z: 0}
|
||||
size3D: 0
|
||||
rotation3D: 0
|
||||
|
||||
48977
Assets/_DefendNJ/Scenes/Yunnan_Lincang_Linxiang_Hengji.unity
Normal file
48977
Assets/_DefendNJ/Scenes/Yunnan_Lincang_Linxiang_Hengji.unity
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8be51fdce027b1347be0a30dc0899175
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3205,6 +3205,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 125438559129076651, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 325528734496708736, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3245,6 +3250,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 696986871974989167, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 767076224265852409, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3265,6 +3275,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 849753062788746413, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 932296904113508712, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3325,6 +3340,21 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1220422095220402961, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1325110847513241004, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1559004533640969959, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575143325444183624, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3405,6 +3435,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1971723251520884368, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2100161447396344709, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3415,6 +3450,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2161852625863448104, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2169765853339070852, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3435,6 +3475,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2211416402427301060, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2213579068706666570, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3465,6 +3510,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2502749921124910745, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2522729981789860693, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3495,6 +3545,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2643746472421588985, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2726915014723381028, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3515,6 +3570,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2800988552003539462, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2809215041857795529, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3560,6 +3620,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2995653907225604758, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3032231123671698354, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3580,6 +3645,16 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3111290401281313933, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3189745538538973858, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3195705942048136131, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3745,6 +3820,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4281449299923232189, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4336807597110765197, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -3765,6 +3845,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4518913866118265272, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4555798657936325690, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4050,6 +4135,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6972230966064420177, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7009990496002484994, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4230,6 +4320,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7769262952445371902, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7843896366877314018, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4280,6 +4375,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8195461555316360515, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8212658914311620834, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4300,6 +4400,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8285253963061482965, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8319417507571259705, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4320,6 +4425,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8393405327078615634, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8393567289626639227, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4375,6 +4485,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8943207355180049069, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9054703962487105819, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -4395,6 +4510,11 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9164280407553040373, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: InitialModule.maxNumParticles
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9219434466564881889, guid: a10f9fe5b3ccfcb4e8d0c9fb8aadf1ad,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -10888,7 +11008,7 @@ MonoBehaviour:
|
||||
IncludeChildColliders: 0
|
||||
RuntimeFollower: {fileID: 0}
|
||||
colliderMaxDistance: 100
|
||||
lastTimeMaxDistanceCalced: 638948461884566024
|
||||
lastTimeMaxDistanceCalced: 638966400076664385
|
||||
--- !u!82 &675942809
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -19208,6 +19328,7 @@ MonoBehaviour:
|
||||
doorPos: {fileID: 1128989868}
|
||||
pkPos: {fileID: 107388154}
|
||||
gQPos: {fileID: 508421177}
|
||||
endPkPos: []
|
||||
doorAnim: {fileID: 330818048}
|
||||
--- !u!1 &1318686166
|
||||
GameObject:
|
||||
|
||||
@@ -70,7 +70,7 @@ public enum GameMode
|
||||
public class GameManager : NetworkBehaviour
|
||||
{
|
||||
public static GameManager Ins { get; private set; }
|
||||
|
||||
|
||||
#region 预制体
|
||||
public GameObject DoorPre;
|
||||
public GameObject itemPropPre;
|
||||
@@ -83,13 +83,13 @@ public class GameManager : NetworkBehaviour
|
||||
public GameObject[] EnemyPres;
|
||||
|
||||
public GameObject[] playerAiPres;
|
||||
|
||||
|
||||
public GameObject playerEndAiPres;
|
||||
|
||||
public GameObject explosionPre;
|
||||
|
||||
|
||||
public GameObject enemyGrenadePre;
|
||||
|
||||
|
||||
public GameObject enemyGasBombPre;
|
||||
|
||||
public GameObject enemyEndAiPre;
|
||||
@@ -104,29 +104,29 @@ public class GameManager : NetworkBehaviour
|
||||
private JsonLiteDB DB;
|
||||
// 怪物信息集合
|
||||
//public Dictionary<EnemyType, EnemyInfo> EnemyInfos = new Dictionary<EnemyType, EnemyInfo>();
|
||||
|
||||
public Dictionary<int,AiInfo> PlayerAiInfos = new Dictionary<int,AiInfo>();
|
||||
|
||||
|
||||
public Dictionary<int, AiInfo> PlayerAiInfos = new Dictionary<int, AiInfo>();
|
||||
|
||||
// 炮塔信息集合
|
||||
public Dictionary<TowerType, Dictionary<int, TowerInfo>> TowerInfos = new Dictionary<TowerType, Dictionary<int, TowerInfo>>();
|
||||
// 枪械信息集合
|
||||
//public Dictionary<GunType, GunInfo> GunInfos = new Dictionary<GunType, GunInfo>();
|
||||
// 子弹信息集合
|
||||
public Dictionary<BulletType, BulletInfo> BulletInfos = new Dictionary<BulletType,BulletInfo>();
|
||||
|
||||
public Dictionary<int,AiInfo> AiInfos = new Dictionary<int,AiInfo>();
|
||||
|
||||
public Dictionary<int,RoundInfo> RoundInfos = new Dictionary<int,RoundInfo>();
|
||||
|
||||
public Dictionary<BulletType, BulletInfo> BulletInfos = new Dictionary<BulletType, BulletInfo>();
|
||||
|
||||
public Dictionary<int, AiInfo> AiInfos = new Dictionary<int, AiInfo>();
|
||||
|
||||
public Dictionary<int, RoundInfo> RoundInfos = new Dictionary<int, RoundInfo>();
|
||||
|
||||
// 剧情信息
|
||||
public Dictionary<int, CombatUnitInfo> CombatUnitInfos = new Dictionary<int, CombatUnitInfo>();
|
||||
|
||||
|
||||
private List<GameObject> curGunPropList = new List<GameObject>();
|
||||
|
||||
public Dictionary<int, Player> players = new Dictionary<int, Player>();
|
||||
|
||||
|
||||
public GameMode gameMode = GameMode.OnePlayer;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 敌人自增
|
||||
/// </summary>
|
||||
@@ -136,14 +136,14 @@ public class GameManager : NetworkBehaviour
|
||||
/// 所有敌人
|
||||
/// </summary>
|
||||
public Dictionary<int, Enemy> EnemyList = new Dictionary<int, Enemy>();
|
||||
|
||||
public Dictionary<int,PlayerAI> PlayerAiList = new Dictionary<int,PlayerAI>();
|
||||
|
||||
public Dictionary<int, PlayerAI> PlayerAiList = new Dictionary<int, PlayerAI>();
|
||||
|
||||
/// <summary>
|
||||
/// 所有敌人UI
|
||||
/// </summary>
|
||||
public Dictionary<int, EnemyUI> EnemyUIList = new Dictionary<int, EnemyUI>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所有炮塔
|
||||
/// </summary>
|
||||
@@ -154,7 +154,7 @@ public class GameManager : NetworkBehaviour
|
||||
public Dictionary<string, SettleInfo> SettleInfos = new Dictionary<string, SettleInfo>();
|
||||
|
||||
//public List<Enemy> curEnemyList = new List<Enemy>();
|
||||
|
||||
|
||||
[SyncVar]
|
||||
public bool isStart;
|
||||
/// <summary>
|
||||
@@ -167,7 +167,7 @@ public class GameManager : NetworkBehaviour
|
||||
[SyncVar]
|
||||
public long vistEnd = 0;
|
||||
// 总游玩时长
|
||||
private int vistAllTime = (int)(60*12 );
|
||||
private int vistAllTime = (int)(60 * 12);
|
||||
[SyncVar]
|
||||
public string settleData = "";
|
||||
|
||||
@@ -175,10 +175,78 @@ public class GameManager : NetworkBehaviour
|
||||
public GameState gameState = GameState.None;
|
||||
[SoundGroup] public string JointIn;
|
||||
[SoundGroup] public string roundSound;
|
||||
|
||||
|
||||
public int roundWaveTime;
|
||||
public int curRoundWaveTime;
|
||||
|
||||
|
||||
//添加
|
||||
[Header("魔力队长角色")]
|
||||
public GameObject player;
|
||||
public GameObject aiCharacterPre;//AI角色预制体
|
||||
private GameObject aiCharacter;//AI角色实例
|
||||
private bool isAIIntroductionComplete = false;
|
||||
//修改处:添加创建AI角色的方法
|
||||
public void GamePlay()
|
||||
{
|
||||
CreateAICharacter();
|
||||
}
|
||||
private void CreateAICharacter()
|
||||
{
|
||||
//检查是否已经存在AI角色
|
||||
if (aiCharacter != null)
|
||||
{
|
||||
Debug.Log("AI角色已经存在,不再创建新的");
|
||||
return;
|
||||
}
|
||||
|
||||
if (aiCharacterPre != null)
|
||||
{
|
||||
Debug.Log("创建AI角色");
|
||||
|
||||
//获取第一个玩家
|
||||
Transform player = players[0].transform ;
|
||||
if (player == null)
|
||||
{
|
||||
Debug.LogError("找不到玩家,无法创建AI角色");
|
||||
return;
|
||||
}
|
||||
//在玩家前方创建AI角色
|
||||
Vector3 spawnPosition = player.transform.position + player.transform.forward * 3f;
|
||||
spawnPosition.y = 0f; // 固定Y坐标为0
|
||||
aiCharacter = Instantiate(aiCharacterPre, spawnPosition, Quaternion.identity);
|
||||
|
||||
//获取AIController并启动开场白
|
||||
AIController aiController = aiCharacter.GetComponent<AIController>();
|
||||
if (aiController != null)
|
||||
{
|
||||
//注册AI介绍完成回调
|
||||
aiController.OnIntroductionComplete += StartGameAfterIntroduction;
|
||||
|
||||
//添加延迟,确保所有组件已经完成初始化
|
||||
StartCoroutine(DelayedStartIntroduction(aiController));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("AI预制体中的AIController组件丢失");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("AI预制体没有在GameManager分配!");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator DelayedStartIntroduction(AIController aiController)
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f); // 短暂延迟
|
||||
aiController.StartIntroduction();
|
||||
}
|
||||
public void StartGameAfterIntroduction()
|
||||
{
|
||||
isAIIntroductionComplete = true;
|
||||
GameStart();
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
Ins = this;
|
||||
@@ -199,7 +267,7 @@ public class GameManager : NetworkBehaviour
|
||||
public void CreateDoor()
|
||||
{
|
||||
UpdateConf();
|
||||
if(!isServer)
|
||||
if (!isServer)
|
||||
return;
|
||||
GameObject door = Instantiate(DoorPre);
|
||||
door.transform.position = GameLocal.Ins.doorPos.position.ReflectVectorXOZ();
|
||||
@@ -237,9 +305,11 @@ public class GameManager : NetworkBehaviour
|
||||
[Server]
|
||||
public void GameStart()
|
||||
{
|
||||
|
||||
gameState = GameState.Playing;
|
||||
gameMode=players.Count<=1 ? GameMode.OnePlayer : GameMode.TwoPlayers;
|
||||
gameMode = players.Count <= 1 ? GameMode.OnePlayer : GameMode.TwoPlayers;
|
||||
vistEnd = (long)(DateTime.Now.Subtract(new DateTime(1970, 1, 1))).TotalSeconds + vistAllTime;
|
||||
|
||||
isStart = true;
|
||||
ChangeBgmRpc(0);
|
||||
AstarPath.active.Scan();
|
||||
@@ -252,7 +322,7 @@ public class GameManager : NetworkBehaviour
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
//GameOver(GameState.Settle);
|
||||
StartSpecialEvent(GameEnemyEventType.CleanUp);
|
||||
StartSpecialEvent(GameEnemyEventType.CleanUp);
|
||||
}, vistAllTime);
|
||||
}
|
||||
|
||||
@@ -300,23 +370,23 @@ public class GameManager : NetworkBehaviour
|
||||
Transform[] targetPos = GameLocal.Ins.enemyEndPos;
|
||||
GameObject enemy = Instantiate(enemyEndAiPre);
|
||||
NetworkServer.Spawn(enemy);
|
||||
int posId =i/3;
|
||||
int posId = i / 3;
|
||||
enemy.transform.position = GameLocal.Ins.enemyStartPos[posId].position;
|
||||
enemy.transform.eulerAngles = targetPos[posId].eulerAngles;
|
||||
enemyIndex++;
|
||||
Enemy enemyScript = enemy.GetComponent<Enemy>();
|
||||
enemyScript.OnSpawn(enemyIndex, 3, 1,GameLocal.Ins.pkPos.position);
|
||||
enemyScript.OnSpawn(enemyIndex, 3, 1, GameLocal.Ins.pkPos.position);
|
||||
enemyScript.ai.maxSpeed = 2;
|
||||
EnemyList.Add(enemyIndex, enemyScript);
|
||||
|
||||
|
||||
GameObject playerAi = Instantiate(playerEndAiPres);
|
||||
NetworkServer.Spawn(playerAi);
|
||||
playerAi.transform.position = GameLocal.Ins.endPlayerStartPos.position;
|
||||
playerAi.transform.eulerAngles = AiInfos[1].EulerAngles;
|
||||
PlayerAI playerAI = playerAi.GetComponent<PlayerAI>();
|
||||
playerAI.OnSpawn(i+2,PlayerAIType.EndPlayerAi, 1,enemy);
|
||||
playerAI.OnSpawn(i + 2, PlayerAIType.EndPlayerAi, 1, enemy);
|
||||
playerAI.ai.maxSpeed = 2;
|
||||
PlayerAiList.Add(i+2, playerAI);
|
||||
PlayerAiList.Add(i + 2, playerAI);
|
||||
}
|
||||
curRoundEnemyCount = EnemyList.Count;
|
||||
}
|
||||
@@ -330,7 +400,7 @@ public class GameManager : NetworkBehaviour
|
||||
[ClientRpc]
|
||||
public void RpcShowWin(bool isBlue)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
@@ -345,22 +415,22 @@ public class GameManager : NetworkBehaviour
|
||||
[Server]
|
||||
public void RpcMessageRound()
|
||||
{
|
||||
if(!isStart)
|
||||
if (!isStart)
|
||||
return;
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
if(!isStart|| gameState== GameState.EndEvent)
|
||||
if (!isStart || gameState == GameState.EndEvent)
|
||||
return;
|
||||
PlaySound2DRPC("1.4");
|
||||
}, curRoundWaveTime);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
if(!isStart|| gameState== GameState.EndEvent)
|
||||
if (!isStart || gameState == GameState.EndEvent)
|
||||
return;
|
||||
GetRoundEnemy();
|
||||
SetGameState(GameState.Playing);
|
||||
}, roundWaveTime);
|
||||
|
||||
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
@@ -388,10 +458,10 @@ public class GameManager : NetworkBehaviour
|
||||
int enemyId = info.EnemyList[i];
|
||||
bool isUerInfoAngles = (EnemyType)enemyId == EnemyType.Mortar;
|
||||
Transform[] targetPos = GameLocal.Ins.enemyEndPos;
|
||||
GameObject enemy = Instantiate(EnemyPres[enemyId-3]);
|
||||
GameObject enemy = Instantiate(EnemyPres[enemyId - 3]);
|
||||
NetworkServer.Spawn(enemy);
|
||||
int posId =i/3;
|
||||
int posX=i%3==0? 0: i%3==1 ? 1 : -1;
|
||||
int posId = i / 3;
|
||||
int posX = i % 3 == 0 ? 0 : i % 3 == 1 ? 1 : -1;
|
||||
if (isUerInfoAngles)
|
||||
posX = 0;
|
||||
switch ((EnemyType)enemyId)
|
||||
@@ -404,7 +474,7 @@ public class GameManager : NetworkBehaviour
|
||||
break;
|
||||
}
|
||||
enemy.transform.position = GameLocal.Ins.enemyStartPos[posId].position;
|
||||
enemy.transform.eulerAngles =isUerInfoAngles? AiInfos[i+3].EulerAngles: targetPos[posId].eulerAngles;
|
||||
enemy.transform.eulerAngles = isUerInfoAngles ? AiInfos[i + 3].EulerAngles : targetPos[posId].eulerAngles;
|
||||
enemyIndex++;
|
||||
Enemy enemyScript = enemy.GetComponent<Enemy>();
|
||||
Vector3 endPos = targetPos[posId].position + new Vector3(0, 0, posX);
|
||||
@@ -412,12 +482,12 @@ public class GameManager : NetworkBehaviour
|
||||
{
|
||||
endPos = GameLocal.Ins.riflemenPos.position;
|
||||
}
|
||||
enemyScript.OnSpawn(enemyIndex, info.EnemyList[i], 1,endPos);
|
||||
enemyScript.OnSpawn(enemyIndex, info.EnemyList[i], 1, endPos);
|
||||
EnemyList.Add(enemyIndex, enemyScript);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建辅助AI
|
||||
/// </summary>
|
||||
@@ -428,9 +498,9 @@ public class GameManager : NetworkBehaviour
|
||||
GameObject playerAi = Instantiate(playerAiPres[i]);
|
||||
NetworkServer.Spawn(playerAi);
|
||||
playerAi.transform.position = GameLocal.Ins.playerAiPos[i].position;
|
||||
playerAi.transform.eulerAngles = AiInfos[i+1].EulerAngles;
|
||||
playerAi.transform.eulerAngles = AiInfos[i + 1].EulerAngles;
|
||||
PlayerAI enemyScript = playerAi.GetComponent<PlayerAI>();
|
||||
enemyScript.OnSpawn(i,(PlayerAIType)i, 1,GameLocal.Ins.playerAiEndPos[i].gameObject);
|
||||
enemyScript.OnSpawn(i, (PlayerAIType)i, 1, GameLocal.Ins.playerAiEndPos[i].gameObject);
|
||||
PlayerAiList.Add(i, enemyScript);
|
||||
}
|
||||
// else if(gameMode == GameMode.TwoPlayers)
|
||||
@@ -448,65 +518,65 @@ public class GameManager : NetworkBehaviour
|
||||
#region 创造敌人道具
|
||||
|
||||
[Server]
|
||||
public void CreateExplosion(Vector3 pos,EnemyType type)
|
||||
{
|
||||
if(!isServer)
|
||||
return;
|
||||
var ex= Instantiate(explosionPre, pos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
public void CreateExplosion(Vector3 pos, EnemyType type)
|
||||
{
|
||||
if (!isServer)
|
||||
return;
|
||||
var ex = Instantiate(explosionPre, pos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
ex.GetComponent<Explosion>().Init(type);
|
||||
}
|
||||
|
||||
public void CreateGrenade(Vector3 startPos)
|
||||
{
|
||||
if(!isServer)
|
||||
return;
|
||||
var ex= Instantiate(enemyGrenadePre, startPos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
float x=Random.Range(-3,3);
|
||||
float z=Random.Range(-3,3);
|
||||
ex.GetComponent<Grenade>().Init(startPos, GameLocal.Ins.endMortarPos.position+new Vector3(x,0,z));
|
||||
if (!isServer)
|
||||
return;
|
||||
var ex = Instantiate(enemyGrenadePre, startPos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
float x = Random.Range(-3, 3);
|
||||
float z = Random.Range(-3, 3);
|
||||
ex.GetComponent<Grenade>().Init(startPos, GameLocal.Ins.endMortarPos.position + new Vector3(x, 0, z));
|
||||
}
|
||||
|
||||
|
||||
public void CreateGasBomb(Vector3 startPos)
|
||||
{
|
||||
if(!isServer)
|
||||
return;
|
||||
var ex= Instantiate(enemyGasBombPre, startPos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
float x=Random.Range(-3,3);
|
||||
float z=Random.Range(-3,3);
|
||||
ex.GetComponent<Grenade>().Init(startPos,GameLocal.Ins.endMortarPos.position+new Vector3(x,0,z));
|
||||
if (!isServer)
|
||||
return;
|
||||
var ex = Instantiate(enemyGasBombPre, startPos, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
float x = Random.Range(-3, 3);
|
||||
float z = Random.Range(-3, 3);
|
||||
ex.GetComponent<Grenade>().Init(startPos, GameLocal.Ins.endMortarPos.position + new Vector3(x, 0, z));
|
||||
}
|
||||
|
||||
public void CreateEnemyPlane(Transform startPos)
|
||||
{
|
||||
if(!isServer)
|
||||
return;
|
||||
var ex= Instantiate(enemyPlanePre, startPos.position, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
if (!isServer)
|
||||
return;
|
||||
var ex = Instantiate(enemyPlanePre, startPos.position, Quaternion.identity);
|
||||
NetworkServer.Spawn(ex);
|
||||
}
|
||||
public void CreateItemProp(Transform pos)
|
||||
{
|
||||
if(!isStart)
|
||||
if (!isStart)
|
||||
return;
|
||||
var item= Instantiate(itemPropPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position=new Vector3(pos.position.x,0.5f,pos.position.z);
|
||||
var item = Instantiate(itemPropPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position = new Vector3(pos.position.x, 0.5f, pos.position.z);
|
||||
item.GetComponent<ItemProp>().SetItemProp(ItemPropType.Hp);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public List<Enemy> GetRoundEnemy()
|
||||
{
|
||||
List<Enemy> curEnemyList = new List<Enemy>();
|
||||
int curRoundIndex=roundIndex>= RoundInfos.Count? Random.Range(1,RoundInfos.Count):roundIndex;
|
||||
var roundInfo=RoundInfos[curRoundIndex];
|
||||
// curRoundIndex=5;
|
||||
// roundInfo= RoundInfos[curRoundIndex];
|
||||
int curRoundIndex = roundIndex >= RoundInfos.Count ? Random.Range(1, RoundInfos.Count) : roundIndex;
|
||||
var roundInfo = RoundInfos[curRoundIndex];
|
||||
// curRoundIndex=5;
|
||||
// roundInfo= RoundInfos[curRoundIndex];
|
||||
StartEvent(roundInfo);
|
||||
if (roundIndex%5==0&&roundIndex!=0)
|
||||
if (roundIndex % 5 == 0 && roundIndex != 0)
|
||||
{
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
@@ -528,7 +598,7 @@ public class GameManager : NetworkBehaviour
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
Debug.LogError("播放音效:1.10");
|
||||
PlayerAiList[0].PlaySound3DRPC("1.10",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.10", true);
|
||||
EnemyShowOutline(EnemyType.Ordinary);
|
||||
EnemyShowOutline(EnemyType.Charge);
|
||||
}, 10);
|
||||
@@ -536,64 +606,64 @@ public class GameManager : NetworkBehaviour
|
||||
case GameEnemyEventType.Snipe:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.14",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.14", true);
|
||||
}, 5);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.15",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.15", true);
|
||||
EnemyShowOutline(EnemyType.Sniper);
|
||||
}, 7);
|
||||
break;
|
||||
case GameEnemyEventType.Mortar:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.20",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.20", true);
|
||||
StartCoroutine(CreateMortarBullet());
|
||||
}, 7);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.21",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.21", true);
|
||||
EnemyShowOutline(EnemyType.Mortar);
|
||||
}, 10);
|
||||
break;
|
||||
case GameEnemyEventType.MachineGun:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.24",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.24", true);
|
||||
StartCoroutine(CreateGQBullet());
|
||||
}, 7);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.25",true);
|
||||
EnemyShowOutline( EnemyType.Riflemen);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.25", true);
|
||||
EnemyShowOutline(EnemyType.Riflemen);
|
||||
}, 10);
|
||||
break;
|
||||
case GameEnemyEventType.Grenade:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.35",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.35", true);
|
||||
}, 5);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.38",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.38", true);
|
||||
EnemyShowOutline(EnemyType.Grenade);
|
||||
}, 7);
|
||||
break;
|
||||
case GameEnemyEventType.Biochemical:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.40",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.40", true);
|
||||
}, 5);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.42",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.42", true);
|
||||
EnemyShowOutline(EnemyType.Virus);
|
||||
}, 7);
|
||||
break;
|
||||
case GameEnemyEventType.Bomber:
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.56",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.56", true);
|
||||
EnemyShowOutline(EnemyType.Commander);
|
||||
EnemyShowOutline(EnemyType.Mortar);
|
||||
EnemyShowOutline(EnemyType.Grenade);
|
||||
@@ -604,8 +674,8 @@ public class GameManager : NetworkBehaviour
|
||||
}, 10);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.59",true);
|
||||
|
||||
PlayerAiList[0].PlaySound3DRPC("1.59", true);
|
||||
|
||||
}, 20);
|
||||
break;
|
||||
}
|
||||
@@ -619,7 +689,7 @@ public class GameManager : NetworkBehaviour
|
||||
CreateNpc();
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.67",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.67", true);
|
||||
}, 5);
|
||||
break;
|
||||
case GameEnemyEventType.CleanUp:
|
||||
@@ -642,39 +712,39 @@ public class GameManager : NetworkBehaviour
|
||||
|
||||
IEnumerator CreateMortarBullet()
|
||||
{
|
||||
Transform insPos=GameLocal.Ins.insMortarPos;
|
||||
Transform endPos=GameLocal.Ins.endMortarPos;
|
||||
Transform insPos = GameLocal.Ins.insMortarPos;
|
||||
Transform endPos = GameLocal.Ins.endMortarPos;
|
||||
bool isHaveMortar = IsHaveTypeEnemy(EnemyType.Mortar);
|
||||
while (isHaveMortar)
|
||||
{
|
||||
var item= Instantiate(mortarBulletPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position=insPos.position;
|
||||
var item = Instantiate(mortarBulletPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position = insPos.position;
|
||||
int rangeIndexX = Random.Range(-5, 5);
|
||||
int rangeIndexZ = Random.Range(-2, 2);
|
||||
item.GetComponent<EnemyMortarBullet>().Init(insPos.position,endPos.position+new Vector3(rangeIndexX,0,rangeIndexZ));
|
||||
item.GetComponent<EnemyMortarBullet>().Init(insPos.position, endPos.position + new Vector3(rangeIndexX, 0, rangeIndexZ));
|
||||
yield return new WaitForSeconds(AiInfos[(int)EnemyType.Mortar].FiringRate);
|
||||
isHaveMortar = IsHaveTypeEnemy(EnemyType.Mortar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IEnumerator CreateGQBullet()
|
||||
{
|
||||
Transform insPos=GameLocal.Ins.gQPos;
|
||||
Vector3 endPos=GameLocal.Ins.riflemenEndPos.position;
|
||||
Transform insPos = GameLocal.Ins.gQPos;
|
||||
Vector3 endPos = GameLocal.Ins.riflemenEndPos.position;
|
||||
bool isHaveMortar = IsHaveTypeEnemy(EnemyType.Riflemen);
|
||||
while (isHaveMortar)
|
||||
{
|
||||
var item= Instantiate(gqBulletPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position=insPos.position;
|
||||
|
||||
var item = Instantiate(gqBulletPre);
|
||||
NetworkServer.Spawn(item);
|
||||
item.transform.position = insPos.position;
|
||||
|
||||
int rangeIndexZ = Random.Range(-2, 2);
|
||||
item.GetComponent<Bullet>().OnSpawn(endPos+new Vector3(rangeIndexZ,0,rangeIndexZ),20);
|
||||
|
||||
var itemMuzzle= Instantiate(gqMuzzleBulletPre);
|
||||
NetworkServer.Spawn(itemMuzzle);
|
||||
itemMuzzle.transform.position=insPos.position;
|
||||
item.GetComponent<Bullet>().OnSpawn(endPos + new Vector3(rangeIndexZ, 0, rangeIndexZ), 20);
|
||||
|
||||
var itemMuzzle = Instantiate(gqMuzzleBulletPre);
|
||||
NetworkServer.Spawn(itemMuzzle);
|
||||
itemMuzzle.transform.position = insPos.position;
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
NetworkServer.Destroy(itemMuzzle.gameObject);
|
||||
@@ -689,7 +759,7 @@ public class GameManager : NetworkBehaviour
|
||||
{
|
||||
GameLocal.Ins.OpenEndBullet();
|
||||
}
|
||||
|
||||
|
||||
[ClientRpc]
|
||||
public void DownEndBullet()
|
||||
{
|
||||
@@ -752,20 +822,20 @@ public class GameManager : NetworkBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void CreateEnemyEndBullet()
|
||||
{
|
||||
PlayerAiList[0].PlaySound3DRPC("1.65",true);
|
||||
PlayerAiList[0].PlaySound3DRPC("1.65", true);
|
||||
OpenEndBullet();
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
foreach (var item in EnemyList.Values)
|
||||
{
|
||||
item.Die(null,transform);
|
||||
item.Die(null, transform);
|
||||
}
|
||||
foreach (var item in NpcEnemyList)
|
||||
{
|
||||
item.Die(null,transform);
|
||||
item.Die(null, transform);
|
||||
}
|
||||
}, 5);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
@@ -800,7 +870,7 @@ public class GameManager : NetworkBehaviour
|
||||
/// 删除敌方单位
|
||||
/// </summary>
|
||||
[Server]
|
||||
public void DeleteEnemy(int id,bool isNpcEnemy)
|
||||
public void DeleteEnemy(int id, bool isNpcEnemy)
|
||||
{
|
||||
if (isNpcEnemy)
|
||||
{
|
||||
@@ -816,14 +886,14 @@ public class GameManager : NetworkBehaviour
|
||||
return;
|
||||
}
|
||||
GameObject enemy = EnemyList[id].gameObject;
|
||||
|
||||
|
||||
EnemyList.Remove(id);
|
||||
|
||||
|
||||
curRoundEnemyCount--;
|
||||
|
||||
|
||||
NetworkServer.Destroy(enemy);
|
||||
ChangePlayerAiCountdownTime();
|
||||
if (curRoundEnemyCount<=0)
|
||||
if (curRoundEnemyCount <= 0)
|
||||
{
|
||||
CreateNextRound();
|
||||
if (gameState == GameState.EndEvent)
|
||||
@@ -864,7 +934,7 @@ public class GameManager : NetworkBehaviour
|
||||
|
||||
roundWaveTime = 15;
|
||||
curRoundWaveTime = 12;
|
||||
|
||||
|
||||
AiInfos.Clear();
|
||||
RoundInfos.Clear();
|
||||
TableReader infoReader = DB["AiInfo"].GetReader();
|
||||
@@ -912,14 +982,14 @@ public class GameManager : NetworkBehaviour
|
||||
while (infoReader.Read())
|
||||
{
|
||||
AiInfo info = new AiInfo(infoReader);
|
||||
AiInfos.Add(info.ID,info);
|
||||
AiInfos.Add(info.ID, info);
|
||||
}
|
||||
|
||||
|
||||
infoReader = DB["RoundInfo"].GetReader();
|
||||
while (infoReader.Read())
|
||||
{
|
||||
RoundInfo info = new RoundInfo(infoReader);
|
||||
RoundInfos.Add(info.ID,info);
|
||||
RoundInfos.Add(info.ID, info);
|
||||
}
|
||||
|
||||
// infoReader = DB["StoryProgressInfo"].GetReader();
|
||||
@@ -958,14 +1028,14 @@ public class GameManager : NetworkBehaviour
|
||||
/// <returns></returns>
|
||||
public GameObject GetPlayerAi(Transform curTransform)
|
||||
{
|
||||
if (PlayerAiList.Count==0 )
|
||||
if (PlayerAiList.Count == 0)
|
||||
return null;
|
||||
GameObject nearestPlayer = null;
|
||||
float minDistance = float.MaxValue;
|
||||
|
||||
foreach (var player in PlayerAiList)
|
||||
{
|
||||
if (player.Value == null|| player.Key<=1|| player.Value.isGet) continue;
|
||||
if (player.Value == null || player.Key <= 1 || player.Value.isGet) continue;
|
||||
|
||||
// 计算XZ平面距离(使用你的 ReflectVectorXOZ 方法)
|
||||
float dis = Vector3.Distance(
|
||||
@@ -983,7 +1053,7 @@ public class GameManager : NetworkBehaviour
|
||||
|
||||
return nearestPlayer;
|
||||
}
|
||||
|
||||
|
||||
public GameObject GetPlayer(Transform curTransform)
|
||||
{
|
||||
if (players == null || players.Count == 0)
|
||||
@@ -1050,7 +1120,7 @@ public class GameManager : NetworkBehaviour
|
||||
public Transform GetPlayerPos()
|
||||
{
|
||||
int rand = Random.Range(0, 100);
|
||||
|
||||
|
||||
if (players.Count >= 2) // 双人模式
|
||||
{
|
||||
if (rand < 45) // 0-44
|
||||
@@ -1070,7 +1140,7 @@ public class GameManager : NetworkBehaviour
|
||||
return PlayerAiList[1].transform; // 队友B
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Server]
|
||||
public void CreateEnemyUI(Enemy enemy)
|
||||
{
|
||||
@@ -1087,15 +1157,15 @@ public class GameManager : NetworkBehaviour
|
||||
GameObject enemyUI = EnemyUIList[id].gameObject;
|
||||
EnemyUIList.Remove(id);
|
||||
NetworkServer.Destroy(enemyUI);
|
||||
|
||||
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
public void RpcShowHUD()
|
||||
{
|
||||
HUDPanel.Show();
|
||||
HUDPanel.Show();
|
||||
}
|
||||
|
||||
|
||||
#region 空投道具
|
||||
/// <summary>
|
||||
/// 修复炮塔
|
||||
@@ -1188,7 +1258,7 @@ public class GameManager : NetworkBehaviour
|
||||
{
|
||||
return EnemyList.Count > 0;
|
||||
}
|
||||
|
||||
|
||||
#region 工具
|
||||
public string GetLessTimeStr()
|
||||
{
|
||||
@@ -1217,24 +1287,25 @@ public class GameManager : NetworkBehaviour
|
||||
return string.Format("{0}:{1}", mm, ss);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public void PlaySound2DRPC(string sound)
|
||||
{
|
||||
MasterAudio.PlaySound(sound);
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
public void PlaySound3DRPC(string sound,Transform tran,bool isStop)
|
||||
public void PlaySound3DRPC(string sound, Transform tran, bool isStop)
|
||||
{
|
||||
if(isStop)
|
||||
if (isStop)
|
||||
MasterAudio.StopAllSoundsOfTransform(tran);
|
||||
MasterAudio.PlaySound3DAtTransform(sound, tran);
|
||||
}
|
||||
|
||||
|
||||
public void PlayJointMusic()
|
||||
{
|
||||
MasterAudio.PlaySound(JointIn);
|
||||
GameLocal.Ins.BGMState.StateChange(2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
other.gameObject.GetComponent<Collider>().enabled = false;
|
||||
other.gameObject.SetActive(false);
|
||||
NetworkServer.Destroy(other.gameObject);
|
||||
GameManager.Ins.GameStart();
|
||||
GameManager.Ins.GamePlay();
|
||||
}
|
||||
|
||||
if (other.tag == "WeaponProp")
|
||||
|
||||
Reference in New Issue
Block a user