Added ability to accept commands from scripts on BirdsChatChannel
parent
4187440a4c
commit
2011c6f094
|
@ -129,7 +129,8 @@ namespace Flocking
|
|||
|
||||
//register handlers
|
||||
m_scene.EventManager.OnFrame += FlockUpdate;
|
||||
m_scene.EventManager.OnChatFromClient += SimChatSent; //listen for commands sent from the client
|
||||
m_scene.EventManager.OnChatFromClient += SimChatSent; //listen for commands sent from the client
|
||||
m_scene.EventManager.OnChatFromWorld += SimChatSent;
|
||||
|
||||
// init module
|
||||
m_model = new FlockingModel(m_name, m_maxSpeed, m_maxForce, m_neighbourDistance, m_desiredSeparation, m_tolerance, m_borderSize);
|
||||
|
@ -158,7 +159,8 @@ namespace Flocking
|
|||
m_view.Clear();
|
||||
m_ready = false;
|
||||
scene.EventManager.OnFrame -= FlockUpdate;
|
||||
scene.EventManager.OnChatFromClient -= SimChatSent;
|
||||
scene.EventManager.OnChatFromClient -= SimChatSent;
|
||||
scene.EventManager.OnChatFromWorld -= SimChatSent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +170,8 @@ namespace Flocking
|
|||
{
|
||||
m_ready = false;
|
||||
m_scene.EventManager.OnFrame -= FlockUpdate;
|
||||
m_scene.EventManager.OnChatFromClient -= SimChatSent;
|
||||
m_scene.EventManager.OnChatFromClient -= SimChatSent;
|
||||
m_scene.EventManager.OnChatFromWorld -= SimChatSent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue