Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
skh6075 authored Sep 20, 2020
1 parent 7ee33bc commit 1c4bb5b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# MiniGameAPI
PocketMine-MP easily implement minigames.

### Usage

#### Make GameRoom class.

```php
class MafiaGameRoom extends \skh6075\MiniGameAPI\game\GameRoom{
}
```

#### Register GameRoom class.

```php
$teamFactory = new \skh6075\MiniGameAPI\team\TeamFactory (
new \skh6075\MiniGameAPI\team\Team ("citizen"),
new \skh6075\MiniGameAPI\team\Team ("mafia"),
new \skh6075\MiniGameAPI\team\Team ("police"),
new \skh6075\MiniGameAPI\team\Team ("doctor"),
new \skh6075\MiniGameAPI\team\Team ("repoter"),
new \skh6075\MiniGameAPI\team\Team ("spy")
);
$minPlayer = 8;
$maxPlayer = 12;
$room = new MafiaGameRoom ("mafia", $minPlayer, $maxPlayer, $teamFactory);
\skh6075\MiniGameAPI\MiniGameFactory::addGameRoom ($room);
```

- Implement the rest of the coding in the MafiaGameRoom class by yourself.

0 comments on commit 1c4bb5b

Please sign in to comment.