// 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; } }
public void BeginReading () { src = GetComponent<CardboardAudioSource> (); gc = (GameController) FindObjectOfType(typeof(GameController)); lc = (LightController) FindObjectOfType(typeof(LightController)); src.Play (); lc.holy = true; StartCoroutine ("FinishReading"); }
void Awake() { flameParticleSystem = GetComponentInChildren <ParticleSystem> (); source = GetComponent <CardboardAudioSource> (); bezier = Instantiate(bezierPrefab); bezier.name += "(" + gameObject.name + ")"; }
// 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; }
// 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; }
public void BeginReading() { src = GetComponent <CardboardAudioSource> (); gc = (GameController)FindObjectOfType(typeof(GameController)); lc = (LightController)FindObjectOfType(typeof(LightController)); src.Play(); lc.holy = true; StartCoroutine("FinishReading"); }
// 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; }
// Use this for initialization void Start () { CAS = GetComponent<CardboardAudioSource>(); Player = Camera.main.gameObject; CAS.Stop(); CAS.clip = IntroClips[m_curClipIndex]; CAS.Play(); }
void Awake() { gav4 = AnalyticsAssistant.gav4; if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; layerGridTheirs = new LayerInfo("Grid Theirs"); source = GetComponent <CardboardAudioSource> (); }
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; } } }
void Start() { originalRotation = transform.rotation; gc = (GameController)FindObjectOfType(typeof(GameController)); src = GetComponent <CardboardAudioSource> (); }
void Start() { wind = GameObject.FindWithTag("BGM").GetComponent <CardboardAudioSource>(); }
//public bool introFinished = true; // Use this for initialization void Start () { AS = GetComponent<CardboardAudioSource>(); }
void Start() { aSource = gameObject.GetComponent <CardboardAudioSource>(); lastStepTime = DateTime.Now; }
// Use this for initialization void Start() { lidMoveSound = gameObject.GetComponent<CardboardAudioSource> (); }
void Start() { AS = GetComponent<CardboardAudioSource>(); AS.volume = 0; SwapSound(GetRandomMoveSound()); }
// Use this for initialization void Start () { src = GetComponent<CardboardAudioSource> (); player = GameObject.FindWithTag ("Player"); gc = (GameController) FindObjectOfType(typeof(GameController)); gazedAt = false; }
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); }
// Use this for initialization void Start() { source = GetComponent<CardboardAudioSource> (); InvokeRepeating ("setAudioClip", 10f, 10f); }
void Start () { originalRotation = transform.rotation; gc = (GameController) FindObjectOfType(typeof(GameController)); src = GetComponent<CardboardAudioSource> (); }
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>(); }
void Awake() { animator = GetComponent <Animator> (); source = GetComponent <CardboardAudioSource> (); MatchVolume(); }
void Awake() { isPlaying = false; source = GetComponent <CardboardAudioSource>(); }