Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

29
LINES

< > BotCompany Repo | #1034204 // G22Challenge

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (20801L) is out of date.

// script that makes randomized images
concept G22Challenge > G22LAScript {
  S type = "Single Image";
  bool usesRNG;
  
  // types
  sS type_singleImage = "Single Image";
  sS type_animation = "Animation";
  static LS types = ll(type_singleImage, type_animation);
  
  void _onChange :: after {
    lvType?.set(type);
    lvUsesRNG?.set(usesRNG);
  }
  
  transient SimpleLiveValue<S> lvType;
  synchronized SimpleLiveValue<S> lvType() {
    ret lvType if null = new SimpleLiveValue(S, type).onChange(r {
      setField(type := lvType!);
    });
  }
  
  transient SimpleLiveValue<Bool> lvUsesRNG;
  synchronized SimpleLiveValue<Bool> lvUsesRNG() {
    ret lvUsesRNG if null = new SimpleLiveValue(Bool, usesRNG).onChange(r {
      setField(usesRNG := lvUsesRNG!);
    });
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034204
Snippet name: G22Challenge
Eternal ID of this version: #1034204/13
Text MD5: 2d4ecae3c3c993b59b9c9acd2ed13118
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-03 09:51:48
Source code size: 807 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 171 / 330
Version history: 12 change(s)
Referenced in: [show references]