Exemple #1
0
        public void Init(MatchSettings settings, MatchManager matchManager, MatchMessenger messenger, bool raceIsInProgress)
        {
            this.settings     = settings;
            this.matchManager = matchManager;
            this.messenger    = messenger;

            messenger.CreateListener <StartRaceMessage>(StartRaceCallback);
            messenger.CreateListener <ClientLeftMessage>(ClientLeftCallback);
            messenger.CreateListener <DoneRacingMessage>(DoneRacingCallback);

            if (raceIsInProgress)
            {
                Debug.Log("Starting race in progress");
                joinedWhileRaceInProgress = true;
                CreateBallObjects();
            }
        }
Exemple #2
0
        //Called when succesfully connected to a server
        private void BeginOnlineGame(MatchState matchState)
        {
            MatchManager manager = Instantiate(matchManagerPrefab);

            manager.InitOnlineMatch(joiningClient, matchState);
        }
Exemple #3
0
        public void BeginLocalGame()
        {
            MatchManager manager = Instantiate(matchManagerPrefab);

            manager.InitLocalMatch();
        }