Added ability to accept commands from scripts on BirdsChatChannel

pull/1/merge
Jak Daniels 2015-01-02 21:17:51 +00:00
parent 4187440a4c
commit 2011c6f094
1 changed files with 6 additions and 3 deletions

View File

@ -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;
}
}