Skip to content

Commit

Permalink
#5add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
hani-sayegh committed Feb 16, 2017
1 parent 0d40d28 commit b79695e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Assets/Scripts/Controls/OverSeer/OSPointer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class OSPointer : NetworkBehaviour
public class OSPointer : MonoBehaviour
{
public string horizontalAxis;
public string verticalAxis;
Expand Down Expand Up @@ -81,7 +80,7 @@ void Update()
public spawner s;
void SpawnBeacon()
{

s = GameObject.Find("client").GetComponent<spawner>();
var beacon = Instantiate(beaconPrefab, pointer.position, Quaternion.identity);
beaconInUse = true;
s.CmdSpawn(beacon);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ private void Start()
//4 gameobjects objects total
Debug.Log("dfsfsdfsdf");
GameObject.Find("OverseerController").SetActive(false);
gameObject.name = "host";
}

//QUESTION: Why we have to do this twice????
Expand All @@ -108,6 +109,7 @@ private void Start()
//to the host, but the client connected
//to the host is still active.
gameObject.SetActive(false);
gameObject.name = "hostsClient";
}
//If you are the client and you are the localplayer
//deactivate yourself
Expand All @@ -119,6 +121,7 @@ private void Start()
{
comp.enabled = false;
}
gameObject.name = "client";
//GetComponent<TrackRenderer>().enabled = true;
}

Expand All @@ -129,6 +132,7 @@ private void Start()
{
comp.enabled = false;
}
gameObject.name = "clientsHost";
}
}

Expand Down
1 change: 1 addition & 0 deletions Assets/spawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public void CmdSpawn(GameObject o)
{
Debug.Log(gameObject.name);
Debug.Log("FWIOEHDFWOEUFHOUWEFHUOEFHEHW");
ClientScene.RegisterPrefab(o);
NetworkServer.Spawn(o);
}
}

0 comments on commit b79695e

Please sign in to comment.