#include "Behaviors/StateMachine.h"
#include "Sound/SoundManager.h"

$nodeclass LGdemo2 : StateNode, LGmixin() {

  $nodeclass DisplayMessage (int choice): LGNode : doStart {
	sndman->speak("Look at my display");
	uploadFile("ms/lg/file2.htm");
	uploadCameraImage("cameraimage2.jpg");
	uploadCameraImage("cameraimage1.jpg");
	//could use case here...
	if(choice==1)
		{	
    		displayHtmlText("<html><body>Hello world!</body></html>");
		cout<<"green"<<endl;
		}
	if(choice==2)
		{
		displayHtmlFile("file1.htm");	
		cout<<"yellow"<<endl;
		}  
}

  $setupmachine{
      sstart: StateNode()
      sstart =B(GreenButOffset)=> DisplayMessage($,1)=N=>sstart
      sstart =B(YellowButOffset)=> DisplayMessage($,2)=N=>sstart
  }

}

REGISTER_BEHAVIOR(LGdemo2);
