diff --git a/Assets/MenuSelection.cs b/Assets/MenuSelection.cs
index 1e078d0..6da539f 100644
--- a/Assets/MenuSelection.cs
+++ b/Assets/MenuSelection.cs
@@ -36,6 +36,8 @@ void Start()
//need to make this look nicer
//192.168.0.32
NetworkManager.singleton.networkAddress = "localhost";//HARD CODE IP ADDRESS HERE
+ //Below is for UBISOFT
+ //NetworkManager.singleton.networkAddress = "192.168.0.230";//HARD CODE IP ADDRESS HERE
NetworkManager.singleton.StartClient();
}
#endif
diff --git a/Assets/Scripts/Networking/NetworkingCharacterAttachment.cs b/Assets/Scripts/Networking/NetworkingCharacterAttachment.cs
index 009c14e..ab7aa55 100644
--- a/Assets/Scripts/Networking/NetworkingCharacterAttachment.cs
+++ b/Assets/Scripts/Networking/NetworkingCharacterAttachment.cs
@@ -27,17 +27,29 @@ public enum ButtonEventType { GetButtonDown, GetButtonUp, GetButton }
public bool hostsClient;
public bool client;
public bool host;
+
+ //Add the main level names to this array (level 1, level 2, etc.)
private string[] sceneLevelNames = { "Level1Net" };
///
/// When inheriting from this class, override the start method and add this base
/// at the end of the child Start overriding method
///
+ bool goodLevel = false;
protected virtual void Start()
{
- if (SceneManager.GetActiveScene().name != sceneLevelNames[0])
+ foreach (string levelName in sceneLevelNames)
+ {
+ if (SceneManager.GetActiveScene().name == levelName)
+ goodLevel = true;
+
+ }
+ if (!goodLevel)
+ {
gameObject.SetActive(false);
+ goodLevel = false;
+ }
server = NetworkCustom.isServer;
@@ -51,10 +63,20 @@ protected virtual void Start()
gameObject.SetActive(false);
gameObject.name = "hostsClient";
}
+
+ //host is the DOG
if (host)
{
BothHostAndClientsHost();
+ //Below is for the tutorials
+ var groundTutCan = GameObject.FindGameObjectsWithTag("Tutorial Canvas Ground Player");
+ ChangeToDisplay1(groundTutCan);
+
+ var overseerTutCan = GameObject.FindGameObjectsWithTag("Tutorial Canvas Overseer");
+ Deactivate(overseerTutCan);
+ //ends here
+
GameObject overseer = GameObject.FindGameObjectWithTag("Overseer");
//Might be a good idea to use a different tag for this
@@ -92,6 +114,14 @@ protected virtual void Start()
//object tagged which in this case is clientsHost
BothHostAndClientsHost();
+ //Below is for the tutorials
+ var overseerTutCan = GameObject.FindGameObjectsWithTag("Tutorial Canvas Overseer");
+ ChangeToDisplay1(overseerTutCan);
+
+ var groundTutCan = GameObject.FindGameObjectsWithTag("Tutorial Canvas Ground Player");
+ Deactivate(groundTutCan);
+ //ends here
+
TimeManager.disableCameraForOverseer = true;
var lucky = GameObject.FindGameObjectWithTag("Camera Ground Character");
lucky.GetComponent().enabled = false;
@@ -99,6 +129,23 @@ protected virtual void Start()
}
}
+ void ChangeToDisplay1(GameObject[] changeMe)
+ {
+ foreach (var can in changeMe)
+ {
+ //0 MEANS DISPLAY 1
+ can.GetComponent