mail@pastecode.io avatar
unknown
plain_text
7 months ago
452 B
4
Indexable
Never
function CtoF (degC: number) {
    outF = degC * (1.8 + 32)
    mySprite.sayText(outF)
}
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
    FtoC(80)
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    CtoF(24)
})
function FtoC (degF: number) {
    outC = (degF - 32) / 1.8
    mySprite.sayText(outC)
}
let outC = 0
let outF = 0
let mySprite: Sprite = null
mySprite = sprites.create(img`
    `, SpriteKind.Player)