public static HowWellDoYouKnowYourFriendsGame Instance(User i_LoggedInUser)
        {
            if (s_Game == null)
            {
                lock (s_LockObj)
                {
                    if (s_Game == null)
                    {
                        s_Game = new HowWellDoYouKnowYourFriendsGame(i_LoggedInUser)
                        {
                            Friends             = i_LoggedInUser.Friends,
                            m_QuestionFactories = new List <IQuestionFactory>
                            {
                                new QuestionFactoryIdentifyByProfilePicture(),
                                new QuestionFactoryIdentifyByBirthday(),
                                new QuestionFactoryIdentifyByLastPost()
                            }
                        };
                    }
                }
            }

            s_Game.generateQuestions();
            return(s_Game);
        }
Пример #2
0
        private void startGame()
        {
            m_Game = HowWellDoYouKnowYourFriendsGame.Instance(LoggedInUser);

            uiThreadInvoke(() =>
            {
                initQuestions();
            });
        }