mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 12:52:07 +01:00
Added Round and Respawnsystem
This commit is contained in:
8
Assets/Prefabs/DefrainNetworking.meta
Normal file
8
Assets/Prefabs/DefrainNetworking.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 311691f34c0cdbf4eb81e33281e976ac
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
116
Assets/Prefabs/DefrainNetworking/MatchController.prefab
Normal file
116
Assets/Prefabs/DefrainNetworking/MatchController.prefab
Normal file
@@ -0,0 +1,116 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3974865484676985655
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2849906635484503724}
|
||||
- component: {fileID: 2655719566820584133}
|
||||
- component: {fileID: 6296881644358387443}
|
||||
- component: {fileID: 230145199}
|
||||
- component: {fileID: 230145200}
|
||||
- component: {fileID: 230145201}
|
||||
m_Layer: 0
|
||||
m_Name: MatchController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2849906635484503724
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 3.4827125, y: 2.271285, z: 6.642964}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2655719566820584133
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sceneId: 0
|
||||
serverOnly: 0
|
||||
visible: 0
|
||||
m_AssetId: f0c1bca3291086d449266d9ed8942180
|
||||
hasSpawned: 0
|
||||
--- !u!114 &6296881644358387443
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a57722a4a9f575b46b99d60d2d9eb2bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
syncMode: 0
|
||||
syncInterval: 0.1
|
||||
--- !u!114 &230145199
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cc117181a5e845145888b1c152bcb4ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &230145200
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4449624fc82d6174f85b2f83bbfa91f8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
availableSpawns:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
--- !u!114 &230145201
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3974865484676985655}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 26ee7b094ee25bf49aaf5ffba35f8cf6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
syncMode: 0
|
||||
syncInterval: 0.1
|
||||
Players: []
|
||||
countOfRounds: 10
|
||||
spawnController: {fileID: 0}
|
||||
localPlayer: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0c1bca3291086d449266d9ed8942180
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
102
Assets/Prefabs/DefrainNetworking/NetworkManager.prefab
Normal file
102
Assets/Prefabs/DefrainNetworking/NetworkManager.prefab
Normal file
@@ -0,0 +1,102 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4561035003361653274
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3365311783543717598}
|
||||
- component: {fileID: 5784756223373504909}
|
||||
- component: {fileID: 1160028143604224560}
|
||||
- component: {fileID: 1251245409}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3365311783543717598
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4561035003361653274}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 3.4827125, y: 2.271285, z: 6.642964}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5784756223373504909
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4561035003361653274}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
dontDestroyOnLoad: 1
|
||||
PersistNetworkManagerToOfflineScene: 0
|
||||
runInBackground: 1
|
||||
autoStartServerBuild: 1
|
||||
serverTickRate: 30
|
||||
offlineScene: Assets/Scenes/TestScene.unity
|
||||
onlineScene: Assets/Scenes/TestScene.unity
|
||||
transport: {fileID: 1160028143604224560}
|
||||
networkAddress: localhost
|
||||
maxConnections: 100
|
||||
authenticator: {fileID: 0}
|
||||
playerPrefab: {fileID: 6272346181302961293, guid: a14d876ac00bdf6498e30b3e58b68fdf, type: 3}
|
||||
autoCreatePlayer: 1
|
||||
playerSpawnMethod: 0
|
||||
spawnPrefabs: []
|
||||
--- !u!114 &1160028143604224560
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4561035003361653274}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b0fecffa3f624585964b0d0eb21b18e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Port: 7777
|
||||
DualMode: 1
|
||||
NoDelay: 1
|
||||
Interval: 10
|
||||
Timeout: 10000
|
||||
FastResend: 2
|
||||
CongestionWindow: 0
|
||||
SendWindowSize: 4096
|
||||
ReceiveWindowSize: 4096
|
||||
NonAlloc: 1
|
||||
debugLog: 0
|
||||
statisticsGUI: 0
|
||||
statisticsLog: 0
|
||||
--- !u!114 &1251245409
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4561035003361653274}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
offsetX: 0
|
||||
offsetY: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cd2e2b44dc49ae44b48fc76a1e09712
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -14,6 +14,8 @@ GameObject:
|
||||
- component: {fileID: 3422988367618467038}
|
||||
- component: {fileID: -5945522205665126515}
|
||||
- component: {fileID: 3094132477016057847}
|
||||
- component: {fileID: 840472934}
|
||||
- component: {fileID: 840472941}
|
||||
m_Layer: 0
|
||||
m_Name: GameManager
|
||||
m_TagString: GameController
|
||||
@@ -50,6 +52,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
Players: []
|
||||
countOfRounds: 10
|
||||
spawnController: {fileID: 0}
|
||||
localPlayer: {fileID: 0}
|
||||
--- !u!114 &3422988367618467037
|
||||
MonoBehaviour:
|
||||
@@ -129,3 +132,32 @@ MonoBehaviour:
|
||||
autoCreatePlayer: 1
|
||||
playerSpawnMethod: 0
|
||||
spawnPrefabs: []
|
||||
--- !u!114 &840472934
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422988367618467032}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4449624fc82d6174f85b2f83bbfa91f8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
availableSpawns:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
--- !u!114 &840472941
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422988367618467032}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cc117181a5e845145888b1c152bcb4ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
||||
@@ -1294,67 +1294,67 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.49565774
|
||||
value: 0.42054832
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.4028321
|
||||
value: 0.57316214
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.47084302
|
||||
value: 0.45451018
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.6085693
|
||||
value: 0.5366981
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.5662176
|
||||
value: 0.42677584
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.8008484
|
||||
value: 0.87951803
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.04959982
|
||||
value: 0.037384924
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.18862498
|
||||
value: -0.20715398
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.6432096
|
||||
value: 0.35630274
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.7010284
|
||||
value: -0.83348465
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.02918151
|
||||
value: 0.10413144
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.30657643
|
||||
value: 0.40927806
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.64756745
|
||||
value: 0.35774222
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.6947033
|
||||
value: -0.82612306
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.034390952
|
||||
value: -0.114312366
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.3112249
|
||||
value: -0.42008814
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_Name
|
||||
@@ -1362,35 +1362,35 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.556481
|
||||
value: 0.4137712
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.80733955
|
||||
value: 0.88543284
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.048747048
|
||||
value: -0.036245864
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.19014606
|
||||
value: 0.20853862
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.4882959
|
||||
value: 0.41165015
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.41018188
|
||||
value: 0.5740402
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.4844513
|
||||
value: -0.47313002
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.59885305
|
||||
value: -0.52646935
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 01316cb596562384da845bc519fb90de, type: 3}
|
||||
|
||||
@@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -353,6 +353,102 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 5.3916016, y: -17.471985}
|
||||
m_SizeDelta: {x: 88.783295, y: 28.615997}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!1 &76630394
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 76630395}
|
||||
- component: {fileID: 76630396}
|
||||
m_Layer: 0
|
||||
m_Name: Spawnpoint 2 Team 2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &76630395
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 76630394}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -9.93, y: 5.64, z: 10.41}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1876458703}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &76630396
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 76630394}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2829074013a88f244be47100568015d5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
teamID: 0
|
||||
available: 1
|
||||
blocked: 0
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &104338202
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 104338203}
|
||||
- component: {fileID: 104338204}
|
||||
m_Layer: 0
|
||||
m_Name: Spawnpoint 3 Team 2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &104338203
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 104338202}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 4.12, y: 5.64, z: 11.09}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1876458703}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &104338204
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 104338202}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2829074013a88f244be47100568015d5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
teamID: 0
|
||||
available: 1
|
||||
blocked: 0
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &203427802
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -553,71 +649,6 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
|
||||
--- !u!1001 &419161482
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3094132477016057847, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: offlineScene
|
||||
value: Assets/Scenes/TestScene.unity
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3094132477016057847, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: playerPrefab
|
||||
value:
|
||||
objectReference: {fileID: 6272346181302961293, guid: a14d876ac00bdf6498e30b3e58b68fdf, type: 3}
|
||||
- target: {fileID: 3422988367618467032, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: GameManager
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3422988367618467043, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b62548b3f87093b4dbc561f3dd1abcb8, type: 3}
|
||||
--- !u!1 &450235891 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -466329591000292508, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||
@@ -810,6 +841,54 @@ MeshCollider:
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 8385836491182413749, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||
--- !u!1 &655071529
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 655071530}
|
||||
- component: {fileID: 655071531}
|
||||
m_Layer: 0
|
||||
m_Name: Spawnpoint 1 Team 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &655071530
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 655071529}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.35, y: 5.64, z: -1.12}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1876458703}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &655071531
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 655071529}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2829074013a88f244be47100568015d5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
teamID: 1
|
||||
available: 1
|
||||
blocked: 0
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &670392703 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -3989346385401443251, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||
@@ -1080,6 +1159,54 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||
--- !u!1 &753584348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 753584349}
|
||||
- component: {fileID: 753584350}
|
||||
m_Layer: 0
|
||||
m_Name: Spawnpoint 1 Team 2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &753584349
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 753584348}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -10.37, y: 5.64, z: -1.75}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1876458703}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &753584350
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 753584348}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2829074013a88f244be47100568015d5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
teamID: 0
|
||||
available: 1
|
||||
blocked: 0
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &987854204
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1318,7 +1445,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1351784389
|
||||
GameObject:
|
||||
@@ -2047,6 +2174,41 @@ MeshCollider:
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 8552134717624371188, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||
--- !u!1 &1876458702
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1876458703}
|
||||
m_Layer: 0
|
||||
m_Name: Spawnpoints
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1876458703
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1876458702}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 5.94973, y: 3.086451, z: -1.6778176}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 655071530}
|
||||
- {fileID: 753584349}
|
||||
- {fileID: 76630395}
|
||||
- {fileID: 104338203}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2119583729
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2142,8 +2304,142 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1496806602367600913
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 3.4827125
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.271285
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 6.642964
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4561035003361653274, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: NetworkManager
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
|
||||
--- !u!1001 &3454029965885532949
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 230145200, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: availableSpawns.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 655071531}
|
||||
- target: {fileID: 230145200, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: availableSpawns.Array.data[1]
|
||||
value:
|
||||
objectReference: {fileID: 753584350}
|
||||
- target: {fileID: 230145200, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: availableSpawns.Array.data[2]
|
||||
value:
|
||||
objectReference: {fileID: 76630396}
|
||||
- target: {fileID: 230145200, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: availableSpawns.Array.data[3]
|
||||
value:
|
||||
objectReference: {fileID: 104338204}
|
||||
- target: {fileID: 2655719566820584133, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: sceneId
|
||||
value: 4169713921
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 3.4827125
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.271285
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 6.642964
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3974865484676985655, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MatchController
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
|
||||
--- !u!1001 &8307265127065581321
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
8
Assets/Scripts/DefrainNetworking.meta
Normal file
8
Assets/Scripts/DefrainNetworking.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f6420073b2c41a48bb7845b9b3af0f1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
61
Assets/Scripts/DefrainNetworking/DefrainSpawnController.cs
Normal file
61
Assets/Scripts/DefrainNetworking/DefrainSpawnController.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Mirror;
|
||||
|
||||
/*
|
||||
Documentation: https://mirror-networking.gitbook.io/docs/guides/networkbehaviour
|
||||
API Reference: https://mirror-networking.com/docs/api/Mirror.NetworkBehaviour.html
|
||||
*/
|
||||
|
||||
// NOTE: Do not put objects in DontDestroyOnLoad (DDOL) in Awake. You can do that in Start instead.
|
||||
|
||||
public class DefrainSpawnController : NetworkBehaviour
|
||||
{
|
||||
#region Start & Stop Callbacks
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked for NetworkBehaviour objects when they become active on the server.
|
||||
/// <para>This could be triggered by NetworkServer.Listen() for objects in the scene, or by NetworkServer.Spawn() for objects that are dynamically created.</para>
|
||||
/// <para>This will be called for objects on a "host" as well as for object on a dedicated server.</para>
|
||||
/// </summary>
|
||||
public override void OnStartServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the server when the object is unspawned
|
||||
/// <para>Useful for saving object data in persistent storage</para>
|
||||
/// </summary>
|
||||
public override void OnStopServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on every NetworkBehaviour when it is activated on a client.
|
||||
/// <para>Objects on the host have this function called, as there is a local client on the host. The values of SyncVars on object are guaranteed to be initialized correctly with the latest state from the server when this function is called on the client.</para>
|
||||
/// </summary>
|
||||
public override void OnStartClient() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on clients when the server has caused this object to be destroyed.
|
||||
/// <para>This can be used as a hook to invoke effects or do client specific cleanup.</para>
|
||||
/// </summary>
|
||||
public override void OnStopClient() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when the local player object has been set up.
|
||||
/// <para>This happens after OnStartClient(), as it is triggered by an ownership message from the server. This is an appropriate place to activate components or functionality that should only be active for the local player, such as cameras and input.</para>
|
||||
/// </summary>
|
||||
public override void OnStartLocalPlayer() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on behaviours that have authority, based on context and <see cref="NetworkIdentity.hasAuthority">NetworkIdentity.hasAuthority</see>.
|
||||
/// <para>This is called after <see cref="OnStartServer">OnStartServer</see> and before <see cref="OnStartClient">OnStartClient.</see></para>
|
||||
/// <para>When <see cref="NetworkIdentity.AssignClientAuthority">AssignClientAuthority</see> is called on the server, this will be called on the client that owns the object. When an object is spawned with <see cref="NetworkServer.Spawn">NetworkServer.Spawn</see> with a NetworkConnection parameter included, this will be called on the client that owns the object.</para>
|
||||
/// </summary>
|
||||
public override void OnStartAuthority() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on behaviours when authority is removed.
|
||||
/// <para>When NetworkIdentity.RemoveClientAuthority is called on the server, this will be called on the client that owns the object.</para>
|
||||
/// </summary>
|
||||
public override void OnStopAuthority() { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a57722a4a9f575b46b99d60d2d9eb2bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
248
Assets/Scripts/GameManager/DefrainNetworkManager.cs
Normal file
248
Assets/Scripts/GameManager/DefrainNetworkManager.cs
Normal file
@@ -0,0 +1,248 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Mirror;
|
||||
|
||||
/*
|
||||
Documentation: https://mirror-networking.gitbook.io/docs/components/network-manager
|
||||
API Reference: https://mirror-networking.com/docs/api/Mirror.NetworkManager.html
|
||||
*/
|
||||
|
||||
public class DefrainNetworkManager : NetworkManager
|
||||
{
|
||||
#region Unity Callbacks
|
||||
|
||||
public override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs on both Server and Client
|
||||
/// Networking is NOT initialized when this fires
|
||||
/// </summary>
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs on both Server and Client
|
||||
/// Networking is NOT initialized when this fires
|
||||
/// </summary>
|
||||
public override void Start()
|
||||
{
|
||||
base.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs on both Server and Client
|
||||
/// </summary>
|
||||
public override void LateUpdate()
|
||||
{
|
||||
base.LateUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs on both Server and Client
|
||||
/// </summary>
|
||||
public override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Start & Stop
|
||||
|
||||
/// <summary>
|
||||
/// Set the frame rate for a headless server.
|
||||
/// <para>Override if you wish to disable the behavior or set your own tick rate.</para>
|
||||
/// </summary>
|
||||
public override void ConfigureHeadlessFrameRate()
|
||||
{
|
||||
base.ConfigureHeadlessFrameRate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// called when quitting the application by closing the window / pressing stop in the editor
|
||||
/// </summary>
|
||||
public override void OnApplicationQuit()
|
||||
{
|
||||
base.OnApplicationQuit();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Scene Management
|
||||
|
||||
/// <summary>
|
||||
/// This causes the server to switch scenes and sets the networkSceneName.
|
||||
/// <para>Clients that connect to this server will automatically switch to this scene. This is called automatically if onlineScene or offlineScene are set, but it can be called from user code to switch scenes again while the game is in progress. This automatically sets clients to be not-ready. The clients must call NetworkClient.Ready() again to participate in the new scene.</para>
|
||||
/// </summary>
|
||||
/// <param name="newSceneName"></param>
|
||||
public override void ServerChangeScene(string newSceneName)
|
||||
{
|
||||
base.ServerChangeScene(newSceneName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called from ServerChangeScene immediately before SceneManager.LoadSceneAsync is executed
|
||||
/// <para>This allows server to do work / cleanup / prep before the scene changes.</para>
|
||||
/// </summary>
|
||||
/// <param name="newSceneName">Name of the scene that's about to be loaded</param>
|
||||
public override void OnServerChangeScene(string newSceneName) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on the server when a scene is completed loaded, when the scene load was initiated by the server with ServerChangeScene().
|
||||
/// </summary>
|
||||
/// <param name="sceneName">The name of the new scene.</param>
|
||||
public override void OnServerSceneChanged(string sceneName) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called from ClientChangeScene immediately before SceneManager.LoadSceneAsync is executed
|
||||
/// <para>This allows client to do work / cleanup / prep before the scene changes.</para>
|
||||
/// </summary>
|
||||
/// <param name="newSceneName">Name of the scene that's about to be loaded</param>
|
||||
/// <param name="sceneOperation">Scene operation that's about to happen</param>
|
||||
/// <param name="customHandling">true to indicate that scene loading will be handled through overrides</param>
|
||||
public override void OnClientChangeScene(string newSceneName, SceneOperation sceneOperation, bool customHandling) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on clients when a scene has completed loaded, when the scene load was initiated by the server.
|
||||
/// <para>Scene changes can cause player objects to be destroyed. The default implementation of OnClientSceneChanged in the NetworkManager is to add a player object for the connection if no player object exists.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">The network connection that the scene change message arrived on.</param>
|
||||
public override void OnClientSceneChanged(NetworkConnection conn)
|
||||
{
|
||||
base.OnClientSceneChanged(conn);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Server System Callbacks
|
||||
|
||||
/// <summary>
|
||||
/// Called on the server when a new client connects.
|
||||
/// <para>Unity calls this on the Server when a Client connects to the Server. Use an override to tell the NetworkManager what to do when a client connects to the server.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection from client.</param>
|
||||
public override void OnServerConnect(NetworkConnection conn) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on the server when a client is ready.
|
||||
/// <para>The default implementation of this function calls NetworkServer.SetClientReady() to continue the network setup process.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection from client.</param>
|
||||
public override void OnServerReady(NetworkConnection conn)
|
||||
{
|
||||
base.OnServerReady(conn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on the server when a client adds a new player with ClientScene.AddPlayer.
|
||||
/// <para>The default implementation for this function creates a new player object from the playerPrefab.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection from client.</param>
|
||||
public override void OnServerAddPlayer(NetworkConnection conn)
|
||||
{
|
||||
base.OnServerAddPlayer(conn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on the server when a client disconnects.
|
||||
/// <para>This is called on the Server when a Client disconnects from the Server. Use an override to decide what should happen when a disconnection is detected.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection from client.</param>
|
||||
public override void OnServerDisconnect(NetworkConnection conn)
|
||||
{
|
||||
base.OnServerDisconnect(conn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on server when transport raises an exception.
|
||||
/// <para>NetworkConnection may be null.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection of the client...may be null</param>
|
||||
/// <param name="exception">Exception thrown from the Transport.</param>
|
||||
public override void OnServerError(NetworkConnection conn, Exception exception) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Client System Callbacks
|
||||
|
||||
/// <summary>
|
||||
/// Called on the client when connected to a server.
|
||||
/// <para>The default implementation of this function sets the client as ready and adds a player. Override the function to dictate what happens when the client connects.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection to the server.</param>
|
||||
public override void OnClientConnect(NetworkConnection conn)
|
||||
{
|
||||
base.OnClientConnect(conn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clients when disconnected from a server.
|
||||
/// <para>This is called on the client when it disconnects from the server. Override this function to decide what happens when the client disconnects.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection to the server.</param>
|
||||
public override void OnClientDisconnect(NetworkConnection conn)
|
||||
{
|
||||
base.OnClientDisconnect(conn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clients when a servers tells the client it is no longer ready.
|
||||
/// <para>This is commonly used when switching scenes.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection to the server.</param>
|
||||
public override void OnClientNotReady(NetworkConnection conn) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on client when transport raises an exception.</summary>
|
||||
/// </summary>
|
||||
/// <param name="exception">Exception thrown from the Transport.</param>
|
||||
public override void OnClientError(Exception exception) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Start & Stop Callbacks
|
||||
|
||||
// Since there are multiple versions of StartServer, StartClient and StartHost, to reliably customize
|
||||
// their functionality, users would need override all the versions. Instead these callbacks are invoked
|
||||
// from all versions, so users only need to implement this one case.
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked when a host is started.
|
||||
/// <para>StartHost has multiple signatures, but they all cause this hook to be called.</para>
|
||||
/// </summary>
|
||||
public override void OnStartHost() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked when a server is started - including when a host is started.
|
||||
/// <para>StartServer has multiple signatures, but they all cause this hook to be called.</para>
|
||||
/// </summary>
|
||||
public override void OnStartServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked when the client is started.
|
||||
/// </summary>
|
||||
public override void OnStartClient() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is called when a host is stopped.
|
||||
/// </summary>
|
||||
public override void OnStopHost() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is called when a server is stopped - including when a host is stopped.
|
||||
/// </summary>
|
||||
public override void OnStopServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is called when a client is stopped.
|
||||
/// </summary>
|
||||
public override void OnStopClient() { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
11
Assets/Scripts/GameManager/DefrainNetworkManager.cs.meta
Normal file
11
Assets/Scripts/GameManager/DefrainNetworkManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98670bc969268d14aa751075cb687ee5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using Mirror;
|
||||
|
||||
|
||||
// Erstellung von Teams
|
||||
@@ -9,16 +9,33 @@ using UnityEngine;
|
||||
// Verwaltung der Spieler und Teams
|
||||
//
|
||||
|
||||
public class GameMaster : MonoBehaviour
|
||||
public class GameMaster : NetworkBehaviour
|
||||
{
|
||||
int gameState = 0;
|
||||
|
||||
[Header("GameMaster")]
|
||||
[SerializeField] private List<Player> Players = new List<Player>();
|
||||
[SerializeField] private int countOfRounds = 10;
|
||||
public SpawnController spawnController;
|
||||
private TeamManager teamManager;
|
||||
|
||||
|
||||
public GameObject localPlayer;
|
||||
public void RegisterPlayer(Player player)
|
||||
{
|
||||
Players.Add(player);
|
||||
teamManager.AddTeam().AddPlayer(player);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
spawnController = GetComponent<SpawnController>();
|
||||
teamManager = GetComponent<TeamManager>();
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
StateMachine();
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.H))
|
||||
{
|
||||
|
||||
@@ -35,4 +52,54 @@ public class GameMaster : MonoBehaviour
|
||||
|
||||
|
||||
|
||||
|
||||
void StateMachine()
|
||||
{
|
||||
switch (gameState)
|
||||
{
|
||||
case 0:
|
||||
//Select teams
|
||||
if (Input.GetButtonDown("Sprint"))
|
||||
{
|
||||
gameState++;
|
||||
}
|
||||
|
||||
break;
|
||||
case 1:
|
||||
foreach (Player player in Players)
|
||||
{
|
||||
if (spawnController.GetAvailableSpawnPoint(player.team.teamID, out Vector3 v))
|
||||
{
|
||||
player.respawnPos(v);
|
||||
}
|
||||
}
|
||||
gameState++;
|
||||
break;
|
||||
case 2:
|
||||
foreach (Team team in teamManager.Teams)
|
||||
{
|
||||
if (!teamManager.teamAlive(team.teamID))
|
||||
{
|
||||
team.score++;
|
||||
gameState++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
gameState = 0;
|
||||
Debug.Log("Team died");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 RespawnRequest(GameObject player,int teamID)
|
||||
{
|
||||
if (spawnController.GetAvailableSpawnPoint(teamID, out Vector3 spawnpoint))
|
||||
{
|
||||
return spawnpoint;
|
||||
}
|
||||
return player.transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
39
Assets/Scripts/GameManager/SpawnController.cs
Normal file
39
Assets/Scripts/GameManager/SpawnController.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SpawnController : MonoBehaviour
|
||||
{
|
||||
//Spawnpoints
|
||||
[Header("Spawnpoints")]
|
||||
[SerializeField] List<Spawnpoint> availableSpawns = new List<Spawnpoint>();
|
||||
|
||||
void Start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool GetAvailableSpawnPoint(int teamID,out Vector3 spawnPosition)
|
||||
{
|
||||
|
||||
foreach (Spawnpoint spawn in availableSpawns)
|
||||
{
|
||||
if (spawn.teamID == teamID && spawn.available && !spawn.blocked)
|
||||
{
|
||||
spawnPosition = spawn.position;
|
||||
spawn.disableForSeconds(15f);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
spawnPosition = new Vector3();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/GameManager/SpawnController.cs.meta
Normal file
11
Assets/Scripts/GameManager/SpawnController.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4449624fc82d6174f85b2f83bbfa91f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/Scripts/GameManager/Spawnpoint.cs
Normal file
34
Assets/Scripts/GameManager/Spawnpoint.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Spawnpoint : MonoBehaviour
|
||||
{
|
||||
[SerializeField] public int teamID = 0;
|
||||
[SerializeField] public bool available = true;
|
||||
[SerializeField] public bool blocked = false;
|
||||
public Vector3 position;
|
||||
private void Awake()
|
||||
{
|
||||
position = this.transform.position;
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
IEnumerator disableEnum(float time)
|
||||
{
|
||||
available = false;
|
||||
yield return new WaitForSeconds(time);
|
||||
available = true;
|
||||
}
|
||||
public void disableForSeconds(float time)
|
||||
{
|
||||
StartCoroutine(disableEnum(time));
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/GameManager/Spawnpoint.cs.meta
Normal file
11
Assets/Scripts/GameManager/Spawnpoint.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2829074013a88f244be47100568015d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,17 +5,38 @@ using UnityEngine;
|
||||
public class Team
|
||||
{
|
||||
private string name;
|
||||
private int score;
|
||||
public int score;
|
||||
public int teamID;
|
||||
public int teamSize;
|
||||
public List<Player> players = new List<Player>();
|
||||
|
||||
public Team(string _name, int _score)
|
||||
public Team(string _name, int TeamID,int TeamSize)
|
||||
{
|
||||
name = _name;
|
||||
score = _score;
|
||||
teamID = TeamID;
|
||||
teamSize = TeamSize;
|
||||
score = 0;
|
||||
|
||||
Debug.Log(name + " Team Created!");
|
||||
Debug.Log(name + " Team Created! Their Team ID is " + teamID);
|
||||
}
|
||||
public bool AddPlayer(Player player)
|
||||
{
|
||||
if (players.Count < teamSize || teamSize == -1)
|
||||
{
|
||||
players.Add(player);
|
||||
player.team = this;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetTeamName()
|
||||
public void RemovePlayer(Player player)
|
||||
{
|
||||
players.Remove(player);
|
||||
player.team = null;
|
||||
}
|
||||
|
||||
public string GetTeamName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
49
Assets/Scripts/GameManager/TeamManager.cs
Normal file
49
Assets/Scripts/GameManager/TeamManager.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TeamManager : MonoBehaviour
|
||||
{
|
||||
|
||||
public List<Team> Teams = new List<Team>();
|
||||
int teamIdCount = 0;
|
||||
|
||||
public Team AddTeam(string name = "Team")
|
||||
{
|
||||
Team team = new Team(name, teamIdCount, -1);
|
||||
Teams.Add(team);
|
||||
teamIdCount++;
|
||||
return team;
|
||||
}
|
||||
public bool teamAlive(int teamID)
|
||||
{
|
||||
bool tAlive = false;
|
||||
foreach (Player player in Teams[teamID].players)
|
||||
{
|
||||
if (player.isAlive) tAlive = true;
|
||||
}
|
||||
if (Teams[teamID].players.Count == 0) tAlive = true;
|
||||
return tAlive;
|
||||
}
|
||||
public Team AddPlayerToRandomTeam(Player player)
|
||||
{
|
||||
int trys = 0;
|
||||
while(trys < 10)
|
||||
{
|
||||
int index = (int)Random.Range(0, Teams.Count - 1);
|
||||
if (Teams[index].AddPlayer(player)) return Teams[index];
|
||||
trys++;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Team GetTeamByID(int TeamID)
|
||||
{
|
||||
for (int i = 0; i < Teams.Count; i ++)
|
||||
{
|
||||
if (Teams[i].teamID == TeamID) return Teams[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/GameManager/TeamManager.cs.meta
Normal file
11
Assets/Scripts/GameManager/TeamManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc117181a5e845145888b1c152bcb4ad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -8,6 +8,8 @@ public class Player : NetworkBehaviour
|
||||
public bool isAlive = true;
|
||||
public Team team;
|
||||
[SerializeField] private const int defaultHp = 100;
|
||||
GameObject GameManager;
|
||||
GameMaster gameMaster;
|
||||
|
||||
|
||||
public ulong clientId;
|
||||
@@ -23,9 +25,30 @@ public class Player : NetworkBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
GameManager = GameObject.Find("MatchController");
|
||||
gameMaster = GameManager.GetComponent<GameMaster>();
|
||||
if (isServer)
|
||||
{
|
||||
health = defaultHp;
|
||||
gameMaster.RegisterPlayer(GetComponent<Player>());
|
||||
//respawnPos(gameMaster.RespawnRequest(this.gameObject, team.teamID));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (isLocalPlayer)
|
||||
{
|
||||
if (Input.GetKeyDown("n"))
|
||||
{
|
||||
//Debug.Log("Request respawn on local player");
|
||||
CmdRespawnRequest();
|
||||
//transform.position = Vector3.zero;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void OnStartLocalPlayer()
|
||||
@@ -46,6 +69,23 @@ public class Player : NetworkBehaviour
|
||||
}
|
||||
public void Respawn()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
[Command]
|
||||
void CmdRespawnRequest()
|
||||
{
|
||||
respawnPos(gameMaster.RespawnRequest(this.gameObject, team.teamID));
|
||||
isAlive = true;
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
public void respawnPos(Vector3 pos)
|
||||
{
|
||||
GetComponent<CharacterController>().enabled = false;
|
||||
transform.position = pos;
|
||||
GetComponent<CharacterController>().enabled = true;
|
||||
health = defaultHp;
|
||||
isAlive = true;
|
||||
}
|
||||
|
||||
@@ -53,6 +93,7 @@ public class Player : NetworkBehaviour
|
||||
{
|
||||
isAlive = false;
|
||||
AddDeaths(1);
|
||||
Debug.Log("DIE");
|
||||
}
|
||||
|
||||
//Health
|
||||
@@ -70,11 +111,9 @@ public class Player : NetworkBehaviour
|
||||
|
||||
if (isAlive)
|
||||
{
|
||||
/*Debug.Log("yeet" + value);*/
|
||||
health -= value;
|
||||
if (health <= 0)
|
||||
{
|
||||
AddDeaths(1);
|
||||
health = 0;
|
||||
Die();
|
||||
}
|
||||
@@ -139,3 +178,7 @@ public class Player : NetworkBehaviour
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ public class PlayerController : NetworkBehaviour
|
||||
Grounded();
|
||||
CheckGoundAngle();
|
||||
UpdateMovement();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -151,6 +150,7 @@ public class PlayerController : NetworkBehaviour
|
||||
|
||||
velocity = Vector3.SmoothDamp(velocity, currentDir * movementSpeed + new Vector3(0, velocityY, 0),ref refVelocity,0.01f);
|
||||
controller.Move(velocity * Time.deltaTime);
|
||||
//transform.position += velocity * Time.deltaTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class Shoot : NetworkBehaviour
|
||||
}
|
||||
if (Input.GetButtonDown("Fire")) {
|
||||
updateCanvas = true;
|
||||
Debug.Log(" click");
|
||||
if (weapon.AllowAction)
|
||||
{
|
||||
shootAnim.Recoil(0.1f);
|
||||
@@ -86,7 +85,6 @@ public class Shoot : NetworkBehaviour
|
||||
if (Physics.Raycast(muzzle.transform.position, muzzle.transform.forward, out hit) && weapon.CurrentAmmunition > 0) { // Raycast from Bullet Exit Point to camera raycast
|
||||
bulletHole(GameObject.CreatePrimitive(PrimitiveType.Sphere), hit); // Creates bullethole where raycast hits
|
||||
if (hit.transform.gameObject.GetComponent<Player>() != null) { // If hit object is a player
|
||||
Debug.Log("-->HIT PLAYER: " + hit.transform.name);
|
||||
hit.transform.gameObject.GetComponent<Player>().RemoveHealth(weapon.Damage);
|
||||
}
|
||||
}
|
||||
|
||||
61
Assets/Scripts/Yeet.cs
Normal file
61
Assets/Scripts/Yeet.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Mirror;
|
||||
|
||||
/*
|
||||
Documentation: https://mirror-networking.gitbook.io/docs/guides/networkbehaviour
|
||||
API Reference: https://mirror-networking.com/docs/api/Mirror.NetworkBehaviour.html
|
||||
*/
|
||||
|
||||
// NOTE: Do not put objects in DontDestroyOnLoad (DDOL) in Awake. You can do that in Start instead.
|
||||
|
||||
public class Yeet : NetworkBehaviour
|
||||
{
|
||||
#region Start & Stop Callbacks
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked for NetworkBehaviour objects when they become active on the server.
|
||||
/// <para>This could be triggered by NetworkServer.Listen() for objects in the scene, or by NetworkServer.Spawn() for objects that are dynamically created.</para>
|
||||
/// <para>This will be called for objects on a "host" as well as for object on a dedicated server.</para>
|
||||
/// </summary>
|
||||
public override void OnStartServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the server when the object is unspawned
|
||||
/// <para>Useful for saving object data in persistent storage</para>
|
||||
/// </summary>
|
||||
public override void OnStopServer() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called on every NetworkBehaviour when it is activated on a client.
|
||||
/// <para>Objects on the host have this function called, as there is a local client on the host. The values of SyncVars on object are guaranteed to be initialized correctly with the latest state from the server when this function is called on the client.</para>
|
||||
/// </summary>
|
||||
public override void OnStartClient() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on clients when the server has caused this object to be destroyed.
|
||||
/// <para>This can be used as a hook to invoke effects or do client specific cleanup.</para>
|
||||
/// </summary>
|
||||
public override void OnStopClient() { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when the local player object has been set up.
|
||||
/// <para>This happens after OnStartClient(), as it is triggered by an ownership message from the server. This is an appropriate place to activate components or functionality that should only be active for the local player, such as cameras and input.</para>
|
||||
/// </summary>
|
||||
public override void OnStartLocalPlayer() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on behaviours that have authority, based on context and <see cref="NetworkIdentity.hasAuthority">NetworkIdentity.hasAuthority</see>.
|
||||
/// <para>This is called after <see cref="OnStartServer">OnStartServer</see> and before <see cref="OnStartClient">OnStartClient.</see></para>
|
||||
/// <para>When <see cref="NetworkIdentity.AssignClientAuthority">AssignClientAuthority</see> is called on the server, this will be called on the client that owns the object. When an object is spawned with <see cref="NetworkServer.Spawn">NetworkServer.Spawn</see> with a NetworkConnection parameter included, this will be called on the client that owns the object.</para>
|
||||
/// </summary>
|
||||
public override void OnStartAuthority() { }
|
||||
|
||||
/// <summary>
|
||||
/// This is invoked on behaviours when authority is removed.
|
||||
/// <para>When NetworkIdentity.RemoveClientAuthority is called on the server, this will be called on the client that owns the object.</para>
|
||||
/// </summary>
|
||||
public override void OnStopAuthority() { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
11
Assets/Scripts/Yeet.cs.meta
Normal file
11
Assets/Scripts/Yeet.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24aee7fa40024d347b3ef3c5e0543078
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user