public Player(Color foreground, Color background) : base(new Color(237, 186, 161), background, 1) { Name = "Player"; TimeLastActed = 0; Dictionary <string, string> props = new Dictionary <string, string>(); tilesheetName = "player"; props.Add("qualities", "tilling"); Font = SadConsole.Global.Fonts["player"].GetFont(SadConsole.Font.FontSizes.Quarter); decorators = new Dictionary <string, SadConsole.CellDecorator>(); decorators.Add("eyeIris", new SadConsole.CellDecorator(Color.CornflowerBlue, 2, Microsoft.Xna.Framework.Graphics.SpriteEffects.None)); decorators.Add("eyeWhite", new SadConsole.CellDecorator(Color.White, 3, Microsoft.Xna.Framework.Graphics.SpriteEffects.None)); decorators.Add("hair", new SadConsole.CellDecorator(Color.PaleGoldenrod, 4, Microsoft.Xna.Framework.Graphics.SpriteEffects.None)); Animation.AddDecorator(0, 1, decorators["eyeWhite"], decorators["eyeIris"], decorators["hair"]); Animation.IsDirty = true; Item hoe = GameLoop.ItemLibrary["hoe_shoddy"].Clone(); Item book = GameLoop.ItemLibrary["book_incredible_tales"].Clone(); Item seed = GameLoop.ItemLibrary["seed_potato"].Clone(); Inventory.Add(book); Inventory.Add(hoe); Inventory.Add(seed); }
public TerrainFeature(Color foreground, Color background, string name, char glyph, bool blocksLOS = false, bool blocksMove = false, double weight = 1, int condition = 100, int width = 1, int height = 1, Color decoColor = new Color(), char decoGlyph = ' ', Dictionary <string, string> properties = null) : base(foreground, background, glyph) { Animation.CurrentFrame[0].Foreground = foreground; Animation.CurrentFrame[0].Background = background; Animation.CurrentFrame[0].Glyph = glyph; Weight = weight; IsBlockingLOS = blocksLOS; IsBlockingMove = blocksMove; Condition = condition; Name = name; Properties = properties; if (decoGlyph != ' ') { Animation.AddDecorator(Position.X, Position.Y, 1, new SadConsole.CellDecorator(decoColor, decoGlyph, Microsoft.Xna.Framework.Graphics.SpriteEffects.None)); DecoColor = decoColor; DecoGlyph = decoGlyph; Animation.IsDirty = true; } Components.Add(new EntityViewSyncComponent()); }
public void RefreshDecorators() { Animation.ClearDecorators(0, 1); Animation.AddDecorator(0, 1, decorators["eyeWhite"], decorators["eyeIris"], decorators["hair"]); //for (int i = 0; i < Equipped.Length; i++) { //} Animation.IsDirty = true; }