Exemple #1
0
    void TestDecorator()
    {
        Person component = new Person("Alfred");

        Debug.Log("First Clothes");

        Trouser trouser = new Trouser();
        TShirts tshirts = new TShirts();

        trouser.Decorate(component);
        tshirts.Decorate(trouser);
        tshirts.Show();

        Debug.Log("Second Clothes:");
        Sneaker sneaker = new Sneaker();
        Shoes   shoes   = new Shoes();

        sneaker.Decorate(component);
        shoes.Decorate(sneaker);
        shoes.Show();
    }