Exemplo n.º 1
0
        public Village(AssetManager assets)
        {
            if (assets == null)
            {
                throw new ArgumentNullException(nameof(assets));
            }

            _assets         = assets;
            _villageObjects = new VillageObjectCollection();
            LastTickTime    = DateTime.UtcNow;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Village"/> class from the specified <see cref="Logic.Level"/>.
        /// </summary>
        /// <param name="level"><see cref="Logic.Level"/> to use.</param>
        public Village(Level level)
        {
            if (level == null)
            {
                throw new ArgumentNullException(nameof(level));
            }

            Level    = level;
            _assets  = level.Assets;
            _workers = new WorkerManager();

            _villageObjects = new VillageObjectCollection();
            LastTickTime    = DateTime.UtcNow;
        }