예제 #1
0
        public void Update(WorldDate date)
        {
            if (date.Date > _lastTickingWarscoreUpdate && _tickingWarscoreQueue.Count > 0)
            {
                UpdateTickingWarscores(date.Date);
                _lastTickingWarscoreUpdate = date.Date;
            }

            if (Warscores.ContainsKey(0))
            {
                Debug.WriteToScreen("Warscore", Warscores[0] + "%");
            }
        }
예제 #2
0
        public void Update(WorldDate date)
        {
            if (date.IsNewDay && date.Date.Day == 1)
            {
                foreach (var pair in _provinces.Ownership)
                {
                    int owner = pair.Value;
                    Stockpiles[owner].Gold += 1;
                }
            }

            Debug.WriteToScreen("Stockpile", Stockpiles[Realms.PlayerID].ToString());
        }
 public WorldDateView(WorldDate worldDate)
 {
     _model = worldDate;
 }
예제 #4
0
        public void Update(WorldDate date)
        {

        }
예제 #5
0
        /// <summary>
        /// Load game data from a file.
        /// </summary>
        private void LoadFile(String path)
        {
            RawGameData gameData;

            using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read))
            using (var stream = new StreamReader(fs))
            {
                gameData = GameFile.Parse(stream);    
            }

            InitializedRawGameData worldData = IntializeRawData.Initialize(gameData, _content);

            _views  = worldData.Views.ToArray();
            _models = worldData.Models.ToArray();

            _worldDate = worldData.WorldDate;;
        }