/// <summary>
        /// Load a single file
        /// </summary>
        /// <param name="path">Path of the file</param>
        /// <returns></returns>
        private CinematicScript LoadFile(string path)
        {
            Lua lua = new Lua();

            Thread.Sleep(50); // this bug is really weird, we need to put a delay between each load (see KeraLua.dll & Lua.dll) ?
            lua.DoFile(path);
            CinematicScript script = new CinematicScript(lua);

            return(script);
        }
        /// <summary>
        /// Play the CinematicScript async
        /// </summary>
        /// <param name="character"></param>
        /// <param name="spawnId"></param>
        public void TalkToNpc(Character character, long spawnId)
        {
            CinematicScript script = GetScript(character.Map.Id, spawnId);

            script.TalkToNpc(character);
        }
Exemple #3
0
 public CinematicEnvironment(Character character, CinematicScript script)
 {
     this.Character = character;
     this.Script    = script;
     this.Npc       = character.Map.Instance.GetNpc((int)script.NpcId);
 }