Skip to content

Commit

Permalink
#5second attempt for becon spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
hani-sayegh committed Feb 16, 2017
1 parent 793b659 commit 0d40d28
Show file tree
Hide file tree
Showing 14 changed files with 243 additions and 501 deletions.
75 changes: 75 additions & 0 deletions Assets/Prefabs/Networking/Arrow.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ GameObject:
m_Component:
- component: {fileID: 4062715202900884}
- component: {fileID: 114417069065412072}
- component: {fileID: 114439400493581264}
m_Layer: 0
m_Name: Arrow
m_TagString: Untagged
Expand Down Expand Up @@ -175,6 +176,8 @@ GameObject:
- component: {fileID: 4680998009117434}
- component: {fileID: 114977662502901678}
- component: {fileID: 95744645274962312}
- component: {fileID: 114686908955056482}
- component: {fileID: 114210224786363254}
m_Layer: 0
m_Name: Lit
m_TagString: Untagged
Expand Down Expand Up @@ -638,6 +641,26 @@ Animator:
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
--- !u!114 &114210224786363254
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1960419639055392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1768714887, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TransformSyncMode: 1
m_SendInterval: 0.1
m_SyncRotationAxis: 7
m_RotationSyncCompression: 0
m_SyncSpin: 0
m_MovementTheshold: 0.001
m_SnapThreshold: 5
m_InterpolateRotation: 1
m_InterpolateMovement: 1
--- !u!114 &114417069065412072
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -670,6 +693,58 @@ MonoBehaviour:
i15: 99
m_ServerOnly: 0
m_LocalPlayerAuthority: 1
--- !u!114 &114439400493581264
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1166831496739124}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1768714887, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TransformSyncMode: 1
m_SendInterval: 0.1
m_SyncRotationAxis: 7
m_RotationSyncCompression: 0
m_SyncSpin: 0
m_MovementTheshold: 0.001
m_SnapThreshold: 5
m_InterpolateRotation: 1
m_InterpolateMovement: 1
--- !u!114 &114686908955056482
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1960419639055392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SceneId:
m_Value: 0
m_AssetId:
i0: 145
i1: 179
i2: 164
i3: 137
i4: 210
i5: 92
i6: 178
i7: 148
i8: 104
i9: 157
i10: 164
i11: 160
i12: 45
i13: 179
i14: 224
i15: 99
m_ServerOnly: 0
m_LocalPlayerAuthority: 0
--- !u!114 &114977662502901678
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
120 changes: 118 additions & 2 deletions Assets/Scene/Test Scenes/Networking Test.unity
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ MonoBehaviour:
m_PlayerPrefab: {fileID: 1395371510902202, guid: 499e753ae5a54d84ab76d12e40cda9e8,
type: 2}
m_AutoCreatePlayer: 1
m_PlayerSpawnMethod: 0
m_PlayerSpawnMethod: 1
m_OfflineScene:
m_OnlineScene:
m_SpawnPrefabs:
- {fileID: 1627837743720578, guid: 43877f32af5efef4b84770a02b17302b, type: 2}
- {fileID: 1166831496739124, guid: 91b3a489d25cb294689da4a02db3e063, type: 2}
m_CustomConfig: 0
m_MaxConnections: 4
m_ConnectionConfig:
Expand Down Expand Up @@ -453,6 +453,36 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 206475221}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &232495125
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 232495126}
m_Layer: 0
m_Name: SpawnPoints
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &232495126
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 232495125}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.8033338, y: 11.864638, z: 8.530304}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 365695197}
- {fileID: 1816605294}
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &284033577
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -615,6 +645,46 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 304202735}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &365695195
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 365695197}
- component: {fileID: 365695196}
m_Layer: 0
m_Name: host
m_TagString: Untagged
m_Icon: {fileID: 5721338939258241955, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &365695196
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 365695195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1050975500, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &365695197
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 365695195}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.0633337, y: -6.8046384, z: -20.430304}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 232495126}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &421965463
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2419,6 +2489,12 @@ Prefab:
propertyPath: m_LocalPlayerAuthority
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114397541545836234, guid: 2add31784925e5e4d9fdf41525eadf67,
type: 2}
propertyPath: s
value:
objectReference: {fileID: 114539929307018324, guid: 499e753ae5a54d84ab76d12e40cda9e8,
type: 2}
m_RemovedComponents:
- {fileID: 114107881548352036, guid: 2add31784925e5e4d9fdf41525eadf67, type: 2}
m_ParentPrefab: {fileID: 100100000, guid: 2add31784925e5e4d9fdf41525eadf67, type: 2}
Expand Down Expand Up @@ -2465,6 +2541,46 @@ Prefab:
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 1f5a5c2f5a2e05644b7560c9e2f70755, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1816605293
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1816605294}
- component: {fileID: 1816605295}
m_Layer: 0
m_Name: OverlordGround
m_TagString: Untagged
m_Icon: {fileID: 5721338939258241955, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1816605294
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1816605293}
m_LocalRotation: {x: -0.1580882, y: -0.64888084, z: 0.14034115, w: -0.73093516}
m_LocalPosition: {x: -34.79156, y: -3.667571, z: -10.377402}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 232495126}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1816605295
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1816605293}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1050975500, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2019267321
GameObject:
m_ObjectHideFlags: 0
Expand Down
6 changes: 4 additions & 2 deletions Assets/Scripts/Controls/OverSeer/OSPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void Update()
{
if (!beaconInUse)
{
CmdSpawnBeacon();
SpawnBeacon();
}

}
Expand All @@ -78,11 +78,13 @@ void Update()
}

// [Command]
void CmdSpawnBeacon()
public spawner s;
void SpawnBeacon()
{

var beacon = Instantiate(beaconPrefab, pointer.position, Quaternion.identity);
beaconInUse = true;
s.CmdSpawn(beacon);
// NetworkServer.Spawn(beacon);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ private void Start()
//deactivate yourself
if (client)
{
gameObject.SetActive(false);
//gameObject.SetActive(false);
transform.GetChild(0).GetComponent<Camera>().enabled = false;
foreach (var comp in DisableOnClientsHost)
{
comp.enabled = false;
}
//GetComponent<TrackRenderer>().enabled = true;
}

//Disable other persons camera...what?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ GameObject:
- component: {fileID: 114251896190925116}
- component: {fileID: 114552154234673556}
- component: {fileID: 114154350679959722}
- component: {fileID: 114539929307018324}
m_Layer: 0
m_Name: GroundController
m_TagString: Untagged
Expand Down Expand Up @@ -328,6 +329,17 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
recordedTransform: {fileID: 4636740846740818}
--- !u!114 &114539929307018324
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1395371510902202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c7960f1218ec574f983feeb881ebd44, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114552154234673556
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
Loading

0 comments on commit 0d40d28

Please sign in to comment.