Exemplo n.º 1
0
 public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     if (hover)
     {
         spriteBatch.Draw(SPR_CIRCLE, GlobalPosition, null, null, new Vector2(SPR_CIRCLE.Width / 2, SPR_CIRCLE.Height / 2), 0f, new Vector2(1f, 0.5f) * ((float)TowerRange(type, stats) / ((float)SPR_CIRCLE.Width / 2)), new Color(0.2f, 0.2f, 0.2f, 0.05f));
     }
     spriteBatch.Draw(baseTexture, myNode.GlobalPosition + NODE_SIZE.toVector() / 2 + new Vector2(30, -40), null, null, new Vector2(baseTexture.Width / 2, baseTexture.Height / 2), (float)Math.PI / 6, new Vector2(1, 1.2f), Color.Black * 0.35f);
     spriteBatch.Draw(baseTexture, myNode.GlobalPosition + NODE_SIZE.toVector() / 2 + new Vector2(10, -30), null, null, new Vector2(baseTexture.Width / 2, baseTexture.Height / 2));
     base.Draw(gameTime, spriteBatch);
 }
Exemplo n.º 2
0
    public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
    {
        spriteBatch.Draw(LIST_TEXTURES[texture], GlobalPosition + origin + offset, null, Color.White, 0f, origin, NODE_SIZE.toVector() / IMAGE_NODE_SIZE.toVector(), SpriteEffects.None, 0);
        //DrawingHelper.DrawText(spriteBatch, FNT_LEVEL_BUILDER, "D: " + Dval.ToString(), GlobalPosition + new Vector2(30, 10), Color.Red);
        if (selected)
        {
            spriteBatch.Draw(LIST_TEXTURES[texture], GlobalPosition + origin + offset, null, Color.Black * 0.4f, 0f, origin, NODE_SIZE.toVector() / IMAGE_NODE_SIZE.toVector(), SpriteEffects.None, 0);
        }

        if (beacon)
        {
            spriteBatch.Draw(LIST_TEXTURES[texture], GlobalPosition + origin + offset, null, Color.Blue * 0.4f, 0f, origin, NODE_SIZE.toVector() / IMAGE_NODE_SIZE.toVector(), SpriteEffects.None, 0);
        }
        base.Draw(gameTime, spriteBatch);
    }