Beispiel #1
0
        public GameObject Create()
        {
            GameObject slotObject  = gridItemFactory.Create();
            GameObject pieceObject = pieceFactory.Create();

            pieceObject.transform.position = slotObject.transform.position;
            pieceObject.transform.SetParent(slotObject.transform);
            SlotComponent slotComponent = slotObject.GetComponent <SlotComponent>();

            slotComponent.Construct(slotSelection);

            PieceDestinationControllerComponent pieceDestinationController = slotObject.GetComponent <PieceDestinationControllerComponent>();
            PieceTranslationControllerComponent pieceTranslationController = pieceObject.GetComponent <PieceTranslationControllerComponent>();

            pieceDestinationController.Construct(pieceTranslationController, new StubWinController());

            return(slotObject);
        }