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 Presentation FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Presentation ps = new Presentation();

            ps.Index      = s[j++];
            ps.Index      = ps.Index.Substring(ps.Index.IndexOf("_") + 1);
            ps.Flags      = Convert.ToInt64(s[j++]);
            ps.Background = Convert.ToInt32(s[j++]);
            ps.Triggers   = new List <SimpleTrigger>(Convert.ToInt32(s[j++]));
            for (int i = 0; i < ps.Triggers.Capacity; i++)
            {
                ps.Triggers.Add(SimpleTrigger.FromString(mInfo, s, ref j));
            }
            return(ps);
        }
        public static Scene_Prop FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            Scene_Prop sp = new Scene_Prop();

            sp.Module             = mInfo;
            sp.Index              = s[j++];
            sp.Index              = sp.Index.Substring(sp.Index.IndexOf("_") + 1);
            sp.Flags              = BigInteger.Parse(s[j++]);
            sp.HitPoints          = Convert.ToInt32(s[j++]);
            sp.MeshName           = s[j++];
            sp.PhyisicsObjectName = s[j++];
            sp.Triggers           = new List <SimpleTrigger>(Convert.ToInt32(s[j++]));
            for (int i = 0; i < sp.Triggers.Capacity; i++)
            {
                sp.Triggers.Add(SimpleTrigger.FromString(mInfo, s, ref j));
            }
            return(sp);
        }
Esempio n. 4
0
        public static MapIcon FromString(ModuleInfo mInfo, string[] s, ref int j)
        {
            MapIcon mi = new MapIcon();

            mi.Index    = s[j++];
            mi.Flags    = Convert.ToInt64(s[j++]);
            mi.MeshName = s[j++];
            mi.Scale    = Convert.ToSingle(s[j++]);
            mi.Sound    = Convert.ToInt32(s[j++]);
            mi.OffsetX  = Convert.ToSingle(s[j++]);
            mi.OffsetY  = Convert.ToSingle(s[j++]);
            mi.OffsetZ  = Convert.ToSingle(s[j++]);
            mi.Triggers = new List <SimpleTrigger>(Convert.ToInt32(s[j++]));
            for (int i = 0; i < mi.Triggers.Capacity; i++)
            {
                mi.Triggers.Add(SimpleTrigger.FromString(mInfo, s, ref j));
            }
            return(mi);
        }