Last active
April 29, 2024 19:26
-
-
Save hobione2k/b39af1af0574ae06b08db0f25d2c5353 to your computer and use it in GitHub Desktop.
ClusterScript-シグナル検出
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const detectSignal = (n) => { | |
const sg = $.getStateCompat("this", n, T.double); | |
const ky = `last_${n}`; | |
const lsg = $.getStateCompat("this", ky, T.double); | |
if (sg > lsg) { | |
$.setStateCompat("this", ky, sg); | |
return true; | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使い方
thisのみ対応
globalの場合、GlobalLogicとかでthisに変換してあげる必要がある。