Exemple #1
0
        // local case
        public override void OnStartLocalClient(GameServer server)
        {
            base.OnStartLocalClient(server);

            instance = this;

            this.turtleServer = (TurtleServer)server;
        }
Exemple #2
0
        // remote case
        public override void OnStartRemoteClient(StartGameMessage initialMessages)
        {
            base.OnStartRemoteClient(initialMessages);

            instance = this;

            var initialState = initialMessages.ReadInitialMessage <GameState>();

            remoteMatch = new TurtleMatch();
            remoteMatch.CreateFromInitialState(numRoles, onlineTurtlePrefab, initialState);
        }