示例#1
0
 /**
  * set the subject and extracts whether it can conversate
  *
  * @param Game\Conversation\AcceptConversation $subject
  * @return Game\Action\AbstractAction
  */
 public function setSubject(AcceptConversation $subject)
 {
     parent::setSubject($subject);
     $this->conversation = $this->subject->getConversation();
     if (empty($this->conversation)) {
         throw new Exception('Conversate action set but no conversation found in item ' . $this->subject->getName());
     }
 }
示例#2
0
 /**
  * adds an action to the action stack
  *
  * @see Game\Action.Action::addAction()
  * @return Game\Tile
  */
 public function addAction(AbstractAction $action)
 {
     $action->setSubject($this);
     $this->actions[$action->getName()] = $action;
     return $this;
 }