Beispiel #1
0
 /// <summary>
 /// Clears The entire influence map and game objects
 /// </summary>
 private void ClearMap()
 {
     negativeObjects.Clear();
     positiveObjects.Clear();
     gameObjects.Clear();
     blockedMap           = new BlockedInfluenceMap(CreatePixel(), Color.Black);
     positiveInfluenceMap = new InfluenceMap(CreatePixel(), Color.SkyBlue);
     negativeInfluenceMap = new InfluenceMap(CreatePixel(), Color.MonoGameOrange);
     influenceMap         = new FinalInfluenceMap(CreatePixel(), Color.Black);
 }
Beispiel #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            positiveInfluenceMap = new InfluenceMap(CreatePixel(), Color.SkyBlue);
            negativeInfluenceMap = new InfluenceMap(CreatePixel(), Color.MonoGameOrange);
            blockedMap           = new BlockedInfluenceMap(CreatePixel(), Color.Violet);
            influenceMap         = new FinalInfluenceMap(CreatePixel(), Color.Black);

            positiveObjects = new List <GameObject>();
            negativeObjects = new List <GameObject>();
            gameObjects     = new List <GameObject>();

            IsMouseVisible = true;
            base.Initialize();
        }