private void AwardPowerups(bool explorersWon)
        {
            if (!photonView.isMine)
            {
                return;
            }
            GeneratedGameManager behavior = FindObjectOfType <GeneratedGameManager>();

            if (behavior != null)
            {
                behavior.photonView.RPC("AddPowerupToCharacter", PhotonTargets.All, explorersWon);
            }
            else
            {
                DemoSceneManager demoBehavior = FindObjectOfType <DemoSceneManager>();
                if (demoBehavior != null)
                {
                    demoBehavior.photonView.RPC("AddPowerupToCharacter", PhotonTargets.All, explorersWon);
                }
            }
        }
Beispiel #2
0
        public void NotifyTaken(bool nightmaresWon)
        {
            timeTaken = Time.time;
            if (!photonView.isMine)
            {
                return;
            }
            GeneratedGameManager behavior = FindObjectOfType <GeneratedGameManager>();

            if (behavior != null)
            {
                behavior.photonView.RPC("AddUpgradeToCharacter", PhotonTargets.All, nightmaresWon);
            }
            else
            {
                DemoSceneManager demoBehavior = FindObjectOfType <DemoSceneManager>();
                if (demoBehavior != null)
                {
                    demoBehavior.photonView.RPC("AddUpgradeToCharacter", PhotonTargets.All, nightmaresWon);
                }
            }
            photonView.RPC("PlaySound", PhotonTargets.All, nightmaresWon);
        }
 private void Awake()
 {
     managerBehavior = GetComponent <GeneratedGameManager>();
     demoBehavior    = GetComponent <DemoSceneManager>();
     ResetActionSet();
 }