public class MyPlayer : BasePlayer { }
[RoomType("MyRoomType")]
public class MyGame : Game<MyPlayer> {
//This method is called when a room is created
public override void GameStarted() {
//Perform actions to initialize room here
}
//This method is called when the last player leaves the room.
public override void GameClosed() {
//Do any clean-up here such as saving statistics
}
// This method is called whenever a player joins the room
public override void UserJoined(MyPlayer player) {
//Notify other players that someone joined,
//or inform the new player of the game state
}
// This method is called when a player leaves the room
public override void UserLeft(MyPlayer player) {
//Notify other players the someone left
}
//This method is called before a user joins a room.
//If you return false, the user is not allowed to join.
public override bool AllowUserJoin(MyPlayer player) {
return true;
}
//This method is called whenever a player sends a message to the room
public override void GotMessage(MyPlayer player, Message message) {
//Handle all different message types here
//This room broadcasts all incoming messages
//to all connected players:
Broadcast(message);
}
}
its just giving me errors when i replaces that new file with a copy and pasted it in the .DLL im guessing I have to rename like everything, so to cut a long story short can anyone help me make a single player room that lots of different people can join and not talk to eachother? any help would be great.