class ObstacleCollisionLogic extends MinigameCollisionLogic
{
	private var hasTriggered : Bool;
	private editable var invincibityBonusTime : Float;
	default invincibityBonusTime = 0.8;

	protected event OnInitialize()
	{
		hasTriggered = false;
	}

	protected event OnHitPlayer( hitEvent : HitPlayerEvent )
	{
		var gameState : RoachRaceGameState;
		gameState = ( ( RoachRaceGameState )( hitEvent.gameState ) );
		if( hitEvent && !( hasTriggered ) )
		{
			gameState.currentLives -= 1;
			gameState.invincibleTime += invincibityBonusTime;
			hasTriggered = true;
			UpdateGameState( gameState );
		}
	}

	protected event OnRecycle()
	{
		hasTriggered = false;
	}

}

