private void Start() { NM = GameObject.Find("UNETSharingStage").GetComponent <NetworkManager>(); positionManager = GameObject.Find("PositionManager").GetComponent <PositionsManager>(); positionManager.SetRole(isServer); PP = GameObject.Find("NetKeyboard").GetComponent <PairingProcess>(); CryptoManager = GameObject.Find("CryptoManager").GetComponent <PairingCryptoManager>(); instructionsDisplay = GameObject.Find("InstructionsHUD").GetComponent <InstructionsDisplay>(); PP.cnfgShouldUseSecretColors = initialShouldUseSecretColors; SetPairingSecretScheme(PP.cnfgShouldUseSecretColors); if (isLocalPlayer) { setupKeywordRecognizer(); initializeNewPairing(); } if (SharedCollection.Instance == null) { Debug.LogError("This script required a SharedCollection script attached to a gameobject in the scene"); Destroy(this); return; } if (isLocalPlayer) { // If we are the local player then we want to have airtaps // sent to this object so that projeciles can be spawned. InputManager.Instance.AddGlobalListener(gameObject); } else { Debug.Log("remote player"); Color baseColor = Color.yellow; Color otherPlayerColor = new Color(baseColor.r, baseColor.g, baseColor.b, 0.1f); SetOtherPlayerColor(otherPlayerColor); } sharedWorldAnchorTransform = SharedCollection.Instance.gameObject.transform; transform.SetParent(sharedWorldAnchorTransform); }
protected BaseSecretChallenge() { this.CryptoManager = GameObject.Find("CryptoManager").GetComponent <PairingCryptoManager>(); this.positionManager = GameObject.Find("PositionManager").GetComponent <PositionsManager>(); }