Beyond_Beyaan.BBLabel.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( int x, int y, string label, Color color, string &reason ) : bool
x int
y int
label string
color Color
reason string
return bool
        public bool Initialize(int x, int y, string label, Color color, out string reason)
        {
            _x = x;
            _y = y;
            _color = color;
            if (!SetText(label))
            {
                reason = "Default font not found";
                return false;
            }
            reason = null;
            return true;
        }

Same methods

BBLabel::Initialize ( int x, int y, string label, Color color, string fontName, string &reason ) : bool

Usage Example

Beispiel #1
0
        public StarSystem(string name, int id, int x, int y, Color color, string description, Random r)
        {
            this.Sprite = SpriteManager.GetSprite("Star", r);
            this.name = name;
            this.x = x;
            this.y = y;
            this.size = 1;
            ID = id;

            Color = color;

            exploredBy = new List<Empire>();
            planets = new List<Planet>();

            //type = StarType.NORMAL;

            string reason;
            StarName = new BBLabel();
            StarName.Initialize(0, 0, name, Color.White, out reason);
            EmpiresWithFleetAdjacentLastTurn = new List<Empire>();
            EmpiresWithFleetAdjacentThisTurn = new List<Empire>();
            EmpiresWithPlanetsInThisSystem = new List<Empire>();
            OwnerPercentage = new Dictionary<Empire, float>();
        }
All Usage Examples Of Beyond_Beyaan.BBLabel::Initialize