예제 #1
0
        public static void Generate()
        {
            if (ChamberLever.Levers.Count == 0)
            {
                return;
            }

            for (var index = 0; index < m_ChamberInfos.Length; index++)
            {
                ChamberInfo info = m_ChamberInfos[index];

                m_Chambers.Add(new Chamber(info));
            }

            // randomize
            List <ChamberLever> levers = new List <ChamberLever>(ChamberLever.Levers);

            for (var index = 0; index < m_Chambers.Count; index++)
            {
                Chamber chamber = m_Chambers[index];

                int idx = Utility.Random(levers.Count);

                chamber.Lever       = levers[idx];
                levers[idx].Chamber = chamber;
                levers.RemoveAt(idx);
            }
        }
예제 #2
0
파일: Chamber.cs 프로젝트: Argalep/ServUO
 public Chamber(ChamberInfo info)
 {
     m_Switch  = new ChamberSwitch(this, info.SwitchLocation, info.SwitchId);
     m_Barrier = new ChamberBarrier(info.BarrierLocation);
 }
예제 #3
0
 public Chamber( ChamberInfo info )
 {
     m_Switch = new ChamberSwitch( this, info.SwitchLocation, info.SwitchId );
     m_Barrier = new ChamberBarrier( info.BarrierLocation );
 }