Exemple #1
0
    public void Init()
    {
        // Gen mesh, then build a texture, then finally init the physics class.
        Mesh.GenMesh();
        Texture.BuildTexture();
        Physics.BuildMap();

        gameObject.name = "Chunk (" + X + ", " + Y + ")";

        // Set position
        transform.localPosition = new Vector3(X * Width * Mesh.TileSize, Y * Height * Mesh.TileSize, 0);
    }