Example #1
0
        public PlayerManager(Player player, ContentManager cm, int health, int mana, int experience, DisplayBar healthBar, DisplayBar manaBar, KeyBox keyBox, PowerBar powerbar)
        {
            this.player     = player;
            this.health     = health;
            this.mana       = mana;
            this.experience = experience;
            this.healthBar  = healthBar;
            this.manaBar    = manaBar;
            this.keyBox     = keyBox;
            this.powerbar   = powerbar;
            this.totalMana  = 100;
            SlowTime slow = new SlowTime(20, 200, 200);

            slow.setEffect(cm.Load <SoundEffect>("audio/Sound Effects/slowSound"));
            slow.setPlayerManager(this);
            Dash dash = new Dash(5, 20, 15);

            dash.setEffect(cm.Load <SoundEffect>("audio/Sound Effects/dashSound"));
            dash.setPlayerManager(this);
            Confuse confuse = new Confuse(20, 200, 50);

            confuse.setEffect(cm.Load <SoundEffect>("audio/Sound Effects/paralyzeSound"));
            confuse.setPlayerManager(this);
            powers = new List <BasePower> {
                slow, dash, confuse
            };
            this.manaLimit   = true;
            this.healthLimit = true;
        }
 public PlayerManager(Player player, ContentManager cm, int health, int mana, int experience, DisplayBar healthBar, DisplayBar manaBar, KeyBox keyBox, PowerBar powerbar)
 {
     this.player = player;
     this.health = health;
     this.mana = mana;
     this.experience = experience;
     this.healthBar = healthBar;
     this.manaBar = manaBar;
     this.keyBox = keyBox;
     this.powerbar = powerbar;
     this.totalMana = 100;
     SlowTime slow = new SlowTime(20, 200, 200);
     slow.setEffect(cm.Load<SoundEffect>("audio/Sound Effects/slowSound"));
     slow.setPlayerManager(this);
     Dash dash = new Dash(5, 20, 15);
     dash.setEffect(cm.Load<SoundEffect>("audio/Sound Effects/dashSound"));
     dash.setPlayerManager(this);
     Confuse confuse = new Confuse(20, 200, 50);
     confuse.setEffect(cm.Load<SoundEffect>("audio/Sound Effects/paralyzeSound"));
     confuse.setPlayerManager(this);
     powers = new List<BasePower> { slow, dash, confuse };
     this.manaLimit = true;
     this.healthLimit = true;
 }
Example #3
0
 /// <summary>
 /// Sets the npc's display bar
 /// </summary>
 /// <param name="bar">The display bar to set</param>
 public void setDisplayBar(DisplayBar bar)
 {
     healthBar = bar;
 }
Example #4
0
 /// <summary>
 /// Sets the npc's display bar
 /// </summary>
 /// <param name="bar">The display bar to set</param>
 public void setDisplayBar(DisplayBar bar)
 {
     healthBar = bar;
 }
Example #5
0
 public PlayerManager(Player player, ContentManager cm, DisplayBar healthBar, DisplayBar manaBar, KeyBox keyBox, PowerBar powerbar) :
     this(player, cm, 100, 100, 0, healthBar, manaBar, keyBox, powerbar)
 {
 }
 public PlayerManager(Player player, ContentManager cm, DisplayBar healthBar, DisplayBar manaBar, KeyBox keyBox, PowerBar powerbar)
     : this(player, cm, 100, 100, 0, healthBar, manaBar, keyBox, powerbar)
 {
 }