Example #1
0
        private void AddGameObject()
        {
            if (blockedMap.GetCell(mouse.Position) != null)
            {
                if (blockedMap.CheckVacancy(mouse.Position))
                {
                    switch (objSelect)
                    {
                    case 1:
                        positiveObjects.Add(new GameObject(CreatePixel(), positiveInfluenceMap.GetCell(mouse.Position).GetPosition(), Color.LimeGreen, InfluenceMapConfig.CellWidth));
                        gameObjects.Add(positiveObjects[positiveObjects.Count - 1]);
                        break;

                    case 2:
                        negativeObjects.Add(new GameObject(CreatePixel(), negativeInfluenceMap.GetCell(mouse.Position).GetPosition(), Color.HotPink, InfluenceMapConfig.CellWidth));
                        gameObjects.Add(negativeObjects[negativeObjects.Count - 1]);
                        break;
                    }
                }
            }
        }