Beispiel #1
0
        /// <summary>
        /// 往平台组件中注册遮挡关系
        /// </summary>
        /// <param name="manager"></param>
        public void RegistShelter(SmartTank.Shelter.ShelterMgr manager)
        {
            foreach (MulPair pair in shelterGroups)
            {
                try
                {
                    List <IEnumerable <IShelterObj> > shelGroups = new List <IEnumerable <IShelterObj> >();

                    foreach (string shelGroupPath in pair.groupPaths)
                    {
                        TypeGroup shelGroup = FindGroup(shelGroupPath) as TypeGroup;
                        shelGroups.Add(shelGroup.GetEnumerableCopy <IShelterObj>());
                    }

                    TypeGroup group = FindGroup(pair.groupPath) as TypeGroup;

                    manager.AddRaderShelterGroup(
                        group.GetEnumerableCopy <IRaderOwner>(),
                        shelGroups.ToArray());
                }
                catch (Exception ex)
                {
                    Log.Write("RegistShelterGroup error: " + pair.groupPath + ex.Message);
                }
            }
        }
Beispiel #2
0
 public void RegistShelter ( ShelterMgr manager )
 {
     manager.AddRaderShelterGroup( tankRaderOwners, new MultiLinkedList<IShelterObj>[] { tankRaderShelters } );
 }
Beispiel #3
0
        protected override void Initialize ()
        {
            base.Initialize();

            phiColManager = new PhiColMgr();
            shelterMgr = new ShelterMgr();
            drawManager = new DrawMgr();
            updateMgr = new UpdateMgr();
            visionMgr = new VisionMgr();
            objMemoryMananger = new ObjMemoryMgr();

            Sound.Initial();

            // 在此处将主界面压入堆栈。


            // test

            gameScreens.Push( new RuleSelectScreen() );

            //

        }