Inheritance: MonoBehaviour
Exemplo n.º 1
0
	void Awake() {
		audioSource = GetComponent<AudioSource> ();
		shootingSounds = Resources.LoadAll<AudioClip>("Audio/Projectiles/Short");
		player = FindObjectOfType<CharacterMusicSystem> ();
		shotQueue = new Queue<Transform> ();
		beat = FindObjectOfType<BeatMatcher> ();
	}
Exemplo n.º 2
0
	void Awake(){
		cameraSettings = FindObjectOfType<Camera2DFollow> ();
		marker1 = Resources.Load<GameObject> ("Markers/Marker1");
		marker2 = Resources.Load<GameObject> ("Markers/Marker2");
		obstacle = Resources.Load<GameObject> ("Markers/Obstacle");
		boom = Resources.Load<AudioClip> ("Audio/Final/Boom");
		preDrop = Resources.Load<AudioClip> ("Audio/Final/Pre-drop");
		audioSource = GetComponentInParent<AudioSource> ();
		player = GameObject.FindWithTag("Player");
		mixer = audioSource.outputAudioMixerGroup.audioMixer;
		beat = FindObjectOfType<BeatMatcher> ();
	}
	private void Awake() {
		mixer = bass.outputAudioMixerGroup.audioMixer;
		beat = FindObjectOfType<BeatMatcher> ();
		melodies = Resources.LoadAll<AudioClip>("Audio/Final/Teleports");
		notes1 = Resources.LoadAll<AudioClip>("Audio/Final/Layer 1");
		notes2 = Resources.LoadAll<AudioClip>("Audio/Final/Layer 2");
		notes3 = Resources.LoadAll<AudioClip>("Audio/Final/Layer 3");
		notes = new List<AudioClip[]> ();
		notes.Add (notes1);
		notes.Add (notes2);
		notes.Add (notes3);
		rayMask |= 1 << LayerMask.NameToLayer ("Platform");
		teleports = new Dictionary<Note, AudioClip[]> ();
		teleports.Add(Note.i, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/i"));
		teleports.Add(Note.III, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/III"));
		teleports.Add(Note.iv, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/iv"));
		teleports.Add(Note.v, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/v"));
		teleports.Add(Note.VI, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/VI"));
		teleports.Add(Note.VII, Resources.LoadAll<AudioClip>("Audio/Final/Teleports/VII"));
		pulses = new Dictionary<Note, AudioClip[]> ();
		pulses.Add (Note.i, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/C"));
		pulses.Add (Note.III, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/Eb"));
		pulses.Add (Note.iv, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/F"));
		pulses.Add (Note.v, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/G"));
		pulses.Add (Note.VI, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/Ab"));
		pulses.Add (Note.VII, Resources.LoadAll<AudioClip>("Audio/Final/Pulse/Bb"));
		dashes = Resources.LoadAll<AudioClip>("Audio/Final/Dashes");
		bubbleCatch = Resources.Load<AudioClip> ("Audio/Final/Bubble_catch");
		bubbleRelease = Resources.Load<AudioClip>("Audio/Final/Bubble_release");
		crash = Resources.Load<AudioClip> ("Audio/Final/Layer 2 crash");
		noteToMelody = new Dictionary<Note, AudioClip[]> ();
		noteToMelody.Add (Note.i, buildMelodyClipArray (melodies, 2, 3, 6, 7, 9));
		noteToMelody.Add (Note.III, buildMelodyClipArray (melodies, 6, 7, 9, 1));
		noteToMelody.Add (Note.iv, buildMelodyClipArray (melodies, 8,0,2,3));
		noteToMelody.Add (Note.v, buildMelodyClipArray (melodies, 9,1,4,5));
		noteToMelody.Add (Note.VI, buildMelodyClipArray (melodies, 0,2,3,6,7));
		noteToMelody.Add (Note.VII, buildMelodyClipArray (melodies, 1,4,5,8));
		noteToDashMelody = new Dictionary<Note, AudioClip[]> ();
		noteToDashMelody.Add (Note.i, buildMelodyClipArray (dashes, 2, 3, 6, 7, 9));
		noteToDashMelody.Add (Note.III, buildMelodyClipArray (dashes, 6, 7, 9, 1));
		noteToDashMelody.Add (Note.iv, buildMelodyClipArray (dashes,8,0,2,3));
		noteToDashMelody.Add (Note.v, buildMelodyClipArray (dashes,9,1,4,5));
		noteToDashMelody.Add (Note.VI, buildMelodyClipArray (dashes,0,2,3,6,7));
		noteToDashMelody.Add (Note.VII, buildMelodyClipArray (dashes,1,4,5,8));
	}
		private void Awake()
        {
			beat = FindObjectOfType<BeatMatcher> ();
            m_GroundCheck = transform.Find("GroundCheck");
            m_CeilingCheck = transform.Find("CeilingCheck");
            m_Anim = GetComponent<Animator>();
            m_Rigidbody2D = GetComponent<Rigidbody2D>();
			rayMask |= 1 << LayerMask.NameToLayer ("Destructible");
			rayMask |= 1 << LayerMask.NameToLayer ("Unpassable");
			platformMask |= 1 << LayerMask.NameToLayer ("Platform");
			beat = FindObjectOfType<BeatMatcher> ();
			inputBuffer = new Queue<Direction> ();
			musicSystem = GetComponent<CharacterMusicSystem> ();
			scoreCounter = FindObjectOfType<ScoreCounter> ();
			teleportParticle = Resources.Load<GameObject> ("ParticleEffects/TeleportParticle");
			dashParticle = Resources.Load<GameObject>("ParticleEffects/DashParticle");
			ringParticle = Resources.Load<GameObject> ("ParticleEffects/RingParticle");
		}
Exemplo n.º 5
0
	void Awake() {
		source = GetComponent<AudioSource> ();
		beat = FindObjectOfType<BeatMatcher>();
		clips = Resources.LoadAll<AudioClip>("Audio/Melodies");
	}
Exemplo n.º 6
0
	void Awake() {
		snare = GetComponent<AudioSource> ();
		beat = FindObjectOfType<BeatMatcher> ();
	}
Exemplo n.º 7
0
	void Awake(){
		beat = FindObjectOfType<BeatMatcher> ();
		rend = gameObject.GetComponent<Renderer> ();
		player = GameObject.FindGameObjectWithTag("Player");
	}
Exemplo n.º 8
0
	private Vector2 lp ;  // last finger position
	
	private void Awake()
	{
		m_Character = GetComponent<PlatformerCharacter2D>();
		matcher = FindObjectOfType<BeatMatcher> ();
	}
	void Awake(){
		rend = gameObject.GetComponent<Renderer> ();
		beat = FindObjectOfType<BeatMatcher> ();
	}