Ejemplo n.º 1
0
        //We do our actions here.  This is where one would
        //add additional steps and/or things the bot should do
        private void Action()
        {
            while (true)
            {
                lock (Behaviours)
                    Behaviours.ForEach(
                        b =>
                    {
                        // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType());
                        b.Action();

                        Thread.Sleep(Random.Next(1000, 10000));
                    }
                        );
            }
        }
Ejemplo n.º 2
0
        //We do our actions here.  This is where one would
        //add additional steps and/or things the bot should do
        private void Action()
        {
            while (ConnectionState != ConnectionState.Disconnecting)
            {
                lock (Behaviours)
                    Behaviours.ForEach(
                        b =>
                    {
                        Thread.Sleep(Random.Next(3000, 10000));

                        // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType());
                        b.Action();
                    }
                        );
            }
        }
Ejemplo n.º 3
0
 public virtual void Update(GameTime gameTime)
 {
     Behaviours.ForEach(b => b.Update(gameTime));
     //WhenUpdatedByUi(  );
 }
Ejemplo n.º 4
0
 public void Update(GameTime gameTime)
 {
     Behaviours.ForEach(b => b.Update(gameTime));
 }