Esempio n. 1
0
        public new void Construct(GameField field, FieldElement.Factory elementFactory)
        {
            _field    = field;
            _animator = GetComponent <Animator>();

            var createState = new Sequence(
                new CheckUnitLeave(),
                new CreateNewTile(field),
                new WaitForSecondAction(0.15f),
                new CustomAction(c =>
            {
                _animator?.SetBool("Destroy", true);
            }),
                new WaitForSecondAction(1.0f),
                new DestroyTile(field)
                );

            Behaiour.Register(BehaiourState.Create, createState);
        }
Esempio n. 2
0
 public GameField(IGameSettings gameSettings, FieldElement.Factory elementsFactory, Ball.Factory ballFactory)
 {
     _gameSettings    = gameSettings;
     _elementsFactory = elementsFactory;
     _ballFactory     = ballFactory;
 }