Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
        }