Skip to content

Instantly share code, notes, and snippets.

@DjPale
Created April 14, 2016 18:20
Show Gist options
  • Select an option

  • Save DjPale/8910f9f5ce2f3a66a95381d101c054fd to your computer and use it in GitHub Desktop.

Select an option

Save DjPale/8910f9f5ce2f3a66a95381d101c054fd to your computer and use it in GitHub Desktop.
public static function apply_tile_shader(map: TiledMap, shader: phoenix.Shader)
{
if (map.visual == null) return;
var layers = map.visual.geometry.keys();
for (lname in layers)
{
for (row in map.visual.geometry[lname])
{
for (geom in row)
{
geom.shader = shader;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment