public override void EnterState() { EventLogger.Log(LogGlobals.CATEGORY_FASHION_MINIGAME, LogGlobals.EVENT_MINIGAME_ENTERED); mStartGame = DateTime.UtcNow; mGameStateMachine = new FashionGameStateMachine(); mFashionMinigame = new FashionMinigame(null, new DistributedObjectId(0), new List <object>(), mGameStateMachine); GameFacade.Instance.RegisterMediator(mGameStateMachine); }
public static void Exit() { RoomManagerProxy roomManagerProxy = GameFacade.Instance.RetrieveProxy <RoomManagerProxy>(); roomManagerProxy.JoinLastRoom(); if (mCurrentStateMachine != null) { mCurrentStateMachine.CurrentState.ExitState(); mCurrentStateMachine = null; } }
public FashionMinigame(SendMessageCallback sendMessage, DistributedObjectId doId, List <object> messageData, FashionGameStateMachine stateMachine) : base(sendMessage, doId, messageData) { GameFacade.Instance.SendNotification(GameFacade.ENTER_FASHION_MINIGAME); mCurrentStateMachine = stateMachine; }