TutorialBehaviour.cpp

#include "TutorialBehaviour.h"

REGISTER_BEHAVIOUR(TutorialBehaviour);
//...
//----------------------------------------
// TutorialBehaviour
//----------------------------------------
TutorialBehaviour::TutorialBehaviour(MObject3d * parentObject)
:Behaviour(parentObject, GetStaticID())
,m_IsBouncing(false)
,m_IsSliding(false)
{
	Setup(1.0f, 0, 10.0f);
}
//----------------------------------------
TutorialBehaviour::TutorialBehaviour(TutorialBehaviour & behavior, 
							MObject3d * parentObject)
:Behaviour(parentObject, GetStaticID())
,m_IsBouncing(false)
,m_IsSliding(false)
{
	Setup(behavior.m_StepX, behavior.m_CurrDeltaX, behavior.m_RangeX);
}
//...
//----------------------------------------
void TutorialBehaviour::update()
{
	// just a check to see if the behaviour manager is working right
	if(GetBehaviour<TutorialBehaviour>() != this)
		return;
//...
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Diary of a Slacker