Esempio n. 1
0
        /// <summary>
        /// Instantiate a specific Cable for this CableTile
        /// </summary>
        /// <param name="type">Desired CableType</param>
        private void InstantiateCable(CableTypes type)
        {
            switch (this.Type)
            {
            case CableTypes.Straight:
                Cable = new StraightCable();
                break;

            case CableTypes.Curved:
                Cable = new CurvedCable();
                break;

            case CableTypes.FourWay:
                Cable = new FourWayCable();
                break;
            }
        }
Esempio n. 2
0
        public void AddCableType(string name, double a)
        {
            CableType c = new CableType(name, a);

            CableTypes.Add(c);
        }
Esempio n. 3
0
 public void LoadNewCableTypesList(List <CableType> newList)
 {
     CableTypes.Clear();
     CableTypes = newList;
 }
Esempio n. 4
0
 public CableTile(CableTypes type) : base()
 {
     this.Type = type;
     InstantiateCable(Type);
 }