public AtomData DeployFormationFromTree(DeployedFormation deployFormation) { SessionManager m = (SessionManager)GlobalHost.DependencyResolver.GetService(typeof(SessionManager)); AtomData atom = m.gameManager.m_GameObject.DeployFormationFromTree(deployFormation); return(atom); }
public void MoveGroundObject(DeployedFormation deployFormation) { TDS.DAL.AtomsDB.UpdateAtomPositionByGuid(deployFormation.formation.GUID, deployFormation.x, deployFormation.y); AtomBase GroundAtom = null; GroundAtomObjectCollection.TryGetValue(deployFormation.formation.GUID, out GroundAtom); GroundAtom.curr_X = deployFormation.x; GroundAtom.curr_Y = deployFormation.y; 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); }
public AtomData DeployFormationFromTree(DeployedFormation deployFormation) { if (GroundAtomObjectCollection.ContainsKey(deployFormation.formation.GUID)) return null; AtomData atom = new AtomData(); atom.Location = new DPoint(deployFormation.x, deployFormation.y); atom.UnitGuid = deployFormation.formation.GUID; atom.UnitName = deployFormation.formation.Identification; TDS.DAL.AtomsDB.AddAtom(atom); clsGroundAtom GroundAtom = new clsGroundAtom(this); GroundAtom.MyName = atom.UnitName; GroundAtom.GUID = atom.UnitGuid; GroundAtom.curr_X = atom.Location.x; GroundAtom.curr_Y = atom.Location.y; GroundAtomObjectCollection.TryAdd(GroundAtom.GUID, GroundAtom); m_GameManager.QuadTreeGroundAtom.PositionUpdate(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); return atom; }
public AtomData DeployFormationFromTree(DeployedFormation deployFormation) { SessionManager m = (SessionManager)GlobalHost.DependencyResolver.GetService(typeof(SessionManager)); AtomData atom= m.gameManager.m_GameObject.DeployFormationFromTree(deployFormation); return atom; }
public void MoveGroundObject(DeployedFormation deployFormation) { SessionManager m = (SessionManager)GlobalHost.DependencyResolver.GetService(typeof(SessionManager)); m.gameManager.m_GameObject.MoveGroundObject(deployFormation); }