コード例 #1
0
        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);
                }
            }
        }
コード例 #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);
        }
コード例 #3
0
 private void Awake()
 {
     managerBehavior = GetComponent <GeneratedGameManager>();
     demoBehavior    = GetComponent <DemoSceneManager>();
     ResetActionSet();
 }