コード例 #1
0
ファイル: SimulationHub.cs プロジェクト: yinondouchan/TDS
        public GeneralActivityDTO SaveActivity(GeneralActivityDTO ActivityDTO)
        {
            GeneralActivityDTO activity = TDS.DAL.ActivityDB.SaveActivity(ActivityDTO);
            SessionManager     m        = (SessionManager)GlobalHost.DependencyResolver.GetService(typeof(SessionManager));

            m.gameManager.m_GameObject.RefreshActivity(ActivityDTO);
            return(activity);
        }
コード例 #2
0
ファイル: GameObject.cs プロジェクト: ohadmanor/TDS
        public void   RefreshActivity(GeneralActivityDTO ActivityDTO)
        {
            AtomBase GroundAtombase = null;
            GroundAtomObjectCollection.TryGetValue(ActivityDTO.Atom.UnitGuid, out GroundAtombase);
            if (GroundAtombase == null)
            {
                clsGroundAtom GroundAtom = new clsGroundAtom(this);
                GroundAtom.MyName = ActivityDTO.Atom.UnitName;
                GroundAtom.GUID = ActivityDTO.Atom.UnitGuid;
                GroundAtom.curr_X = ActivityDTO.Atom.Location.x;
                GroundAtom.curr_Y = ActivityDTO.Atom.Location.y;
                GroundAtomObjectCollection.TryAdd(GroundAtom.GUID, GroundAtom);

                NotifyClientsEndCycleArgs args = new NotifyClientsEndCycleArgs();
                args = new NotifyClientsEndCycleArgs();
                args.Transport2Client.Ex_clockDate = Ex_clockDate;
                // args.Transport2Client.ExClockRatioSpeed = m_GameManager.ExClockRatioSpeed;
                args.Transport2Client.AtomObjectType = 2;
                args.Transport2Client.AtomObjectCollection = PrepareGroundCommonProperty();
                args.Transport2Client.ManagerStatus =   m_GameManager.ManagerStatus;
                m_GameManager.NotifyClientsEndCycle(args);
            }
        }
コード例 #3
0
ファイル: SimulationHub.cs プロジェクト: ohadmanor/TDS
       public GeneralActivityDTO SaveActivity(GeneralActivityDTO ActivityDTO)
       {
           GeneralActivityDTO activity= TDS.DAL.ActivityDB.SaveActivity(ActivityDTO);
           SessionManager m = (SessionManager)GlobalHost.DependencyResolver.GetService(typeof(SessionManager));
           m.gameManager.m_GameObject.RefreshActivity(ActivityDTO);
           return activity;

       }