public void MusicStarted(GameEnums.MusicColor musicColor) { Color cyan = new Vector4(0f, 2f, 1.5f, 1.0f); Color magenta = new Vector4(2f, 0f, 1.6f, 1f); Color yellow = new Vector4(2f, 1.5f, 0f, 1.0f); laserRight.EnableLasers(true); laserLeft.EnableLasers(true); switch (musicColor) { case GameEnums.MusicColor.Magenta: laserMaterial.SetColor("_EmissionColor", magenta); break; case GameEnums.MusicColor.Cyan: laserMaterial.SetColor("_EmissionColor", cyan); break; case GameEnums.MusicColor.Yellow: laserMaterial.SetColor("_EmissionColor", yellow); break; default: break; } }
public void MusicStarted(GameEnums.MusicColor musicColor) { if (LaserManager.laserManagerRef) { LaserManager.laserManagerRef.MusicStarted(musicColor); } }
public void PlayRecord(GameEnums.TurnTable turntable, GameEnums.MusicColor recordType) { Sound musicSample = GetMusicSample(recordType); if (musicSample == null) { return; } PlaySample(turntable, musicSample); }
public void TooSoonChange(GameEnums.MusicColor musicColor) { foreach (GameObject dancer in dancers) { DancerMood dancerMoodComp = dancer.GetComponent <DancerMood>(); if (dancerMoodComp.enabled) { dancerMoodComp.TooSoonChange(musicColor); } } }
public void PerfectChange(GameEnums.MusicColor musicColor) { // Add screen shake here foreach (GameObject dancer in dancers) { DancerMood dancerMoodComp = dancer.GetComponent <DancerMood>(); if (dancerMoodComp.enabled) { dancerMoodComp.MusicChanged(musicColor); } } }
public void TooSoonChange(GameEnums.MusicColor currentColor) { // The too soon doesn't make us lose the OnFire state. bool affectedByMusic = dancerState.stateName == GameEnums.DancerStateNames.MoodActive || dancerState.stateName == GameEnums.DancerStateNames.Dancing; affectedByMusic = affectedByMusic && currentMood != GameEnums.MoodStates.OnFire; if (affectedByMusic) { if (dancerColor == currentColor) { int reaction = reactions[(int)dancerColor, (int)currentColor]; if (reaction < 0) { int numericMood = (int)currentMood + reaction; SetMoodFromInt(numericMood); } } } }
public void MusicChanged(GameEnums.MusicColor receivedColor) { bool affectedByMusic = dancerState.stateName == GameEnums.DancerStateNames.MoodActive || dancerState.stateName == GameEnums.DancerStateNames.Dancing; affectedByMusic = affectedByMusic && currentMood != GameEnums.MoodStates.OnFire; if (affectedByMusic) { int reaction = reactions[(int)dancerColor, (int)receivedColor]; if (reaction != 0) { int numericMood = (int)currentMood + reaction; if (numericMood >= (int)GameEnums.MoodStates.OnFire) { Debug.Log("IncreaseDancersOnFire"); manager.IncreaseDancersOnFire(1); } SetMoodFromInt(numericMood); } } }
private Sound GetMusicSample(GameEnums.MusicColor recordType) { Sound musicSample = null; Sound[] musicSampleList = null; ref int musicSampleIndex = ref musicSamplesAIndex;