Esempio n. 1
0
        public void ChangeColorTo(ColorType color)
        {
            ChameleonFactory factory = GetFactoryForColor(color);

            RebuildLegs(factory);
            RebuildBody(factory);
            RebuildHead(factory);
        }
Esempio n. 2
0
 private void RebuildHead(ChameleonFactory factory)
 {
     Head = factory.ConstructHead();
 }
Esempio n. 3
0
 private void RebuildBody(ChameleonFactory factory)
 {
     Body = factory.ConstructBody();
 }
Esempio n. 4
0
 private void RebuildLegs(ChameleonFactory factory)
 {
     RightLeg = factory.ConstructRightLeg();
     LeftLeg  = factory.ConstructLeftLeg();
 }