Example #1
0
        private GameObjectWithData CreateGameObject(string name, Entity data)
        {
            var toReturn = new GameObjectWithData(Engine.DefaultFont, data);

            toReturn.Name = name;
            toReturn.DrawAs(data.DisplayCharacter, new Color(data.Colour.R, data.Colour.G, data.Colour.B));
            toReturn.IsVisible = false;
            toReturn.Position  = new Point(data.X, data.Y);
            this.objects.Add(toReturn);
            return(toReturn);
        }
Example #2
0
        private GameObjectWithData CreateGameObject(string name, char display, Color colour, Point?position = null)
        {
            var toReturn = new GameObjectWithData(Engine.DefaultFont, null);

            toReturn.Name = name;
            toReturn.DrawAs(display, colour);
            toReturn.IsVisible = false;
            if (position != null)
            {
                toReturn.Position = position.Value;
            }

            this.objects.Add(toReturn);
            return(toReturn);
        }