public override void Consume(Event e) { switch (e.Type) { case Event.EventType.CorruptNode: dirty_tree = true; GetDistanceFunction(); break; case Event.EventType.UpdateDistanceFunction: GetDistanceFunction(); break; case Event.EventType.NodesSpawned: dirty_tree = true; GetDistanceFunction(); diffusion_handler.DrawCenter(); break; case Event.EventType.NodeDestroyed: dirty_tree = true; GetDistanceFunction();; break; default: break; } }
public void UpdateMaterials(int r, int c) { diffusion_handler._ROWS = r; diffusion_handler._COLS = c; fungusRenderer.SetTextureResolution(r, c); DisplayMaterial.SetInt("_Rows", r); DisplayMaterial.SetInt("_Cols", c); diffusion_handler.InitializeTextures(); diffusion_handler.DrawCenter(); }
public IEnumerator delayed_Draw() { yield return(new WaitForSeconds(1)); diffusion_handler.DrawCenter(); }