public void ActorOutOfRangeIsObstacle(int x, int y, bool valid)
        {
            SimpleTileLayer layer = new SimpleTileLayer(LayerType.All, 7, 7);

            if (valid)
                Assert.IsNotType<Obstacle>(layer.GetActorAt(x, y));
            else
                Assert.IsType<Obstacle>(layer.GetActorAt(x, y));
        }
        public void TestGetActor()
        {
            SimpleTileLayer layer = new SimpleTileLayer(LayerType.All, 7, 7);
            PathTile path = new PathTile(0);
            layer.Tiles[3][2] = path;

            Assert.Equal(path, layer.GetActorAt(3, 2));
            Assert.Equal(path, layer.GetActorAt(new Vector2I(3, 2)));
        }
Exemple #3
0
        public void TestGetActor()
        {
            SimpleTileLayer layer = new SimpleTileLayer(LayerType.All, 7, 7);
            PathTile        path  = new PathTile(0);

            layer.Tiles[3][2] = path;

            Assert.Equal(path, layer.GetActorAt(3, 2));
            Assert.Equal(path, layer.GetActorAt(new Vector2I(3, 2)));
        }
Exemple #4
0
        public void ActorOutOfRangeIsObstacle(int x, int y, bool valid)
        {
            SimpleTileLayer layer = new SimpleTileLayer(LayerType.All, 7, 7);

            if (valid)
            {
                Assert.IsNotType <Obstacle>(layer.GetActorAt(x, y));
            }
            else
            {
                Assert.IsType <Obstacle>(layer.GetActorAt(x, y));
            }
        }