puritandesigns / expotition
构建游戏书故事的类
v0.2
2019-03-03 15:47 UTC
Requires (Dev)
- phpunit/phpunit: ^7.2
This package is auto-updated.
Last update: 2024-09-06 09:40:28 UTC
README
PHP 类,用于构建游戏书故事。
入门
- 运行
composer require puritandesigns/expotition
- 需要 composer 的自动加载并创建一个冒险:
$adventure = new Adventure();
- 创建具有动作的设置
$town = new Setting( $adventure, 'Town', 'You find yourself in a small town bustling with activity.', ); $tavern = new Setting( $adventure, 'Tavern', 'You are in a single-room tavern.', new Actions( new SimpleResponseAction( 'Talk to Bartender', $adventure, 'The Bartender grunts, "Welcome to my pub."' ), new LeaveAction( 'Head outside', $adventure, $town ) ) );