Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     src     = GetComponent <CardboardAudioSource> ();
     player  = GameObject.FindWithTag("Player");
     gc      = (GameController)FindObjectOfType(typeof(GameController));
     gazedAt = false;
 }
    // Use this for initialization
    void Start()
    {
        waitBeforeOpen = 1.0f;
        thePlayer = GameObject.Find ("CardboardMain/FPSController");
        playerOriginalPosition = thePlayer.transform.position.z;
        portalOriginalPosition = this.transform.localPosition;
        portalSoundSource = this.gameObject.GetComponent<CardboardAudioSource> ();
        portalSoundSource.clip = portalOpen;
        portalSoundSource.loop = false;

        GameObject[] pickableGameObjects = GameObject.FindGameObjectsWithTag ("Pickable");
        pickableGameObjectsReference = new Dictionary<string, GameObject> ();
        foreach (GameObject gameObject in pickableGameObjects) {
            pickableGameObjectsReference.Add(gameObject.name, gameObject);
            if (isExperienceComplete) {
                gameObject.SetActive (true);
            } else {
                gameObject.SetActive (false);
            }
        }

        if (SceneManager.GetActiveScene ().name == "Lab") {
            GameObject[] gameObjectsInHand = GameObject.FindGameObjectsWithTag ("Picked");
            gameObjectsInHandReference = new Dictionary<string, GameObject> ();
            foreach (GameObject gameObject in gameObjectsInHand) {
                gameObjectsInHandReference.Add(gameObject.name, gameObject);
                gameObject.SetActive(false);
            }
        }

        if (isExperienceComplete) {
            autoOpen = false;
        }
    }
Exemplo n.º 3
0
	public void BeginReading () {
		src = GetComponent<CardboardAudioSource> ();
		gc = (GameController) FindObjectOfType(typeof(GameController));
		lc = (LightController) FindObjectOfType(typeof(LightController));
		src.Play ();
		lc.holy = true;
		StartCoroutine ("FinishReading");
	}
Exemplo n.º 4
0
    void Awake()
    {
        flameParticleSystem = GetComponentInChildren <ParticleSystem> ();
        source = GetComponent <CardboardAudioSource> ();

        bezier       = Instantiate(bezierPrefab);
        bezier.name += "(" + gameObject.name + ")";
    }
Exemplo n.º 5
0
	// Use this for initialization
	void Start ()
    {
        CAS = GetComponent<CardboardAudioSource>();

        CAS.Stop();
        CAS.clip = AudioClips[Random.Range(0, AudioClips.Count)];
        CAS.Play();
	}
 // Use this for initialization
 void Start()
 {
     soundSource = gameObject.GetComponent<CardboardAudioSource> ();
     soundSource.volume = 1.0f;
     soundSource.rolloffMode = AudioRolloffMode.Linear;
     soundSource.minDistance = 1.0f;
     soundSource.maxDistance = 20.0f;
 }
Exemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     flags            = new bool[3];
     gc               = (GameController)FindObjectOfType(typeof(GameController));
     audioSource      = GetComponent <CardboardAudioSource> ();
     audioSource.clip = introduction;
     audioSource.Play();
     flags [0] = true;
 }
Exemplo n.º 8
0
 public void BeginReading()
 {
     src = GetComponent <CardboardAudioSource> ();
     gc  = (GameController)FindObjectOfType(typeof(GameController));
     lc  = (LightController)FindObjectOfType(typeof(LightController));
     src.Play();
     lc.holy = true;
     StartCoroutine("FinishReading");
 }
Exemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     flags = new bool[3];
     gc =  (GameController) FindObjectOfType(typeof(GameController));
     audioSource = GetComponent<CardboardAudioSource> ();
     audioSource.clip = introduction;
     audioSource.Play ();
     flags [0] = true;
 }
 // Use this for initialization
 void Start()
 {
     sandSystem = GetComponent<ParticleSystem> ();
     sandFallingAudioSource = GetComponent<CardboardAudioSource> ();
     sandFallingAudioSource.volume = 0.06f;
     sandFallingAudioSource.pitch = 0.5f;
     sandFallingAudioSource.rolloffMode = AudioRolloffMode.Linear;
     sandFallingAudioSource.minDistance = 0;
     sandFallingAudioSource.maxDistance = 3;
 }
Exemplo n.º 11
0
    // Use this for initialization
    void Start ()
    {
        CAS = GetComponent<CardboardAudioSource>();

        Player = Camera.main.gameObject;
        
        CAS.Stop();
        CAS.clip = IntroClips[m_curClipIndex];
        CAS.Play();
	}
Exemplo n.º 12
0
 void Awake()
 {
     gav4 = AnalyticsAssistant.gav4;
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
         return;
     }
     instance        = this;
     layerGridTheirs = new LayerInfo("Grid Theirs");
     source          = GetComponent <CardboardAudioSource> ();
 }
Exemplo n.º 13
0
        void Awake()
        {
            // Setting up the references.
            anim = GetComponent <Animator> ();
            enemyAudio = GetComponent <CardboardAudioSource> ();
            hitParticles = gameObject.transform.FindChild("HitParticles").GetComponent <ParticleSystem> ();
            capsuleCollider = GetComponent <CapsuleCollider> ();

            // Setting the current health when the enemy first spawns.
            currentHealth = startingHealth;
            player = GameObject.FindGameObjectWithTag ("Player").gameObject;
            if (allowEnemyGrowth) {
                int temp = Random.Range (0, 2);
                if (temp == 0) {
                    isGrowing = true;
                    currentHealth = 28;
                } else {
                    isGrowing = false;
                }

            }
        }
Exemplo n.º 14
0
 void Start()
 {
     originalRotation = transform.rotation;
     gc  = (GameController)FindObjectOfType(typeof(GameController));
     src = GetComponent <CardboardAudioSource> ();
 }
Exemplo n.º 15
0
 void Start()
 {
     wind = GameObject.FindWithTag("BGM").GetComponent <CardboardAudioSource>();
 }
Exemplo n.º 16
0
    //public bool introFinished = true;

	// Use this for initialization
	void Start () {
        AS = GetComponent<CardboardAudioSource>();
    }
Exemplo n.º 17
0
 void Start()
 {
     aSource      = gameObject.GetComponent <CardboardAudioSource>();
     lastStepTime = DateTime.Now;
 }
 // Use this for initialization
 void Start()
 {
     lidMoveSound = gameObject.GetComponent<CardboardAudioSource> ();
 }
Exemplo n.º 19
0
 void Start()
 {
     AS = GetComponent<CardboardAudioSource>();
     AS.volume = 0;
     SwapSound(GetRandomMoveSound());
 }
Exemplo n.º 20
0
	// Use this for initialization
	void Start () {
		src = GetComponent<CardboardAudioSource> ();
		player = GameObject.FindWithTag ("Player");
		gc = (GameController) FindObjectOfType(typeof(GameController));
		gazedAt = false;
	}
Exemplo n.º 21
0
 void Start()
 {
     AS = GetComponent<CardboardAudioSource>();
     AS.volume = 0.05f;
 }
 void Awake()
 {
     animator    = GetComponent <Animator> ();
     audioSource = GetComponent <CardboardAudioSource> ();
     gameObject.SetActive(false);
 }
    // Use this for initialization
    void Start()
    {
        playerAudioSource = thePlayer.GetComponent<CardboardAudioSource> ();
        humanGuard = GameObject.Find ("humanbodyinGoldRoom");
        humanGuard.SetActive (false);
        portal.SetActive (false);

        mummyTextureMaterial = new Material (Shader.Find ("Mobile/Diffuse"));
        mummyTextureMaterial.mainTexture = mummyTexture;
        mummyTextureMaterial.mainTextureScale = new Vector2 (5.0f, 5.0f);
        GameObject bodyinHand = GameObject.Find ("humanbodyinHand/Mhx2sample:Body");
        bodyinHand.GetComponent<SkinnedMeshRenderer> ().material = mummyTextureMaterial;
        GameObject bodyinBasket = GameObject.Find ("humanbodyinBasket/Mhx2sample:Body");
        bodyinBasket.GetComponent<SkinnedMeshRenderer> ().material = mummyTextureMaterial;

        objectInHand = null;
        GameObject[] gameObjectsInHand = GameObject.FindGameObjectsWithTag ("Picked");
        gameObjectsInHandReference = new Dictionary<string, GameObject> ();
        foreach (GameObject gameObject in gameObjectsInHand) {
            gameObjectsInHandReference.Add(gameObject.name, gameObject);
            gameObject.SetActive(false);
        }

        GameObject[] pickableGameObjects = GameObject.FindGameObjectsWithTag ("Pickable");
        pickableGameObjectsReference = new Dictionary<string, GameObject> ();
        foreach (GameObject gameObject in pickableGameObjects) {
            pickableGameObjectsReference.Add(gameObject.name, gameObject);
        }

        GameObject[] basketedGameObjects = GameObject.FindGameObjectsWithTag ("Basketed");
        basketedGameObjectsReference = new Dictionary<string, GameObject> ();
        foreach (GameObject gameObject in basketedGameObjects) {
            basketedGameObjectsReference.Add(gameObject.name, gameObject);
            gameObject.SetActive(false);
        }

        saltOnTable = GameObject.Find ("SaltOnTable");
        saltOnTable.SetActive (false);
    }
Exemplo n.º 24
0
 // Use this for initialization
 void Start()
 {
     source = GetComponent<CardboardAudioSource> ();
     InvokeRepeating ("setAudioClip", 10f, 10f);
 }
Exemplo n.º 25
0
	void Start () {
		originalRotation = transform.rotation;
		gc = (GameController) FindObjectOfType(typeof(GameController));
		src = GetComponent<CardboardAudioSource> ();
	}
Exemplo n.º 26
0
        void Awake()
        {
            // Create a layer mask for the Shootable layer.
            shootableMask = LayerMask.GetMask ("Shootable");

            // Set up the references.
            /*gunParticles = GetComponentInChildren<ParticleSystem> ();
            gunLine = GetComponentInChildren<LineRenderer> ();

            gunLight = GetComponentInChildren<Light> (); */

            Fireball = gameObject.transform.FindChild("WandTip").FindChild("Fireball").gameObject;
            Fireball.SetActive (false);
            WandTip = gameObject.transform.FindChild("WandTip").gameObject;
            gunAudio = GetComponent<CardboardAudioSource> ();
            //faceLight = GetComponentInChildren<Light> ();

            anim = GetComponent<Animator> ();

            //gunLine = gameObject.transform.FindChild("WandTip").gameObject.GetComponent<LineRenderer>();
        }
Exemplo n.º 27
0
 void Awake()
 {
     animator = GetComponent <Animator> ();
     source   = GetComponent <CardboardAudioSource> ();
     MatchVolume();
 }
Exemplo n.º 28
0
 void Awake()
 {
     isPlaying = false;
     source    = GetComponent <CardboardAudioSource>();
 }