void OnEnable()
        {
            Debug.Log ("------------------");
            Debug.Log ("BUILDER DESIGN PATTERN");
            IRobotBuilder oldRobot = new OldRobotBuilder();
            RobotEngineer engineer = new RobotEngineer(oldRobot);
            engineer.MakeRobot();

            Robot firstRobot = engineer.GetRobot();
            Debug.Log ("First Robot built");
            Debug.Log (firstRobot.ToString());
        }
Ejemplo n.º 2
0
        void OnEnable()
        {
            Debug.Log("------------------");
            Debug.Log("BUILDER DESIGN PATTERN");
            IRobotBuilder oldRobot = new OldRobotBuilder();
            RobotEngineer engineer = new RobotEngineer(oldRobot);

            engineer.MakeRobot();

            Robot firstRobot = engineer.GetRobot();

            Debug.Log("First Robot built");
            Debug.Log(firstRobot.ToString());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            RobotBuilder oldStyleRobot = new OldRobotBuilder();

            RobotEngineer robotEngineer = new RobotEngineer(oldStyleRobot);

            robotEngineer.makeRobot();

            Robot firstRobot = robotEngineer.getRobot();

            Console.WriteLine("Robot Built");
            Console.WriteLine("Robot Head Type: " + firstRobot.getRobotHead());
            Console.WriteLine("Robot Torso Type: " + firstRobot.getRobotTorso());
            Console.WriteLine("Robot Arm Type: " + firstRobot.getRobotArms());
            Console.WriteLine("Robot Leg Type: " + firstRobot.getRobotLegs());
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            RobotBuilder oldStyleRobot = new OldRobotBuilder();

            RobotEngineer robotEngineer = new RobotEngineer(oldStyleRobot);

            robotEngineer.MakeRobot();

            Robot firstRobot = robotEngineer.GetRobot();

            Console.WriteLine("Robot Build");

            Console.WriteLine($"Robot Head Type {firstRobot.getRobotHead()}");
            Console.WriteLine($"Robot Torso Type {firstRobot.getRobotTorso()}");
            Console.WriteLine($"Robot Arms Type {firstRobot.getRobotArms()}");
            Console.WriteLine($"Robot Legs Type {firstRobot.getRobotLegs()}");

            Console.ReadKey();
        }