Пример #1
0
 public void draw(SpriteBatch canvas, CharacterSpriteManager sprites, int screenWidth, int screenHeight)
 {
     foreach (Character c in chars)
     {
         canvas.Draw(sprites.spriteList[c.characterSpriteIndex], c.spriteArea, Color.White);
     }
 }
Пример #2
0
 public ScriptLoader(LocationManager loc, CharacterSpriteManager spriteManager, UIManager uiManager, DialogueManager dialogManager, ScriptFileParser fileParser)
 {
     l  = loc;
     cs = spriteManager;
     ui = uiManager;
     fp = fileParser;
     dm = dialogManager;
 }
Пример #3
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //font, has to be moved and modified later;
            font = Content.Load <SpriteFont>("Arial");

            dialogManager = new DialogueManager(GraphicsDevice);

            locManager = new LocationManager(GraphicsDevice, dialogManager);

            spriteManager = new CharacterSpriteManager(GraphicsDevice);

            uiManager = new UIManager(GraphicsDevice);

            fileParser = new ScriptFileParser();

            scriptLoader = new ScriptLoader(locManager, spriteManager, uiManager, dialogManager, fileParser);

            //load script file
            string homepath = Environment.GetEnvironmentVariable("homepath");

            scriptLoader.loadScript(ConfigurationManager.AppSettings["scriptFilePath"]);
        }