init static method

void init({
  1. String? imageDir,
  2. String? audioDir,
  3. String? videoDir,
  4. String? fontDir,
  5. String? animDir,
  6. String? otherDir,
})

Implementation

static void init({
  String? imageDir,
  String? audioDir,
  String? videoDir,
  String? fontDir,
  String? animDir,
  String? otherDir,
}){
  if(imageDir!=null) imageRoot = imageDir;
  if(audioDir!=null) audioRoot = audioDir;
  if(videoDir!=null) videoRoot = videoDir;
  if(fontDir!=null) fontRoot = fontDir;
  if(animDir!=null) animRoot = animDir;
  if(otherDir!=null) otherRoot = otherDir;

  imageRoot = imageRoot.endsWith("/") ? imageRoot : "$imageRoot/";
  audioRoot = audioRoot.endsWith("/") ? audioRoot : "$audioRoot/";
  videoRoot = videoRoot.endsWith("/") ? videoRoot : "$videoRoot/";
  fontRoot = fontRoot.endsWith("/") ? fontRoot : "$fontRoot/";
  animRoot = animRoot.endsWith("/") ? animRoot : "$animRoot/";
  otherRoot = otherRoot.endsWith("/") ? otherRoot : "$otherRoot/";
}