Beispiel #1
0
        /// <inheritdoc />
        public LoadNewSceneEventPayload(PlayableGameScene sceneToLoad)
        {
            if (!Enum.IsDefined(typeof(PlayableGameScene), sceneToLoad))
            {
                throw new InvalidEnumArgumentException(nameof(sceneToLoad), (int)sceneToLoad, typeof(PlayableGameScene));
            }

            SceneToLoad = sceneToLoad;
        }
Beispiel #2
0
        /// <inheritdoc />
        public ServerRequestedSceneChangeEventArgs(PlayableGameScene sceneRequested)
        {
            if (!Enum.IsDefined(typeof(PlayableGameScene), sceneRequested))
            {
                throw new InvalidEnumArgumentException(nameof(sceneRequested), (int)sceneRequested, typeof(PlayableGameScene));
            }

            SceneRequested = sceneRequested;
        }
Beispiel #3
0
 /// <inheritdoc />
 public ServerRequestedSceneChangeEventArgs(PlayableGameScene sceneRequested)
 {
     //HelloKitty: We actually aren't going to complain if it's unknown. If the server requests an unknown map, it should be handled somewhere else, not as an exception here.
     SceneRequested = sceneRequested;
 }