コード例 #1
0
ファイル: World.cs プロジェクト: pr0gramm3r1/AngryTanks
        private Vector2     lastPlayerPosition; // TODO we shouldn't store this here

        public World(IServiceProvider iservice, ServerLink serverLink)
            : base(iservice)
        {
            this.IService = iservice;

            this.serverLink = serverLink;

            this.tiled = new List<Sprite>();
            this.stretched = new List<Sprite>();

            // initialize variable database
            // TODO need to get variables from server and stick them in this structure
            this.varDB = new VariableDatabase();

            // initialize player manager
            this.playerManager = new PlayerManager(this); 
           
            // initialize score HUD
            this.scoreHUD = new ScoreHUD(this.playerManager);

            ServerLink.MessageReceivedEvent += HandleReceivedMessage;
        }
コード例 #2
0
ファイル: World.cs プロジェクト: aotis/AngryTanks
        private Vector2     lastPlayerPosition; // TODO we shouldn't store this here

        public World(Game game, ServerLink serverLink)
            : base(game)
        {
            this.serverLink = serverLink;

            this.tiled = new List<Sprite>();
            this.stretched = new List<Sprite>();

            // initialize variable database
            // TODO need to get variables from server and stick them in this structure
            this.varDB = new VariableDatabase();

            // initialize player manager
            this.playerManager = new PlayerManager(this);
        }