Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var tiles = new Dictionary <Tile, Image>
            {
                [Tile.Ground]   = Properties.Resources.floor,
                [Tile.Wall]     = Properties.Resources.brick,
                [Tile.Pavement] = Properties.Resources.trotuar,
                [Tile.Road]     = Properties.Resources.road,
                [Tile.Grass]    = Properties.Resources.grass,
                [Tile.BeerSign] = Properties.Resources.neon_beer,
                [Tile.ShopSign] = Properties.Resources.neon_store,
                [Tile.Bottles]  = Properties.Resources.bottles,
                [Tile.Door]     = Properties.Resources.door,
                [Tile.Win]      = Properties.Resources.Win,
                [Tile.Trash]    = Properties.Resources.trash
            };

            var bodies = new Dictionary <Type, Image>
            {
                [typeof(Player)] = Properties.Resources.dead
            };

            var pictureLibrary = new PictureLibrary(tiles, bodies, new Bitmap(32, 32));

            var tilesArrary = MapParser.ParseFromFile("map.txt");
            var map         = new Map(tilesArrary, new Player(new Point(1000, 1000), tilesArrary), new Body[0]);

            Application.Run(new MainForm(map, new Drawer(pictureLibrary, 64)));
        }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (placeInfo.pictureLibrary != null)
     {
         picture = placeInfo.pictureLibrary;
     }
 }
Beispiel #3
0
        public MindMap()
        {
            NamedTopics      = new Dictionary <string, Topic>();
            ExtendAttributes = new Dictionary <string, string>();
            _PictureLibrary  = new PictureLibrary();

            Root      = new Topic();
            Root.Type = TopicType.TopEvent;
            Root.ResetPadding();

            Topic hazardTopic = new Topic();

            hazardTopic.Type = TopicType.Hazard;
            Root.Children.Add(hazardTopic);

            for (int i = 0; i < 2; i++)
            {
                Topic subTopic = new Topic();
                subTopic.Type = TopicType.Threat;
                Root.Children.Add(subTopic);

                subTopic      = new Topic();
                subTopic.Type = TopicType.Consequence;
                Root.Children.Add(subTopic);
            }
        }
Beispiel #4
0
        public MindMap()
        {
            NamedTopics      = new Dictionary <string, Topic>();
            ExtendAttributes = new Dictionary <string, string>();
            _PictureLibrary  = new PictureLibrary();

            Root = new Topic();
            Root.ResetPadding();
        }
Beispiel #5
0
        public MindMap(Topic root, string name)
        {
            NamedTopics      = new Dictionary <string, Topic>();
            ExtendAttributes = new Dictionary <string, string>();
            _PictureLibrary  = new PictureLibrary();
            Name             = name;

            if (root != null)
            {
                Root = root;
            }
            else
            {
                Root = new Topic();
            }
            Root.ResetPadding();
        }
 // Start is called before the first frame update
 void Start()
 {
     activeLibraryName = PlayerPrefs.GetString("PicLibrary");
     foreach (PictureLibrary i in pictureLibraryLib)
     {
         if (i.name == activeLibraryName)
         {
             activeLibrary = i;
         }
         else
         {
             continue;
         }
     }
     page = 0;
     updateUI();
 }
Beispiel #7
0
 public ChartPage()
 {
     PictureLibrary = new PictureLibrary();
     _PageSize      = new Size(1124, 796);
 }