public NamePlateFoes(Rectangle position, SpriteFont fontSmall, SpriteFont fontBig, string UID, int zPosition = 0) : base(position, TextureResources.Get("NamePlateBackgroundLongRed"), UID, zPosition) { current = this; foesNames = new List <TextBoardElement>(); this.fontBig = fontBig; contentRect = new Rectangle(position.Location + margin, position.Size - margin - margin); Rectangle foesRect = new Rectangle(contentRect.Location.X, contentRect.Location.Y, contentRect.Width, contentRect.Height / 6); foes = new TextBoardElement(foesRect, "Your foes are:", fontSmall, "namePlateFoes", ColorResources.White, zPosition + 1, TextBoardElement.Alignment.LeftBottom); CommandQueue.Queue(new AddToBoardCommand(foes)); UpdateColor(); }
protected void SetupNamePlates() { int margin = UnitConvert.ToAbsoluteWidth(20); Rectangle namePlateRectFoes = new Rectangle(boardRect.Right + margin, boardRect.Top + margin, ((windowWidth - boardRect.Width) / 2) - margin - margin, windowHeight / 2); NamePlateFoes namePlateFoes = new NamePlateFoes(namePlateRectFoes, FontResources.oldenburg_20, FontResources.oldenburg_30, "namePlateFoes", 1); Rectangle namePlateRectLocal = new Rectangle(margin, boardRect.Top + margin, ((windowWidth - boardRect.Width) / 2) - margin - margin, windowHeight / 4); NamePlateLocal namePlateLocal = new NamePlateLocal(namePlateRectLocal, FontResources.oldenburg_20, FontResources.oldenburg_30, "namePlateLocal", 1); PlayerManager.Instance().AddObserver(namePlateFoes); PlayerManager.Instance().AddObserver(namePlateLocal); MeepleColorClaimer.Instance().AddObserver(namePlateFoes); MeepleColorClaimer.Instance().AddObserver(namePlateLocal); CommandQueue.Queue(new AddToBoardCommand(namePlateFoes, namePlateLocal)); }