Ejemplo n.º 1
0
        public World(GameMode gameMode, WorldTickMethod tickMethod)
            : this()
        {
            this.GameMode = gameMode;
            this.TickMethod = tickMethod;

            m_objectMap = new Dictionary<ObjectID, BaseObject>();
            m_livings = new ProcessableList<LivingObject>();
            m_random = new Random(1);	// XXX fixed random for now

            m_objectIDcounterArray = new uint[EnumHelpers.GetEnumMax<ObjectType>() + 1];

            m_state = WorldState.Idle;

            if (this.TickMethod == WorldTickMethod.Sequential)
                m_livingEnumerator = new LivingEnumerator(m_livings.List);

            this.Year = 1;
            this.YearOctant = 1;
            this.Season = (GameSeason)((this.YearOctant + 7) / 2 % 4);
        }
Ejemplo n.º 2
0
        public World(GameMode gameMode, WorldTickMethod tickMethod)
            : this()
        {
            this.GameMode   = gameMode;
            this.TickMethod = tickMethod;

            m_objectMap = new Dictionary <ObjectID, BaseObject>();
            m_livings   = new ProcessableList <LivingObject>();
            m_random    = new Random(1);                // XXX fixed random for now

            m_objectIDcounterArray = new uint[EnumHelpers.GetEnumMax <ObjectType>() + 1];

            m_state = WorldState.Idle;

            if (this.TickMethod == WorldTickMethod.Sequential)
            {
                m_livingEnumerator = new LivingEnumerator(m_livings.List);
            }

            this.Year       = 1;
            this.YearOctant = 1;
            this.Season     = (GameSeason)((this.YearOctant + 7) / 2 % 4);
        }