void ExternatTriggerScriptElement::update(float delta, Scene * scene, Object * object)
{
  ScriptElement::updateInternal(delta,scene,object);
  if(m_trigger == TRIGGER_ALWAYS)
  {
    m_ended = true;
    if(external_callback != nullptr)
      external_callback();
  }
  if(  (m_trigger == TRIGGER_ON_OFF) || (m_trigger == TRIGGER_FROM_TO) )
  {
    if(m_execute)
    {
      m_ended = true;
      if(external_callback != nullptr)
        external_callback();
    }
  }
}
/**
   Callback function used whenever a new fishd message is recieved
*/
static void callback( int type, const wchar_t *name, const wchar_t *val )
{	
	if( type == BARRIER_REPLY )
	{
		barrier_reply = 1;
	}
	else
	{
		if( external_callback )
			external_callback( type, name, val );		
	}	
}