Пример #1
0
        public void PostConstruct()
        {
            GridSize = new Vector2(20, 20);
            UnitGridSize = 160.0f ;
            GameDataPath = "Data/Game/";

            m_TickRates = new Dictionary<IResource,float>();

            IResource wood = new WoodResource();
            IResource food = new FoodResource();
            IResource gold = new GoldResource();
            IResource stone = new StoneResource();

            m_TickRates.Add(wood,3);
            m_TickRates.Add(food, 5);
            m_TickRates.Add(gold, 15);
            m_TickRates.Add(stone, 30);
        }
Пример #2
0
        public GameModel()
        {
            Wood = new WoodResource();
            Wood.Value = 0;

            Food = new FoodResource();
            Food.Value = 0;

            Stone = new StoneResource();
            Stone.Value = 0;

            Gold = new GoldResource();
            Gold.Value = 0;

            m_ResourceList = new List<IResource>();

            m_ResourceList.Add(Wood);
            m_ResourceList.Add(Food);
            m_ResourceList.Add(Gold);
            m_ResourceList.Add(Stone);
        }