Update README.md
This commit is contained in:
parent
640ad2949e
commit
ab17e5be2a
1 changed files with 8 additions and 8 deletions
16
README.md
16
README.md
|
@ -5,8 +5,7 @@ I made this for me at start but feel free to use it to write your own minigame !
|
||||||
### How to make a game:
|
### How to make a game:
|
||||||
To make a game base, create a new file called "<YOUR_GAME_NAME>.php". Inside it, add a
|
To make a game base, create a new file called "<YOUR_GAME_NAME>.php". Inside it, add a
|
||||||
|
|
||||||
``
|
``<?php
|
||||||
<?php
|
|
||||||
|
|
||||||
use Ad5001\GameManager\Game;
|
use Ad5001\GameManager\Game;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
@ -23,16 +22,17 @@ public function onGameStop() { // When you stop the game.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getName() : string {
|
public function getName() : string {
|
||||||
return "<YOUR_GAME_NAME>";
|
return "<YOUR_GAME_NAME>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getMaxPlayers() : int { // Return the max of the players
|
public function getMaxPlayers() : int { // Return the max of the players
|
||||||
return <NUMBER OF PLAYERS MAX>;
|
return <NUMBER OF PLAYERS MAX>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write in progress :)
|
// Write in progress :)
|
||||||
}
|
}
|
||||||
|
|
||||||
``
|
``
|
||||||
|
|
Loading…
Reference in a new issue