void Start() { numberIndicator.text = string.Format("0/{0}", expectedNumber); switchColor = switchNotTriggeredColor; wireColor = wireNotTriggeredColor; audioCache = GetComponent <AudioMutator>(); door.AddSwitch(this); }
void PlayClip(AudioClip clip) { if (audioPlayer == null) { audioPlayer = GetComponent <AudioMutator>(); } audioPlayer.Audio.clip = clip; audioPlayer.Play(); }
// Use this for initialization void Start() { audioMutator = GetComponent <AudioMutator>(); if ((expectedNumber > 0) && (labels != null)) { for (int index = 0; index < labels.Length; ++index) { labels[index].text = expectedNumber.ToString(); } originalMass = GetComponent <Rigidbody>().mass; GetComponent <Rigidbody>().mass = Immovable; } }
// Use this for initialization public override void Start() { if (particlesCache == null) { particlesCache = GetComponentsInChildren <ParticleSystem>(); } if (soundCache == null) { soundCache = GetComponent <AudioMutator>(); } soundCache.Play(); foreach (ParticleSystem system in particlesCache) { system.Play(); } StartCoroutine(Die()); }
public override void Start() { base.Start(); state = State.Aiming; lastShot = 0f; shootEvery = Random.RandomRange(shootEveryMin, shootEveryMax); if (allParticles == null) { allParticles = GetComponentsInChildren <ParticleSystem>(); } if (audio == null) { audio = GetComponent <AudioMutator>(); } }
public override void Start() { base.Start(); beam.IsShooting = false; lastShot = 0f; shootEvery = Random.RandomRange(shootEveryMin, shootEveryMax); fireDuration = Random.RandomRange(fireMin, fireMax); if (audio == null) { audio = GetComponent <AudioMutator>(); } if (body == null) { body = GetComponent <Rigidbody>(); } }
// Use this for initialization void Start() { // Grab other components slotLabel = GetComponent <TextMesh>(); interactableIndicator = GetComponent <Animator>(); audioMutator = GetComponent <AudioMutator>(); // Grab the label color fontColor = slotLabel.color; // Update the door if (optionalDoor != null) { optionalDoor.AddItemSlot(this); } // Update the item UpdateSlot(false); }
void Start() { // Grab components audioCache = GetComponent <AudioMutator>(); animatorCache = GetComponent <Animator>(); // Setup switch numberIndicator.text = OffText; animatorCache.SetBool(activeField, false); if (door != null) { door.AddSwitch(this); } // Set the trigger flag if (startTriggered == true) { TriggerSwitch(); } }
void Start() { mutator = GetComponent <AudioMutator>(); goalOrientation = RotateEverything.ConvertToAngle(transform.rotation); }
void Start() { numberIndicator.text = string.Format("0/{0}", expectedNumber); mutator = GetComponent <AudioMutator>(); }