readme update

This commit is contained in:
devhalfdog 2023-08-13 18:43:09 +09:00
parent 5b00afa590
commit 27433d3422
2 changed files with 6 additions and 12 deletions

View File

@ -14,11 +14,12 @@ This repository provides an API that can be used to handle events on your commun
### Writing
Documentation and examples can be found on the [wiki](https://github.com/MrOkiDoki/BattleBit-Community-Server-API/wiki).
Documentation and examples can be found on the [wiki](https://github.com/MrOkiDoki/BattleBit-Community-Server-API/wiki) (WIP).
The way to use this API is to make an instance of `ServerListener` and add your own handlers to certain events that happen on your server(s).
The easiest way to do this, is to add/put your own code in `Program.cs` and then build the project.
The way to use this API is to make an instance of `ServerListener` (and start it) on which you pass the types of your *own* subclasses of `Player` & `GameServer`. In those subclasses, you can make your own overrides to the already existing methods in `Player` and `GameServer`. You can also add your own methods and fields/properties.
The easiest way to get started with all of this, is to use `Program.cs` and add your overrides etc. into `MyPlayer` & `MyGameServer`.
### Building
@ -28,11 +29,6 @@ This project can either be built by using [`dotnet build`](https://learn.microso
After writing and compiling this project. You will want to host it somewhere. This could be on the same server that the gameserver runs on, or somewhere completely different. We do recommend to keep the latency to the gameserver minimal for smoother and faster communication. The same `ServerListener` can be used for *multiple* gameservers at the same time. You can specify the API server (address & port) in the launch options of the gameserver.
#### Setting launch option in gameserver
`-apiEndpoint=<apiIPAddress>:<apiPort>`
# API Docs localization
- [Chinese](/docs/README_zhCN.md)
- [Korean](/docs/README_koKR.md)

View File

@ -25,8 +25,6 @@
### Connecting to the gameserver
API를 작성하고 컴파일한 후, 다른 곳에서 호스팅하고 싶을 수도 있습니다. 게임 서버가 실행되는 서버와 동일한 서버일 수 있으며 완전히 다른 서버일 수도 있습니다. 보다 원활하고 빠른 통신을 위해 게임 서버와의 지연 시간을 최소화하는 것이 좋습니다. 동일한 `ServerListener`를 동시에 *여러* 게임 서버에 사용할 수 있습니다. 게임 서버의 실행 옵션에서 API 서버(주소와 포트)를 지정할 수 있습니다.
이 API를 사용하는 방법은 `Player``GameServer`*자체* 서브클래스의 유형을 전달하는 `ServerListener` 인스턴스를 생성하고 이를 시작하는 것입니다.
#### Setting launch option in gameserver
`-apiEndpoint=<apiIPAddress>:<apiPort>`
이러한 서브클래스에서는 `Player``GameServer`에 이미 존재하는 메서드를 오버라이드하여 자신만의 메서드, 필드 및 프로퍼티를 추가할 수 있습니다.