コード例 #1
0
        public TransporterEntity(IScene toTrans, DoorEntity door = null)
        {
            Display     = '@';
            toTransport = toTrans;
            the_door    = door;

            OnCollidedWith += TransporterEntity_OnCollidedWith;
        }
コード例 #2
0
        private static void SecondScene_Load()
        {
            SecondScene.Terrain.Add(new WallEntity(), new Vector(10, 10));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(11, 10));
            var door = new DoorEntity();

            SecondScene.Terrain.Add(door, new Vector(12, 10));             // <---
            SecondScene.Terrain.Add(new WallEntity(), new Vector(13, 10));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(14, 10));

            SecondScene.Terrain.Add(new WallEntity(), new Vector(10, 14));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(11, 14));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(12, 14));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(13, 14));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(14, 14));

            SecondScene.Terrain.Add(new WallEntity(), new Vector(10, 11));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(10, 12));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(10, 13));
            SecondScene.Terrain.Add(new TransporterEntity(FirstScene, door), new Vector(12, 13));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(14, 11));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(14, 12));
            SecondScene.Terrain.Add(new WallEntity(), new Vector(14, 13));
        }