コード例 #1
0
ファイル: LineLazer.cs プロジェクト: hakuliu/RhythmGladiator
 // Use this for initialization
 protected override void Start()
 {
     base.Start();
     liner = GetComponent <LineRenderer> ();
     BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track));
     soundpicker = new SoundRandomizer(audioSource, shootingSounds);
 }
コード例 #2
0
ファイル: LineLazer.cs プロジェクト: hakuliu/RhythmGladiator
 // Use this for initialization
 protected override void Start()
 {
     base.Start ();
     liner = GetComponent<LineRenderer> ();
     BeatScheduler.ScheduleNextMeasure (new StartTrackEvent (track));
     soundpicker = new SoundRandomizer (audioSource, shootingSounds);
 }
コード例 #3
0
 void Start()
 {
     try {
         soundthing = gameObject.GetComponent <SoundRandomizer>();
         soundthing.ToString();
     } catch {
         Debug.LogWarning("This thing does not have a SoundRandomizer, so there won't be any sound.");
     }
 }
コード例 #4
0
ファイル: PlayerSound.cs プロジェクト: yenamars/SperFPS
    void Awake()
    {
        leftStepSoundRandomizer     = leftStepSound.GetComponent <SoundRandomizer>();
        rightStepSoundRandomizer    = rightStepSound.GetComponent <SoundRandomizer>();
        jumpSoundRandomizer         = jumpSound.GetComponent <SoundRandomizer>();
        landSoundRandomizer         = landSound.GetComponent <SoundRandomizer>();
        hitSoundRandomizer          = hitSound.GetComponent <SoundRandomizer>();
        collectableSoundRandomizers = new SoundRandomizer[collectableSounds.Length];
        for (int i = 0; i < collectableSounds.Length; i++)
        {
            collectableSoundRandomizers[i] = collectableSounds[i].GetComponent <SoundRandomizer>();
        }

        //stepFrequency *= Mathf.PI;
    }
コード例 #5
0
ファイル: Eat.cs プロジェクト: nilq/ThrowAndEat
    // Use this for initialization
    void Start()
    {
        counterComponent = GameObject.FindGameObjectWithTag("CookieCounter").GetComponent <Text>();

        ammoComponent = GameObject.FindGameObjectWithTag("Ammo").GetComponent <Ammo>();
        layerMask     = ~(1 << 9);      //All layers except nr. 9, the player; hopefully

        try{
            soundthing = gameObject.GetComponent <SoundRandomizer>();
        }catch {
            Debug.LogWarning("This thing does not have a SoundRandomizer, so there won't be any sound.");
        }

        counterComponent.text = "People Eaten: " + cookieCounter;

        StartCoroutine("regenerateFlintlocks");
    }