Beispiel #1
0
        private void Start()
        {
            var puyos      = new PuyosCollection(_puyoPrefs);
            var controller = new PuyosController(puyos);
            var effector   = Instantiate(_effector).Initialize(puyos);

            Observable.Return(Unit.Default)
            .Delay(TimeSpan.FromSeconds(1f))
            .Subscribe(_ => controller.Execute());
        }
Beispiel #2
0
 public PuyosEffector Initialize(PuyosCollection puyos)
 {
     _effectQueue = new Queue <Action <Unit> >();
     foreach (var puyo in puyos)
     {
         puyo.OnEffect.Subscribe(_effectQueue.Enqueue);
     }
     StartCoroutine(EffectCoroutine());
     return(this);
 }
Beispiel #3
0
 public PuyosController(PuyosCollection puyos)
 {
     _puyos = puyos;
 }