Skip to content

Commit

Permalink
#5 now working
Browse files Browse the repository at this point in the history
  • Loading branch information
hani-sayegh committed Feb 16, 2017
1 parent b79695e commit 7c0a967
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
34 changes: 17 additions & 17 deletions Assets/Prefabs/Overseer/Lit.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -369,22 +369,22 @@ MonoBehaviour:
m_SceneId:
m_Value: 0
m_AssetId:
i0: 0
i1: 0
i2: 0
i3: 0
i4: 0
i5: 0
i6: 0
i7: 0
i8: 0
i9: 0
i10: 0
i11: 0
i12: 0
i13: 0
i14: 0
i15: 0
i0: 67
i1: 135
i2: 127
i3: 50
i4: 175
i5: 94
i6: 254
i7: 244
i8: 184
i9: 71
i10: 112
i11: 160
i12: 43
i13: 23
i14: 48
i15: 43
m_ServerOnly: 0
m_LocalPlayerAuthority: 0
--- !u!114 &114898585285612640
Expand All @@ -398,4 +398,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e48be4658df94a54491635450e232985, type: 3}
m_Name:
m_EditorClassIdentifier:
maxTimeAlive: 5
maxTimeAlive: 30
5 changes: 3 additions & 2 deletions Assets/Scripts/Controls/OverSeer/OSPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ void Update()
public spawner s;
void SpawnBeacon()
{
s = GameObject.Find("client").GetComponent<spawner>();
//s = GameObject.Find("client").GetComponent<spawner>();
var beacon = Instantiate(beaconPrefab, pointer.position, Quaternion.identity);
beaconInUse = true;
s.CmdSpawn(beacon);
//s.CmdSpawn(beacon);
GameObject.Find("client").GetComponent<spawner>().CmdSpawn(pointer.position);
// NetworkServer.Spawn(beacon);
}
}
Expand Down
2 changes: 2 additions & 0 deletions Assets/hanisstuff/prefab/GroundController.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7c7960f1218ec574f983feeb881ebd44, type: 3}
m_Name:
m_EditorClassIdentifier:
beaconPrefab: {fileID: 1627837743720578, guid: 43877f32af5efef4b84770a02b17302b,
type: 2}
--- !u!114 &114552154234673556
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
11 changes: 8 additions & 3 deletions Assets/spawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

public class spawner : NetworkBehaviour
{

public GameObject beaconPrefab;
[Command]
public void CmdSpawn(GameObject o)
public void CmdSpawn(Vector3 position)
//public void CmdSpawn(ref GameObject )
{
Debug.Log(gameObject.name);
Debug.Log("FWIOEHDFWOEUFHOUWEFHUOEFHEHW");
ClientScene.RegisterPrefab(o);
NetworkServer.Spawn(o);
//ClientScene.RegisterPrefab(o);
var beacon = Instantiate(beaconPrefab, position, Quaternion.identity);
//NetworkServer.Spawn(beacon);
}

}

0 comments on commit 7c0a967

Please sign in to comment.