Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        protected override void OnStartServer()
        {
            base.OnStartServer();

            instance = this;

            match = new TurtleMatch();
            match.CreateFromSpawnPoints(
                numRoles,
                mode == Mode.OfflineMode ? offlineTurtlePrefab : onlineTurtlePrefab,
                FindObjectsOfType <SpawnPoint>()
                );
        }