Пример #1
0
        public void InitGame()
        {
            Map = new Map();
            Map.GenerateMap();

            BoatManager = new BoatManager();
            BoatManager.InitManager(Map.BoatWarehouse);

            CartManager = new CartManager();
            CartManager.InitManager(Map.CartWarehouses.ToArray());

            _createCycle              = true;
            _minimumInterval          = 2;
            _pointsPerLoweredInterval = 25;
        }
Пример #2
0
        public bool TryCycle()
        {
            Map.Dock.FillBoat();
            BoatManager.MoveAllMoveableObjects();
            CartManager.MoveAllMoveableObjects();

            if (_createCycle)
            {
                BoatManager.CreateNewMoveableObjects();
                CartManager.CreateNewMoveableObjects();
            }

            _createCycle = !_createCycle;
            return(!CartManager.CollisionDetected);        // return DoCycle() false when a collision has occured
        }