local myData = Entity:Data()
myData.done = false

local function WithPlayer( theKey, theValue )
  if( not myData.done ) then
    if( string.find( theValue:GetName(), "Aster" ) ~= nil ) 
    then
      local pos = theValue:SHR_gPosition()
      Global:CreateEntityAt( "../../Assets/Xml/entities/e_ParticleFlash.xml", pos.x, pos.y, pos.z, 0, 0, 0 )
      Global:CreateEntity( "../../Assets/Xml/entities/game_FirstPlayableWin.xml" )
      myData.done = true
      
    end
    
  end

end

while( 1 ) 
do
  coroutine.yield()
  
  Entity:PHY_Refresh( myData, true )
  table.foreach( myData.collisions, WithPlayer )
  
  if( myData.done ) then
    Global:DeleteEntityByPtr( Entity:GetMyPointer() )
    
  end

end