コード例 #1
0
ファイル: BallPresenter.cs プロジェクト: wivanw/JobTest
 public BallPresenter(IInfrastructureFactory infrastructureFactory, IScreenSize screenSize,
                      IElementSize elementSize)
 {
     _elementSize = elementSize;
     _view        = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Ball) as IBallView;
     screenSize.ChangeSizeEvent += ChangeScreenSize;
 }
コード例 #2
0
ファイル: BorderPresenter.cs プロジェクト: wivanw/JobTest
 public BorderPresenter(IInfrastructureFactory infrastructureFactory, IBorder border, IScreenSize screenSize)
 {
     _border = border;
     _view   = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Border) as ISceneBorderView;
     screenSize.ChangeSizeEvent += ChangeSizeEventHandler;
     ChangeSizeEventHandler(screenSize.Size);
 }
コード例 #3
0
 public BottomPresenter(IInfrastructureFactory infrastructureFactory, IBottom bottom, IScreenSize screenSize)
 {
     _view                       = infrastructureFactory.Cteate(Data.Enum.Infrastructure.Bottom) as IBottomView;
     _model                      = bottom;
     _view.ViewEvent            += ViewEventHandler;
     screenSize.ChangeSizeEvent += ChangeSizeEventHandler;
     ChangeSizeEventHandler(screenSize.Size);
     _bottomEventActions = new Dictionary <string, Action>()
     {
         { BottomEvent.ButtonDown, () => _model.StartDrag() },
         { BottomEvent.Drag, () => _view.SetIncline(_model.Drag()) },
         { BottomEvent.ButtonUp, () => _model.EndDrag() }
     };
 }