示例#1
0
        public void PlaceFootprint(Footprint fp)
        {
            if (fp == null)
            {
                return;
            }

            FootprintSprite = fp.Sprite;

            switch (fp.Direction)
            {
            case Direction.Down:
                footprintRotation = 3.1f;
                break;

            case Direction.Right:
                footprintRotation = 1.6f;
                break;

            case Direction.Up:
                footprintRotation = 0f;
                break;

            case Direction.Left:
                footprintRotation = 4.7f;
                break;
            }

            Footprint = fp;
        }
示例#2
0
        public Room1(ContentManager content) : base(content)
        {
            Texture2D fp1 = content.Load <Texture2D> ("Sprites/Prints/Print1");

            Footprints [0, 1]   = new Footprint(fp1, Direction.Down);
            Footprints [0, 2]   = new Footprint(fp1, Direction.Down);
            Footprints [0, 3]   = new Footprint(fp1, Direction.Down);
            Footprints [0, 4]   = new Footprint(fp1, Direction.Down);
            Footprints [0, 5]   = new Footprint(fp1, Direction.Down);
            Footprints [1, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [2, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [3, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [4, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [5, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [6, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [7, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [8, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [9, 5]   = new Footprint(fp1, Direction.Right);
            Footprints [10, 5]  = new Footprint(fp1, Direction.Right);
            Footprints [11, 5]  = new Footprint(fp1, Direction.Right);
            Footprints [11, 6]  = new Footprint(fp1, Direction.Down);
            Footprints [11, 7]  = new Footprint(fp1, Direction.Down);
            Footprints [11, 8]  = new Footprint(fp1, Direction.Down);
            Footprints [11, 9]  = new Footprint(fp1, Direction.Down);
            Footprints [11, 10] = new Footprint(fp1, Direction.Down);
            Footprints [11, 11] = new Footprint(fp1, Direction.Down);

            SetFinishTile(Tiles [11, 11]);
            PlaceFootprints();
        }