Game-Design / Sprint3_actual / BorderElements / BorderElementsFactory.cs
BorderElementsFactory.cs
Raw
using System;
using System.Collections.Generic;
using System.Text;

namespace Sprint3_actual.BorderElements
{
    class BorderElementsFactory
    {

        private static BorderElementsFactory instance = new BorderElementsFactory();

        public static BorderElementsFactory Instance
        {
            get
            {
                return instance;
            }
        }

        private BorderElementsFactory()
        {
        }

        public IDoor CreateDoor(int xPos, int yPos, int type)
        {
            return new DungeonDoor(xPos, yPos, type);

        }

        public IBorder CreateBorder(int xPos, int yPos, int type)
        {
            return new DungeonBorder(xPos, yPos, type);
        }

        public IBorder CreateTextBox(int xPos, int yPos)
        {
            return new TextBox(xPos, yPos);
        }

        public IBorder CreateHealthbar(int xPos, int yPos, int health)
        {
            return new Healthbar(xPos, yPos, health);
        }
    }
}