/// <summary> /// /// </summary> /// <param name="type"></param> public EnergyBarDecoration(DecorationTypeEnum type, Func <float> currentEnergy, Func <float> maxEnergy, float width, float height, CCColor4B background, CCColor4B foreground, CCColor4B textColor) : base(type, new EnergyBar(width, height)) { BackgroundColor = background; ForegroundColor = foreground; TextColor = textColor; Node.Initialize(currentEnergy, maxEnergy, () => BackgroundColor, () => ForegroundColor, () => TextColor); }
/// <summary> /// /// </summary> /// <param name="type"></param> /// <param name="text"></param> /// <param name="color"></param> public LabeledDecoration(DecorationTypeEnum type, Func <string> text, Func <CCColor3B> color) : base(type, new Label(text(), color())) { TextHolder = text; ColorHolder = color; }
/// <summary> /// /// </summary> /// <param name="node"></param> public EntityDecoration(DecorationTypeEnum type, T node) { DecorationType = (int)type; Node = node; Node.AnchorPoint = CCPoint.AnchorMiddle; }