Example #1
0
        public void AddBot(int botHandler, IMyBot newBot)
        {
            Debug.Assert(!m_allBots.ContainsKey(botHandler), "Bot with the given handler already exists!");
            if (m_allBots.ContainsKey(botHandler)) return;

            ActionCollection botActions = new ActionCollection();
            newBot.GetAvailableActions(botActions);

            m_botActions.Add(botHandler, botActions);
            m_allBots.Add(botHandler, newBot);
        }
Example #2
0
        public void AddBot(int botHandler, IMyBot newBot)
        {
            Debug.Assert(!m_allBots.ContainsKey(botHandler), "Bot with the given handler already exists!");
            if (m_allBots.ContainsKey(botHandler))
            {
                return;
            }

            ActionCollection botActions = new ActionCollection();

            newBot.GetAvailableActions(botActions);

            m_botActions.Add(botHandler, botActions);
            m_allBots.Add(botHandler, newBot);
        }
Example #3
0
 public void GetAvailableActions(ActionCollection actions)
 {
     // TODO: Do this using reflection
     actions.AddAction("Test", Action_Test);
 }
Example #4
0
 public void GetAvailableActions(ActionCollection actions)
 {
     // TODO: Do this using reflection
     actions.AddAction("Test", Action_Test);
 }