Exemplo n.º 1
0
        public StateCommand Execute(Type type, params object[] args)
        {
            StateCommand command = (StateCommand)MonoCommand.ExecuteOn(type, _container.GameObject, args);

            _commands.Add(command);

            command.AsyncToken.AddResponder(new Responder <StateCommand>(delegate(StateCommand result)
            {
                _commands.Remove(result);
            }));

            return(command);
        }
Exemplo n.º 2
0
        public T Execute <T>(params object[] args) where T : StateCommand, new()
        {
            T command = MonoCommand.ExecuteOn <T>(_container.GameObject, args);

            _commands.Add(command);

            command.AsyncToken.AddResponder(new Responder <StateCommand>(delegate(StateCommand result)
            {
                _commands.Remove(result);
            },
                                                                         delegate(StateCommand result)
            {
                _commands.Remove(result);
            }
                                                                         ));

            return(command);
        }
Exemplo n.º 3
0
 private StateCommand CreateState(Type type, object[] args)
 {
     return((StateCommand)MonoCommand.ExecuteOn(type, _container.GameObject, args));
 }