public Player(Texture2D texture, Vector2 position) : base(texture, position, new Vector2(70, 130)) { weapon = new Weapon(this, GameplayScreen.main.content.Load<Texture2D>("Weapon/rifle"), new Vector2(5,35), new Vector2(100,30)); healthBar = new Health(this); this.setDead(false); this.AddChild(weapon); this.AddChild(healthBar); this.setBulletType(BulletType.NORMAL, 15.0f); }
public Enemy(Texture2D texture, Vector2 Position, Vector2 Size, float speed) : base(texture, Position, Size) { this.speed = speed; this.currentState = CharacterState.MOVELEFT; healthBar = new Health(this); this.AddChild(healthBar); this.isAlive = false; this.setDead(false); }