Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Basic/Invaders/Assets/Prefabs/Invaders Game Manager.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 4266113290039088506}
- component: {fileID: 4266113290039088507}
- component: {fileID: 4266113290039088509}
- component: {fileID: 2756959678467573149}
m_Layer: 0
m_Name: Invaders Game Manager
m_TagString: Untagged
Expand All @@ -28,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand Down Expand Up @@ -60,7 +61,7 @@ MonoBehaviour:
m_EnemyMovingDirection:
m_InternalValue: 0.3
m_RandomThresholdForSaucerCreation: 0.92
--- !u!114 &4266113290039088509
--- !u!114 &2756959678467573149
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
Expand All @@ -72,8 +73,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
NetworkInstanceId: 0
PrefabHash: 16858280994969747278
PrefabHashGenerator: Invaders Game Manager
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
45 changes: 20 additions & 25 deletions Basic/Invaders/Assets/Prefabs/NetworkManager.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 2577463361084716461}
- component: {fileID: 2577463361084716463}
- component: {fileID: 2577463361084716458}
- component: {fileID: 2053099818}
- component: {fileID: 8303540700821626563}
m_Layer: 0
m_Name: NetworkManager
m_TagString: Untagged
Expand All @@ -29,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: -0.01745245, z: 0, w: 0.99984777}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand All @@ -45,12 +45,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3}
m_Name:
m_EditorClassIdentifier:
DontDestroy: 1
RunInBackground: 1
LogLevel: 1
NetworkConfig:
ProtocolVersion: 0
NetworkTransport: {fileID: 2053099818}
NetworkTransport: {fileID: 8303540700821626563}
PlayerPrefab: {fileID: 0}
NetworkPrefabs:
- Override: 0
Expand Down Expand Up @@ -112,22 +111,9 @@ MonoBehaviour:
NetworkIdRecycleDelay: 120
RpcHashSize: 0
LoadSceneTimeOut: 120
MessageBufferTimeout: 20
SpawnTimeout: 1
EnableNetworkLogs: 1
--- !u!114 &2577463361084716458
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2577463361084716459}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5ea5becd79dc277409330648bf627a3e, type: 3}
m_Name:
m_EditorClassIdentifier:
DefaultMainMenu: StartMenu
--- !u!114 &2053099818
--- !u!114 &8303540700821626563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
Expand All @@ -140,9 +126,18 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_ProtocolType: 0
m_MessageBufferSize: 6144
m_ReciveQueueSize: 128
m_SendQueueSize: 128
m_SendQueueBatchSize: 4096
m_ServerAddress: 127.0.0.1
m_ServerPort: 7777
m_MaxPacketQueueSize: 128
m_MaxPayloadSize: 32000
m_MaxSendQueueSize: 98304
m_HeartbeatTimeoutMS: 500
m_ConnectTimeoutMS: 1000
m_MaxConnectAttempts: 60
m_DisconnectTimeoutMS: 30000
ConnectionData:
Address: 127.0.0.1
Port: 7777
ServerListenAddress:
DebugSimulator:
PacketDelayMS: 0
PacketJitterMS: 0
PacketDropRate: 0
63 changes: 63 additions & 0 deletions Basic/Invaders/Assets/Prefabs/SceneTransitionHandler.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7334280962834855350
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7334280962834855337}
- component: {fileID: 7334280962834855336}
- component: {fileID: 7334280962834855351}
m_Layer: 0
m_Name: SceneTransitionHandler
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7334280962834855337
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7334280962834855350}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7334280962834855336
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7334280962834855350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5ea5becd79dc277409330648bf627a3e, type: 3}
m_Name:
m_EditorClassIdentifier:
DefaultMainMenu: StartMenu
--- !u!114 &7334280962834855351
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7334280962834855350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions Basic/Invaders/Assets/Prefabs/player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 6100000}
- component: {fileID: 5000000}
- component: {fileID: 5053919295125167455}
- component: {fileID: 1149981187404082562}
- component: {fileID: 2800302518702725854}
m_Layer: 0
m_Name: player
m_TagString: Untagged
Expand Down Expand Up @@ -173,7 +173,7 @@ MonoBehaviour:
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &1149981187404082562
--- !u!114 &2800302518702725854
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
Expand All @@ -182,21 +182,20 @@ MonoBehaviour:
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Script: {fileID: 11500000, guid: df2868252ab5c4d1da357e8f11f1b524, type: 3}
m_Name:
m_EditorClassIdentifier:
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 1
SyncScaleY: 1
SyncScaleZ: 1
SyncPositionY: 0
SyncPositionZ: 0
SyncRotAngleX: 0
SyncRotAngleY: 0
SyncRotAngleZ: 0
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
InLocalSpace: 0
Interpolate: 1
CanCommitToTransform: 0
5 changes: 5 additions & 0 deletions Basic/Invaders/Assets/Scenes/InGame.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,11 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2756959678467573149, guid: 67eb58ec33df0475ca152786107f9037,
type: 3}
propertyPath: GlobalObjectIdHash
value: 1720109418
objectReference: {fileID: 0}
- target: {fileID: 4266113290039088506, guid: 67eb58ec33df0475ca152786107f9037,
type: 3}
propertyPath: m_RootOrder
Expand Down
76 changes: 75 additions & 1 deletion Basic/Invaders/Assets/Scenes/InitBootStrap.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.3731193, g: 0.38073996, b: 0.35872698, a: 1}
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -213,3 +213,77 @@ PrefabInstance:
objectReference: {fileID: 100000, guid: c02eab22aaa0b68408500d6e87878b32, type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a33721e9ba3981444b972ae70c494d73, type: 3}
--- !u!1001 &7334280963267320184
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855337, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855350, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: m_Name
value: SceneTransitionHandler
objectReference: {fileID: 0}
- target: {fileID: 7334280962834855351, guid: 91098c3dcdcf21840a4b3d63b07286d8,
type: 3}
propertyPath: GlobalObjectIdHash
value: 4152329973
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 91098c3dcdcf21840a4b3d63b07286d8, type: 3}
4 changes: 2 additions & 2 deletions Basic/Invaders/Assets/Scripts/InvadersGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ public override void OnNetworkSpawn()
/// <returns>true or false</returns>
private bool ShouldStartCountDown()
{
//If the game has started, then don't both with the rest of the count down checks.
//If the game has started, then don't bother with the rest of the count down checks.
if (HasGameStarted()) return false;
if (IsServer)
{
m_CountdownStarted.Value = SceneTransitionHandler.sceneTransitionHandler.AllClientsAreLoaded();

//While we are counting down, continually set the m_ReplicatedTimeRemaining.Value (client should only receive the update once)
//While we are counting down, continually set the replicated time remaining value for clients (client should only receive the update once)
if (m_CountdownStarted.Value && !m_ReplicatedTimeSent)
{
SetReplicatedTimeRemainingClientRPC(m_DelayedStartTime);
Expand Down
Loading