Skip to content

Commit

Permalink
#5 stash
Browse files Browse the repository at this point in the history
  • Loading branch information
hani-sayegh committed Feb 25, 2017
1 parent 37078c8 commit e88cce9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion Assets/Scripts/Controls/OverSeer/OverseerControls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ void Update()
if (Input.GetButtonDown(actionButtonA))
{
triggerList(controllablesA);

#if NETWORKING
NetMessenger.Instance.CmdOpenDoor("Green");
#endif
Expand Down
15 changes: 7 additions & 8 deletions Assets/Scripts/Networking/NetMessenger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ public class NetMessenger : NetworkBehaviour
{
public static NetMessenger Instance;
public GameObject GreenDoor;
//public GameObject BlueDoor;
public GameObject BlueDoor;


private void Start()
{
Instance = this;
//GreenDoor = GameObject.FindGameObjectWithTag("Door Green");
//GreenDoor = GameObject.Find("DoorGreen");
GreenDoor = GameObject.Find("DoorGreen");
Debug.Log(GreenDoor);
Debug.Log("FREEEEEEEferferf");
if (GreenDoor == null)
Debug.Break();
//BlueDoor = GameObject.FindGameObjectWithTag("Door Blue");
BlueDoor = GameObject.Find("DoorBlue");
}

public GameObject beaconPrefab;
Expand All @@ -36,11 +36,10 @@ public void CmdSpawn(Vector3 position)
[Command]
public void CmdOpenDoor(string color)
{
var io = GreenDoor.transform;
if (color == "Green")
GreenDoor.GetComponent<Animator>();
//GreenDoor.GetComponent<Animator>().SetTrigger("toggleObject");
//else if (color == "Blue")
// BlueDoor.GetComponent<Animator>().SetTrigger("toggleObject");
GreenDoor.GetComponent<Animator>().SetTrigger("toggleObject");
//GreenDoor.GetComponent<Animator>();
else if (color == "Blue")
BlueDoor.GetComponent<Animator>().SetTrigger("toggleObject");
}
}

0 comments on commit e88cce9

Please sign in to comment.