public static SimpleTrigger FromString(ModuleInfo mInfo, string[] c, ref int j)
        {
            SimpleTrigger trigger = new SimpleTrigger();

            trigger.Module   = mInfo;
            trigger.Interval = Convert.ToDouble(c[j++]);
            trigger.Block    = Statement_Block.FromString(mInfo, c, ref j);
            return(trigger);
        }
Exemple #2
0
        public static MenuItem FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            MenuItem party = new MenuItem();

            party.Name      = s[j++];
            party.Condition = Statement_Block.FromString(mInfo, s, ref j);
            party.Label     = s[j++];
            party.Action    = Statement_Block.FromString(mInfo, s, ref j);
            party.DoorName  = s[j++];
            return(party);
        }
        public static Script FromString(ModuleInfo minfo, string[] s, ref int j)
        {
            Script script = new Script();

            script.Module = minfo;
            script.Name   = s[j++];
            script.v      = Convert.ToDouble(s[j++]);

            script.Statements = Statement_Block.FromString(minfo, s, ref j);

            return(script);
        }
        public static Statement_Block FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Statement_Block block = new Statement_Block();

            block.Module     = mInfo;
            block.Statements = new List <Statement>(Convert.ToInt32(s[j++]));
            for (int i = 0; i < block.Statements.Capacity; i++)
            {
                var stmt = Statement.FromString(mInfo, s, ref j);
                block.Statements.Add(stmt);
            }
            return(block);
        }
Exemple #5
0
        public static Trigger FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Trigger trg = new Trigger();

            trg.Module = mInfo;

            trg.Check        = Convert.ToSingle(s[j++]);
            trg.Delay        = Convert.ToSingle(s[j++]);
            trg.Rearm        = Convert.ToSingle(s[j++]);
            trg.Conditions   = Statement_Block.FromString(mInfo, s, ref j);
            trg.Consequences = Statement_Block.FromString(mInfo, s, ref j);


            return(trg);
        }
        public static Tableau FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Tableau tab = new Tableau();

            tab.Index   = s[j++];
            tab.Index   = tab.Index.Substring(tab.Index.IndexOf("_") + 1);
            tab.Flags   = Convert.ToInt64(s[j++]);
            tab.MatName = s[j++];

            tab.Width  = Convert.ToInt32(s[j++]);
            tab.Height = Convert.ToInt32(s[j++]);

            tab.MinX = Convert.ToInt32(s[j++]);
            tab.MinY = Convert.ToInt32(s[j++]);

            tab.MaxX       = Convert.ToInt32(s[j++]);
            tab.MaxY       = Convert.ToInt32(s[j++]);
            tab.Statements = Statement_Block.FromString(mInfo, s, ref j);
            return(tab);
        }
Exemple #7
0
        public static Menu FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Menu party = new Menu();

            party.Module = mInfo;
            party.Index  = s[j++];
            party.Index  = party.Index.Substring(party.Index.IndexOf("_") + 1);
            party.Flags  = BigInteger.Parse(s[j++]);
            party.TextEn = s[j++];
            if (mInfo.F_Language["game_menus"].ContainsKey(party.Index))
            {
                party.Text = mInfo.F_Language["game_menus"][party.Index];
            }
            party.Mesh       = s[j++];
            party.Statements = Statement_Block.FromString(mInfo, s, ref j);
            party.MenuItems  = new List <MenuItem>(Convert.ToInt32(s[j++]));
            for (int i = 0; i < party.MenuItems.Capacity; i++)
            {
                party.MenuItems.Add(MenuItem.FromString(mInfo, s, ref j));
            }
            return(party);
        }