/// <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; } }
public void AddCableType(string name, double a) { CableType c = new CableType(name, a); CableTypes.Add(c); }
public void LoadNewCableTypesList(List <CableType> newList) { CableTypes.Clear(); CableTypes = newList; }
public CableTile(CableTypes type) : base() { this.Type = type; InstantiateCable(Type); }