示例#1
0
 public function __construct($content)
 {
     if (is_string($content) && trim($content)) {
         NpcFactory::fleshOut($content, $this);
     } else {
         NpcFactory::fleshOutFromData($content, $this);
     }
 }
示例#2
0
 public function testFleshOutFailure()
 {
     $this->setExpectedException(NinjaWars\core\InvalidNpcException::class);
     NpcFactory::fleshOut('NotARealNPCByAnyMeans', null);
 }