예제 #1
0
        /// <summary>
        /// Initializes this <see cref="IGameState"/> with references to the game
        /// engine and animation store repository instances.
        /// </summary>
        /// <param name="gameReference">
        /// A reference to the game engine instance.
        /// </param>
        /// <param name="animationStore">
        /// A reference to the animation store repository instance.
        /// </param>
        /// <returns>True if the initialization routine was successful.</returns>
        public bool Initialize(JunkbotGame gameReference, AnimationStore animationStore)
        {
            Game      = gameReference;
            Interface = new JunkbotInterface();

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Initializes this <see cref="IGameState"/> with references to the game
        /// engine and animation store repository instances.
        /// </summary>
        /// <param name="gameReference">
        /// A reference to the game engine instance.
        /// </param>
        /// <param name="animationStore">
        /// A reference to the animation store repository instance.
        /// </param>
        /// <returns>True if the initialization routine was successful.</returns>
        public bool Initialize(JunkbotGame gameReference, AnimationStore animationStore)
        {
            AnimationStore = animationStore;
            Game           = gameReference;
            Interface      = new JunkbotInterface();
            Scene          = Scene.FromLevel(
                File.ReadAllLines(Environment.CurrentDirectory + @"\Content\Levels\loading_level.txt"),
                AnimationStore
                );

            return(true);
        }