public void AddEntry(Id obj, int par) { CheckEventBetweenScenes.AddEntry(par); }
public IEnumerator RunEvents() { for (int i = 0; i < m_Events.Count(); i++) { if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Active_No) { gameObject.GetComponent <ActivateDeactivate>().DeActivate(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Active_Yes) { gameObject.GetComponent <ActivateDeactivate>().Activate(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Change_Model) { gameObject.GetComponent <ChangeModel> ().SetStages(m_Events[i].m_ChangeModelMh, m_Events[i].m_ChangeModelTx); gameObject.GetComponent <ChangeModel> ().ModelChange(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Delay) { timer = 0; timer += m_Events[i].m_DelayValue; } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Door_Close) { gameObject.GetComponent <OpenCloseDoor>().CloseDoor(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Door_Open) { gameObject.GetComponent <OpenCloseDoor>().OpenDoor(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Door_Angle) { gameObject.GetComponent <OpenCloseDoor>().AngleDoor(m_Objects[i], m_Events[i].m_OpenDoor, m_Events[i].m_LerpSpeed); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Drawer_Close) { } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Drawer_Open) { } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Kill) { gameObject.GetComponent <KillPlayer>().KillThePlayer(); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Lights_Off) { gameObject.GetComponent <TriggerLights>().LightOff(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Lights_On) { gameObject.GetComponent <TriggerLights>().LightOn(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Lights_Toggle) { gameObject.GetComponent <TriggerLights>().LightSwitch(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Lock) { gameObject.GetComponent <LockUnlock>().Lock(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Particles_Off) { } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Particles_On) { gameObject.GetComponent <OpenCloseDoor>().AddRigidbody(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.PlayMovie) { } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Sound_Effect_Start) { gameObject.GetComponent <OpenCloseDoor>().PlaySoundEffect(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Sound_Effect_Stop) { gameObject.GetComponent <OpenCloseDoor>().StopSoundEffect(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Sound_Effect_Change) { gameObject.GetComponent <OpenCloseDoor>().ChangeSoundEffect(m_Objects[i], m_Events[i].m_DelayValue); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Spawn) { } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.Unlock) { gameObject.GetComponent <LockUnlock>().UnLock(m_Objects[i]); } // <===============================================================================> else if (m_Events[i].m_ChosenEffect == m_DifferentEffects.AddEventBetweenScenes) { CheckEventBetweenScenes.AddEntry(m_Events[i].m_NegativeID); //gameObject.GetComponent<OpenCloseDoor>().AddEntry(m_Objects[i], m_Events[i].m_NegativeID); } // <===============================================================================> if (timer > 0) { yield return(new WaitForSeconds(timer)); } } }