示例#1
0
        public GameplayScreen()
        {
            _state = GameState.PlayerTurn;

            _messageBox = _messageBox = new MessageBox(new Vector2(0, 628));
            Announcer.Instance.Announcement += new Announcer.AnnouncementEvent(AddAnnouncement);
            _world = new World();
            _world.AchievementUnlocked += new World.AchievementEvent(AchievementUnlocked);
            _user = new User();
            _user.UserInputReceived += new User.UserInput(UserInputReceived);
            _sideBar   = new SideBar(new Vector2(919, 0), ref _world.Player);
            _inventory = new Inventory(new Vector2(10, 30), _world.Player.Inventory);
            _spells    = new SpellBook(new Vector2(10, 400), _world.Player.Spells);
            Camera.SetWorldSize(_world.GetWorldSize().X + 120, _world.GetWorldSize().Y + 300);
            _mouse = new MouseHelper();
            _mouse.MouseButtonReleased += new MouseHelper.MouseButtonEventEvent(MouseButtonReleased);
            _achievementNotifications   = new List <AchievementNotifier>();
            _miniMap = new MiniMap(new Vector2(824, 428), _world);
            GameReference.Game.IsMouseVisible = true;
            _timeOfLastMouseMovement          = new TimeSpan();
            _previousMouseState = Mouse.GetState();

            _availableTargets   = new List <ICreature>();
            _currentTargetIndex = 0;
            _targetImage        = ContentHelper.Content.Load <Texture2D>("target");
        }
示例#2
0
        public GameplayScreen()
        {
            _state = GameState.PlayerTurn;

            _messageBox = _messageBox = new MessageBox(new Vector2(0, 628));
            Announcer.Instance.Announcement += new Announcer.AnnouncementEvent(AddAnnouncement);
            _world = new World();
            _world.AchievementUnlocked += new World.AchievementEvent(AchievementUnlocked);
            _user = new User();
            _user.UserInputReceived += new User.UserInput(UserInputReceived);
            _sideBar = new SideBar(new Vector2(919, 0), ref _world.Player);
            _inventory = new Inventory(new Vector2(10, 30), _world.Player.Inventory);
            _spells = new SpellBook(new Vector2(10, 400), _world.Player.Spells);
            Camera.SetWorldSize(_world.GetWorldSize().X + 120, _world.GetWorldSize().Y + 300);
            _mouse = new MouseHelper();
            _mouse.MouseButtonReleased += new MouseHelper.MouseButtonEventEvent(MouseButtonReleased);
            _achievementNotifications = new List<AchievementNotifier>();
            _miniMap = new MiniMap(new Vector2(824, 428), _world);
            GameReference.Game.IsMouseVisible = true;
            _timeOfLastMouseMovement = new TimeSpan();
            _previousMouseState = Mouse.GetState();

            _availableTargets = new List<ICreature>();
            _currentTargetIndex = 0;
            _targetImage = ContentHelper.Content.Load<Texture2D>("target");
        }