示例#1
0
 public void Trigger()
 {
     if (!finished)
     {
         finished = true;
         CutsceneScripts.doScript(cutsceneFile);
     }
 }
示例#2
0
 public static void loadScripts(CutsceneScripts scripts)
 {
     luaScripts = new Lua();
     luaScripts.LoadCLRPackage();
     luaScripts.RegisterFunction("moveCamera", scripts, scripts.GetType().GetMethod("moveCamera"));
     luaScripts.RegisterFunction("sayLine", scripts, scripts.GetType().GetMethod("sayLine"));
     luaScripts.RegisterFunction("moveCharacter", scripts, scripts.GetType().GetMethod("moveCharacter"));
     luaScripts.RegisterFunction("moveItem", scripts, scripts.GetType().GetMethod("moveItem"));
     luaScripts.RegisterFunction("BeginCutscene", scripts, scripts.GetType().GetMethod("BeginCutscene"));
     luaScripts.RegisterFunction("Fade", scripts, scripts.GetType().GetMethod("Fade"));
     luaScripts.RegisterFunction("moveMap", scripts, scripts.GetType().GetMethod("moveMap"));
     luaScripts.RegisterFunction("wait", scripts, scripts.GetType().GetMethod("wait"));
     luaScripts.RegisterFunction("triggerAlteration", scripts, scripts.GetType().GetMethod("triggerAlteration"));
 }
示例#3
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     fadeEffect  = new FadeEffect(Content.Load <Texture2D>("etc/fade_effect"), 6, 0.1f, 6, 0.1f);
     dimStrength = 0.6f;
     TileMap.loadTiles(Content);
     GameData.initTextures(Content);
     scripts = new CutsceneScripts();
     CutsceneScripts.loadScripts(scripts);
     CutsceneScripts.mainGame = this;
     MediaPlayer.IsRepeating  = true;
     mc        = new MainCharacter(Content.Load <Texture2D>("sprites/Characters/flwick"), new Vector2(0, 0), "Flwick", this);
     camera    = new Camera(mc.position);
     inventory = new InventoryState(this, graphics.GraphicsDevice, Content, "Inventory", InventoryState.SINGLE_COLUMN, 5);
     currState = new MenuState(this, graphics.GraphicsDevice, Content, "Menu");
     currState.LoadContent();
     nextState = null;
 }