Scenario build 1차 완료
- NPC 생성 로직 수정 - 생성 안된 장수는 event로 넘김 - 완료된 event 삭제하는 action 추가
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
namespace sammo\Event\Action;
|
||||
|
||||
//이전 RegNPC 함수를 EventAction으로 재구성
|
||||
class RegNPC extends \sammo\Event\Action{
|
||||
|
||||
private $npc;
|
||||
|
||||
public function __construct(
|
||||
int $affinity,
|
||||
string $name,
|
||||
int $pictureID,
|
||||
int $nationID,
|
||||
string $locatedCity,
|
||||
int $leadership,
|
||||
int $power,
|
||||
int $intel,
|
||||
int $birth = 160,
|
||||
int $death = 300,
|
||||
string $ego = null,
|
||||
string $char = null,
|
||||
string $text = null
|
||||
){
|
||||
$this->npc = new \sammo\Scenario\NPC(
|
||||
$affinity,
|
||||
$name,
|
||||
$pictureID,
|
||||
$nationID,
|
||||
$locatedCity,
|
||||
$leadership,
|
||||
$power,
|
||||
$intel,
|
||||
$birth,
|
||||
$death,
|
||||
$ego,
|
||||
$char,
|
||||
$text
|
||||
);
|
||||
}
|
||||
|
||||
public function run($env=null){
|
||||
$result = $this->npc->build($env);
|
||||
return [__CLASS__, $result];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user