Пример #1
0
 public void Execute()
 {
     if (_condition.Evaluate())
     {
         _command.Start();
     }
 }
Пример #2
0
        public void SelectState(BehaiourState state)
        {
            Stop();

            IGameAction action;

            if (!_behaviours.TryGetValue(state, out action))
            {
                return;
            }
            _current        = action;
            _state          = state;
            _current.Ended += OnActionEnd;
            _current.Start();
        }
Пример #3
0
 protected override void OnStart()
 {
     _leftCount    = _loopsCount;
     _owner.Ended += OnCommandComplete;
     _owner.Start();
 }
Пример #4
0
 public void OnEvent(CreateGameEvent args)
 {
     _createAction.Start();
 }