Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="label">Label</param>
 public TextButton(TextLabel label, Color hoverColor)
     : base(hoverColor)
 {
     this.Label = label;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="body"></param>
        /// <param name="model"></param>
        /// <param name="team"></param>
        protected AbstractPlayer(AbstractBody body, PrimitiveBuilder model, AbstractTeam team, AbstractTeam enemyTeam)
            : base(body, model)
        {
            this.Team = team;
            this.EnemyTeam = enemyTeam;
            this.Health = AppSettingsFacade.PlayerHealth;

            this.HealthLabel = new TextLabel(String.Empty,
                SpriteFontRepository.Instance.Get("test"),
                Vector2.Zero,
                LabelAlignment.Center,
                Color.White);

            this._messageQueue = new TextLabelQueue(
                SpriteFontRepository.Instance.Get("test"),
                Vector2.Zero,
                LabelAlignment.Center,
                Color.White,
                3000);

            this._healthBar = new CircleProgressBar(new Color(20, 20, 30));

            EntityTable.Instance.Add(this.Body, this);

            this.IsAlive = true;
        }