예제 #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);
        }
예제 #2
0
        protected override void OnStartServer()
        {
            base.OnStartServer();

            instance = this;

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