HocusPocus.cpp
//void HocusPocus::CallAction(Caller* callerPtr)
//{
//	// Insert the code that needs to be executed when a Caller has to perform an action
//}

void HocusPocus::CallAction(Caller* callerPtr)
{
Insert the code that needs to be executed when a Caller has to perform an action
}
void HocusPocus :: CallAction ( Caller * callerPtr ) { Insert the code that needs to be executed when a Caller has to perform an action }
void HocusPocus::CameraFollow()
{
	DOUBLE2 tempPos = m_HeroPtr->GetPos();
	if (m_GodMode == false)
	{
		m_PosCamera.x =  tempPos.x - GAME_ENGINE->GetWidth()/2-27 + m_HeroPtr->GetWidth()/2;
		if (m_HeroPtr->GetState() == 0)
		{
			m_PosCamera.y =  tempPos.y - GAME_ENGINE->GetHeight()/2+11 + m_HeroPtr->GetHeight()/2;
		}
		if (tempPos.y >= m_PosCamera.y + 160)
		{
			m_PosCamera.y = tempPos.y - 160;
		}
		if (m_PosCamera.x < 0)
		{
			m_PosCamera.x = 0;
		}
		if (m_PosCamera.y > m_BmpLevelPtr->GetHeight() - GAME_ENGINE->GetHeight()+ m_BmpHudPtr->GetHeight())
		{
			m_PosCamera.y = m_BmpLevelPtr->GetHeight() - GAME_ENGINE->GetHeight()+ m_BmpHudPtr->GetHeight();
		}
	}
	else
	{
		m_PosCamera.x =  tempPos.x - GAME_ENGINE->GetWidth()/2-10 + m_HeroPtr->GetWidth()/2;
		m_PosCamera.y =  tempPos.y - GAME_ENGINE->GetHeight()/2+11 + m_HeroPtr->GetHeight()/2;
	}
}
void HocusPocus :: CameraFollow ( ) { DOUBLE2 tempPos = m_HeroPtr -> GetPos ( ) ; if ( m_GodMode == false ) { m_PosCamera . x = tempPos . x - GAME_ENGINE -> GetWidth ( ) / 2 - 27 + m_HeroPtr -> GetWidth ( ) / 2 ; if ( m_HeroPtr -> GetState ( ) == 0 ) { m_PosCamera . y = tempPos . y - GAME_ENGINE -> GetHeight ( ) / 2 + 11 + m_HeroPtr -> GetHeight ( ) / 2 ; } if ( tempPos . y >= m_PosCamera . y + 160 ) { m_PosCamera . y = tempPos . y - 160 ; } if ( m_PosCamera . x < 0 ) { m_PosCamera . x = 0 ; } if ( m_PosCamera . y > m_BmpLevelPtr -> GetHeight ( ) - GAME_ENGINE -> GetHeight ( ) + m_BmpHudPtr -> GetHeight ( ) ) { m_PosCamera . y = m_BmpLevelPtr -> GetHeight ( ) - GAME_ENGINE -> GetHeight ( ) + m_BmpHudPtr -> GetHeight ( ) ; } } else { m_PosCamera . x = tempPos . x - GAME_ENGINE -> GetWidth ( ) / 2 - 10 + m_HeroPtr -> GetWidth ( ) / 2 ; m_PosCamera . y = tempPos . y - GAME_ENGINE -> GetHeight ( ) / 2 + 11 + m_HeroPtr -> GetHeight ( ) / 2 ; } }
void HocusPocus::CallAction(Caller* callerPtr)
{
 Insert the code that needs to be executed when a Caller has to perform an action
}
void HocusPocus :: CallAction ( Caller * callerPtr ) { Insert the code that needs to be executed when a Caller has to perform an action }
//EXCEPTIONS (e.g. OUTSIDE OF GAME LEFT OR DOWN)
 //EXCEPTION LEFT
 //EXCEPTION DOWN
