Beispiel #1
0
 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();
 }
Beispiel #3
0
 // 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;
     }
 }
Beispiel #4
0
 // 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());
 }
Beispiel #5
0
    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);
    }
Beispiel #8
0
    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>();
 }