datablock TriggerData(teleportBase2China_Datablock)
{
   
   tickPeriodMS = 100;
};

function teleportBase2China_Datablock::onEnterTrigger(%this,%trigger,%obj)
{



if ( isTriggerReady( %trigger, %obj )) 
   {
      
            // First check if we can exit this
      if(IPhone_GotAllPictures(IPhone))
      {
         schedule( 0, 0, loadSCDMission, 1); 
      }
      else
      {
         // push popup
         SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/notenoughpoints.png" );
         SCDPopupText.setVisible( true );
         SCDPopupText.schedule( 5000, setVisible, false ); 
         
         %obj.schedule(5000, unlockPlayerToDirection);
         %obj.LockPlayerToDirection(%trigger.rotation); 

         levelTriggers.schedule(5000, remove,  %trigger );
         
      }
   
      
   }
}



datablock TriggerData(teleportChina2USLab_Datablock)
{
   
   tickPeriodMS = 100;
};

function teleportChina2USLab_Datablock::onEnterTrigger(%this,%trigger,%obj)
{

if ( isTriggerReady( %trigger, %obj )) 
   {
      
            // First check if we can exit this
      if(IPhone_GotAllPictures(IPhone))
      {
         schedule( 0, 0, loadSCDMission, 2); 
      }
      else
      {
         // push popup
         SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/notenoughpoints.png" );
         SCDPopupText.setVisible( true );
         SCDPopupText.schedule( 5000, setVisible, false ); 
         
         %obj.schedule(5000, unlockPlayerToDirection);
         %obj.LockPlayerToDirection(%trigger.rotation); 

         levelTriggers.schedule(5000, remove,  %trigger );
         
      }      
      
   }
}


datablock TriggerData(teleportUSLab2NewsHeadline_Datablock)
{
   
   tickPeriodMS = 100;
};

function teleportUSLab2NewsHeadline_Datablock::onEnterTrigger(%this,%trigger,%obj)
{
if ( isTriggerReady( %trigger, %obj )) 
   {
      
            // First check if we can exit this
      if(IPhone_GotAllPictures(IPhone))
      {
         alxStopAll();
         Canvas.setContent( exampleFullScreenGui );
      }
      else
      {
         // push popup
         SCDPopupText.setBitmap( "StitchCutDye/data/popupTextGraphics/notenoughpoints.png" );
         SCDPopupText.setVisible( true );
         SCDPopupText.schedule( 5000, setVisible, false ); 
         
         %obj.schedule(5000, unlockPlayerToDirection);
         %obj.LockPlayerToDirection(%trigger.rotation); 

         levelTriggers.schedule(5000, remove,  %trigger );
         
      }      
      
   }


}


