コード例 #1
0
ファイル: GameGoalManager.cs プロジェクト: andyhebear/ymfas
        public Shadow(EventManager eventManager, ServerShipManager shipManager, int sendRate)
        {
            eventMgr   = eventManager;
            shipMgr    = shipManager;
            msgRate    = sendRate;
            processCtr = 0;

            //init ship stats
            playerStatsById = new Dictionary <StatBoardEnum, Dictionary <int, int> >();
            Dictionary <int, int> initPrimary = new Dictionary <int, int>();
            Dictionary <int, int> initPosTime = new Dictionary <int, int>();
            Dictionary <int, int> initNegTime = new Dictionary <int, int>();
            IEnumerator           shipIds     = shipManager.ShipTable.Keys.GetEnumerator();

            shipIds.Reset();
            while (shipIds.MoveNext())
            {
                initPrimary.Add((int)shipIds.Current, 0);
                initPosTime.Add((int)shipIds.Current, 0);
                initNegTime.Add((int)shipIds.Current, 0);
            }

            playerStatsById.Add(StatBoardEnum.PrimaryScore, initPrimary);
            playerStatsById.Add(StatBoardEnum.PositiveTime, initPosTime);
            playerStatsById.Add(StatBoardEnum.NegativeTime, initNegTime);
        }
コード例 #2
0
        public void PrepareGameInstance()
        {
            // physics system
            InitializePhysics();

            // various other things
            frameTimer = new Mogre.Timer();

            serverShipMgr = new ServerShipManager(world, eventMgr, netServer);
            mode          = new GameModeFactory(eventMgr, serverShipMgr).CreateMode(netServer.GameMode);
        }
コード例 #3
0
        public void PrepareGameInstance()
        {
            // physics system
            InitializePhysics();

            // various other things
            frameTimer = new Mogre.Timer();

            serverShipMgr = new ServerShipManager(world, eventMgr, netServer);
            mode = new GameModeFactory(eventMgr, serverShipMgr).CreateMode(netServer.GameMode);
        }
コード例 #4
0
ファイル: GameGoalManager.cs プロジェクト: andyhebear/ymfas
        public Shadow(EventManager eventManager, ServerShipManager shipManager, int sendRate)
        {
            eventMgr = eventManager;
            shipMgr = shipManager;
            msgRate = sendRate;
            processCtr = 0;

            //init ship stats
            playerStatsById = new Dictionary<StatBoardEnum, Dictionary<int, int>>();
            Dictionary<int, int> initPrimary = new Dictionary<int, int>();
            Dictionary<int, int> initPosTime = new Dictionary<int, int>();
            Dictionary<int, int> initNegTime = new Dictionary<int, int>();
            IEnumerator shipIds = shipManager.ShipTable.Keys.GetEnumerator();
            shipIds.Reset();
            while (shipIds.MoveNext()) {
                initPrimary.Add((int)shipIds.Current, 0);
                initPosTime.Add((int)shipIds.Current, 0);
                initNegTime.Add((int)shipIds.Current, 0);
            }

            playerStatsById.Add(StatBoardEnum.PrimaryScore, initPrimary);
            playerStatsById.Add(StatBoardEnum.PositiveTime, initPosTime);
            playerStatsById.Add(StatBoardEnum.NegativeTime, initNegTime);
        }
コード例 #5
0
ファイル: GameModes.cs プロジェクト: andyhebear/ymfas
 public GameModeFactory(EventManager eventManager, ServerShipManager serverShipManager)
 {
     eventMgr = eventManager;
     shipMgr = serverShipManager;
 }
コード例 #6
0
ファイル: GameGoalManager.cs プロジェクト: andyhebear/ymfas
 public GameModeFactory(EventManager eventManager, ServerShipManager serverShipManager)
 {
     eventMgr = eventManager;
     shipMgr  = serverShipManager;
 }