Beispiel #1
0
 public NewPieceHolder(VariableBool holding, int pieceLayer, PieceRespawner pieceRespawner, NewPiecePlacement piecePlacement, Camera camera)
 {
     m_holding        = holding;
     m_pieceLayer     = pieceLayer;
     m_pieceRespawner = pieceRespawner;
     m_piecePlacement = piecePlacement;
     m_camera         = camera;
 }
Beispiel #2
0
        private void Start()
        {
            m_pieceRespawner = GetComponent <PieceRespawner>();
            m_piecePlacement = new NewPiecePlacement();
            m_pieceHolder    = new NewPieceHolder(m_holding, m_pieceLayer.value, m_pieceRespawner, m_piecePlacement, Camera.main);

            m_onSubmit?.Subscribe(OnSubmit).DisposeOnDestroy(gameObject);
            m_onIsPlayingChanged?.Subscribe(x => { if (x)
                                                   {
                                                       PlayNew();
                                                   }
                                            }).DisposeOnDestroy(gameObject);
        }