public GameStateManager(GraphicsDeviceManager man,ContentManager cman,MineWorldClient gam)
        {
            Audiomanager = new AudioManager();
            Config = new ConfigFile("data/settings.ini");
            _inputhelper = new InputHelper();
            Game = gam;
            Conmanager = cman;
            Graphics = man;
            Device = Graphics.GraphicsDevice;
            SpriteBatch = new SpriteBatch(Device);
            _screens = new BaseState[]
                           {
                               new TitleState(this, GameState.TitleState),
                               new MainMenuState(this, GameState.MainMenuState),
                               new LoadingState(this, GameState.LoadingState),
                               new MainGameState(this, GameState.MainGameState),
                               new SettingsState(this, GameState.SettingsState),
                               _serverbrowsingstate = new ServerBrowsingState(this, GameState.ServerBrowsingState),
                               _errorstate = new ErrorState(this, GameState.ErrorState)
                           };
            //curScreen = titlestate;
            Pbag = new PropertyBag(gam,this);

            //Set initial state in the manager itself
            SwitchState(GameState.TitleState);
        }
 public ClientListener(NetClient netc, PropertyBag pb)
 {
     _client = netc;
     _pbag = pb;
 }
Exemple #3
0
 public ClientSender(NetClient netc, PropertyBag pb)
 {
     _client = netc;
     _pbag = pb;
 }
Exemple #4
0
 public Debug(PropertyBag gameIn)
 {
     _game = gameIn;
 }
Exemple #5
0
 //Constructor
 public Player(PropertyBag gameIn)
 {
     Cam = new Camera(gameIn, new Vector3(0, 64, 0), new Vector3(0, 0, 0));
     _game = gameIn;
 }
Exemple #6
0
 /// <summary>
 /// Creates a 3D camera object
 /// </summary>
 /// <param name="game">Game reference</param>
 /// <param name="pos">Camera position</param>
 /// <param name="ang">Camera angle</param>
 public Camera(PropertyBag game, Vector3 pos, Vector3 ang)
 {
     _pos = pos;
     _ang = ang;
     SetPerspective(MathHelper.ToRadians(90),game.GameManager.Device.Viewport.AspectRatio, 0.01f, 100000.0f);
 }