Exemplo n.º 1
0
        public World(TerrainFactory factory, int width, int height)
        {
            grassTerrain  = factory.GetTerrain("grass");
            groundTerrain = factory.GetTerrain("ground");
            waterTerrain  = factory.GetTerrain("water");

            m_width  = width;
            m_height = height;
        }
Exemplo n.º 2
0
        private void Start()
        {
            TerrainFactory factory = new TerrainFactory();

            World world = new World(factory, 10, 10);

            world.GenerateTerrain();

            Debug.Log(world.getTile(3, 5).getMoveCost());
            Debug.Log(world.getTile(1, 3).ifWater());
            Debug.Log(world.getTile(4, 9).ifGrass());
        }