Example #1
0
        public static void Main(string[] args)
        {
            Debugger.Instance().Disable();
            basicTimer          = new Timer();
            basicTimer.Interval = 100;
            basicTimer.Elapsed += new ElapsedEventHandler(basicTimer_Elapsed);
            basicTimer.Start();

            currentUpdates = 0;

            rand = new Random();

            minerBob = new Miner(1, "Miner Bob", rand);
            EntityManager.Instance().RegisterEntity(minerBob);

            wifeLea = new Wife(2, "Wife Lea", rand, minerBob);
            EntityManager.Instance().RegisterEntity(wifeLea);

            macWorker = new MacWorker(3, "McDonalds Worker", minerBob);
            EntityManager.Instance().RegisterEntity(macWorker);

            minerBob.MarryOn(wifeLea);
            minerBob.SetMacWorker(macWorker);

            do
            {
                Console.ReadKey(true);
                currentUpdates = 0;
                basicTimer.Start();
            } while (true);
        }
Example #2
0
 public void SetMacWorker(MacWorker pMacWorker)
 {
     m_MacWorker = pMacWorker;
 }