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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
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);
        }