public string ToString() { return "Head: " + this.head + ", torso: " + this.torso + ", Arms: " + arms + ", legs: " + legs; }
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()); }