Issue with the PlayerAgent class

Mar 21, 2012 at 1:11 PM

Hi,


I have tried to use the "Agent" system according to the "video tutorial 6".
- I use the LocalSessionManager
- My player is identified
- I have started the session
- I have created a "Player" class, child of "PlayerAgent" class
- I have created a "PlayerInputBehavior", child of "Behavior" class with a "ReadPlayerInput" method and i have added this behavior to the "Player" class
- I have called the method CreatePlayerAgent with : var player = SessionManager.CurrentSession.CreatePlayerAgent<Player>(SessionManager.CurrentSession.LocalPlayers[0]);
- I have added the Player class in my scene object components
But nothing happens. My method "ReadPlayerInput" in the "PlayerInputBehavior" class is never called.
Also, the "Process" methods in "PlayerAgent" class and "Behavior" class are never called.

I have forgot something ?

Thank you

Coordinator
Mar 21, 2012 at 2:22 PM

Did you start the session? :)

Mar 21, 2012 at 2:28 PM

Yes. The session is started.

If the session is not started i have an exception when a call the method "CreatePlayerAgent".

How the Process methods are called ?

Coordinator
Mar 21, 2012 at 4:06 PM

The Process methods are called by the Session in its IUpdate.Update() method.

Could you paste the code how you setup the PlayerAgent and where you do it?

Thanks