示例#1
0
 public PlayerPreviewView(GameScreen screen, Player player)
     : base(screen)
 {
     this.player = player;
     Position = new Vector2(140, 10);
     LoadContent();
 }
示例#2
0
 public CommandSelectView(GameScreen screen, PlayerView playerView)
     : base(screen)
 {
     this.playerView = playerView;
     selectedIndex = 0;
     LoadContent();
 }
示例#3
0
 public CommandSerifView(GameScreen screen, Command command, CharacterView characterView)
     : base(screen)
 {
     this.command = command;
     this.characterView = characterView;
     LoadContent();
 }
示例#4
0
 public CharacterView(Character character, Vector2 position, GameScreen screen)
     : base(screen, position)
 {
     this.character = character;
     characterPosition = Vector2.Zero;
     statusVisible = false;
 }
示例#5
0
 public JobPreviewView(GameScreen screen, Player player)
     : base(screen)
 {
     this.player = player;
     this.job = player.Job;
     Position = new Vector2(15, 57);
     LoadContent();
 }
示例#6
0
文件: View.cs 项目: wanpark/pre-rpg
        public View(GameScreen screen, Vector2 position)
        {
            this.screen = screen;
            this.position = position;
            this.visible = true;

            effects = new List<Effect>();
        }
示例#7
0
        public JobCharacterView(Character character, GameScreen screen, Vector2 position, bool isMirrorTexture)
            : base(character, position, screen)
        {
            mirroring = isMirrorTexture ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
            LoadContent();

            Character.JobChanged += (sender, args) => LoadJobTexture();
        }
示例#8
0
        /// <summary>
        /// The constructor is private: loading screens should
        /// be activated via the static Load method instead.
        /// </summary>
        private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow,
            GameScreen[] screensToLoad)
            : base("Loading")
        {
            this.loadingIsSlow = loadingIsSlow;
            this.screensToLoad = screensToLoad;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
        }
示例#9
0
        public CommandEffectView(GameScreen screen, Command command, CharacterView characterView)
            : base(screen)
        {
            this.command = command;
            this.characterView = characterView;

            int diff = (command.Target is Player) ? 10 : -10;
            characterView.CharacterPosition = new Vector2(diff, 0);
            elapsed = 0;
            active = true;
        }
示例#10
0
        public PlayerView(Player player, GameScreen screen, Vector2 position)
            : base(player, position, screen)
        {
            fieldView = new FieldPlayerView(player, screen, position);
            battleView = new BattlePlayerView(player, screen, position);

            fieldView.TransformEnd += onTransformEnd;

            CurrentView = fieldView;

            player.Died += onDied;
        }
示例#11
0
        public JobTreeItemView(GameScreen screen, Job job, int row, int col)
            : base(screen)
        {
            this.job = job;
            this.row = row;
            this.col = col;
            Position = new Vector2(140 + col * 90, 57 + row * 20);
            LoadContent();

            selected = false;
            active = false;
        }
示例#12
0
        public JobTreeView(GameScreen screen, List<Job> jobs)
            : base(screen)
        {
            items = new JobTreeItemView[jobs.Count/COLS+1, COLS];
            itemsForJob = new Dictionary<Job, JobTreeItemView>();

            int i = 0;
            for (int row = 0; row < items.GetLength(0); row++)
            {
                for (int col = 0; col < items.GetLength(1); col++)
                {
                    items[row, col] = itemsForJob[jobs[i]] = new JobTreeItemView(Screen, jobs[i], row, col);
                    if (++i >= jobs.Count)
                        goto END_CREAETE_ITEM;
                }
            }
            END_CREAETE_ITEM: ;
        }
示例#13
0
        public CommandTargetSelectView(GameScreen screen, List<PlayerView> players, List<EnemyView> enemies)
            : base(screen)
        {
            this.players = new List<CharacterView>();
            foreach (CharacterView view in players)
            {
                this.players.Add(view);
            }
            this.enemies = new List<CharacterView>();
            foreach (CharacterView view in enemies)
            {
                this.enemies.Add(view);
            }

            selectedParty = Party.Enemies;
            selectedIndex = enemies.Count - 1;
            SelectNext();

            LoadContent();
        }
示例#14
0
文件: View.cs 项目: wanpark/pre-rpg
 public View(GameScreen screen)
     : this(screen, Vector2.Zero)
 {
 }
示例#15
0
 public ForwardArrowView(GameScreen screen)
     : base(screen)
 {
     LoadContent();
 }
示例#16
0
 public EnemyView(Enemy enemy, GameScreen screen, Vector2 position)
     : base(enemy, screen, position, false)
 {
 }
示例#17
0
        /// <summary>
        /// Removes a screen from the screen manager. You should normally
        /// use GameScreen.ExitScreen instead of calling this directly, so
        /// the screen can gradually transition off rather than just being
        /// instantly removed.
        /// </summary>
        public void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (isInitialized)
            {
                screen.UnloadContent();
            }

            screens.Remove(screen);
            screensToUpdate.Remove(screen);
        }
示例#18
0
 public JobSelectView(GameScreen screen)
     : base(screen)
 {
     LoadContent();
 }
示例#19
0
        /// <summary>
        /// Adds a new screen to the screen manager.
        /// </summary>
        public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer)
        {
            screen.ControllingPlayer = controllingPlayer;
            screen.ScreenManager = this;
            screen.IsExiting = false;

            // If we have a graphics device, tell the screen to load content.
            if (isInitialized)
            {
                screen.LoadContent();
            }

            screens.Add(screen);
        }
示例#20
0
 public BattlePlayerView(Player player, GameScreen screen, Vector2 position)
     : base(player, screen, position, true)
 {
     player.JobMaster += onJobMaster;
 }
示例#21
0
 public CharacterSelectView(GameScreen screen)
     : base(screen)
 {
     ClearSelection();
     LoadContent();
 }
示例#22
0
 public FieldPlayerView(Player player, GameScreen screen, Vector2 position)
     : base(player, position, screen)
 {
     LoadContent();
 }