Пример #1
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     ResourceLoader.LoadResources(Content);
     player = new Player();
     floor = new Floor();
     ui = new UITop(player);
     enemy = new Enemy(player);
 }
Пример #2
0
 public UITop(Player player)
     : base(ResourceLoader.UItop, new Microsoft.Xna.Framework.Point(MonsterGame.screenWidth / 2 - ResourceLoader.UItop.Width/2, 0))
 {
     this.player = player;
     Qicon = new AbilityIcon(ResourceLoader.Qicon, rect.Location + new Point(55, 9), player.abilityManager.firstAbility, player.abilityManager.levitating);
     Wicon = new AbilityIcon(ResourceLoader.Wicon, rect.Location + new Point(164, 9), player.abilityManager.secondAbility);
     Eicon = new AbilityIcon(ResourceLoader.Eicon, rect.Location + new Point(272, 9), player.abilityManager.thirdAbility, player.abilityManager.falling);
     lifeBar = new Bar(ResourceLoader.lifeBar, rect.Location + new Point(28, 82), Player.maxLife);
     energyBar = new Bar(ResourceLoader.energyBar, rect.Location + new Point(28, 107), Player.maxEnergy);
 }
Пример #3
0
 public Enemy(Player player)
     : base(ResourceLoader.enemy, new Point(0, MonsterGame.screenHeight - 64 - ResourceLoader.enemy.Height))
 {
     this.player = player;
     sword = new Cooldown(0.5f);
     bullet = new Cooldown(2);
     changeState = new Cooldown(2);
     changeDirection = new Cooldown(0.5f);
     stateSelector = new Random();
     state = EnemyState.CHASING;
 }
Пример #4
0
        public AbilityManager(Player player)
        {
            this.player = player;
            levitating = new Cooldown(10);
            firstAbility = new Cooldown(15);
            secondAbility = new Cooldown(8);
            falling = new Cooldown(4);
            thirdAbility = new Cooldown(20);

            selector = new Selector(player);
            cloud = new Cloud(player.Rect.Location);
        }
Пример #5
0
        public void CheckGrounded(Player player)
        {
            foreach (BaseTile tile in tiles)
            {
                if (tile.Rect.Intersects(player.Rect))
                {
                    player.IsGrounded = true;
                    player.Y = tile.Rect.Y - player.Rect.Width;
                    return;

                }
            }
        }
Пример #6
0
 public Selector(Player player)
     : base(ResourceLoader.selector,  player.Rect.Location)
 {
     this.player = player;
 }
Пример #7
0
 public PlayerInput(Player player)
 {
     this.player = player;
 }
Пример #8
0
 public PlayerPhysics(Player player)
 {
     this.player = player;
     YSpeed = 0;
 }
 public MovementController(Player player)
 {
     this.player = player;
 }