예제 #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));
                    }
                        );
            }
        }
예제 #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();
                    }
                        );
            }
        }
예제 #3
0
 public virtual void Update(GameTime gameTime)
 {
     Behaviours.ForEach(b => b.Update(gameTime));
     //WhenUpdatedByUi(  );
 }
예제 #4
0
 public void Update(GameTime gameTime)
 {
     Behaviours.ForEach(b => b.Update(gameTime));
 }