Last active
February 12, 2019 06:47
-
-
Save jminor/cfaac5ed9c8307d573b1eaf729b11ab5 to your computer and use it in GitHub Desktop.
Amulet shared game. See http://www.amulet.xyz for more info.
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
win = am.window{title = "Touch", | |
clear_color = vec4(1)} | |
face_img = [[ | |
........BBBBBBBBBB................. | |
.....BBBBBBBBBBBBBBBBBBB........... | |
...BBBBBBBBBBBBBBBBBBBBBBBBB....... | |
..BBBBBBBBBBBBBBBBBBBBBBBBBBB...... | |
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBB..... | |
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.... | |
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | |
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | |
BBBBKKKKKKKKBBBBBBBBBBBBBBBBBBBB... | |
BBBBBKBKBKBKBBBBBBBBBBBBBBBBBBBBBBB | |
BBBBBBBBBBBBCBBBBBBBKKKKKKKKBBBBBBB | |
BBBBBBBBBBBCBBBBBBBBBKBKBKBKBBBBBBB | |
BBBBBBBBBBBCBBBBBBBBBBBBBBBBBBBBBBB | |
BBBBBBBBBBCCBBBBCBBBBBBBBBBBBBBBBBB | |
BBBBBBBBBBCBBBBCCCCBBBBBBBBBBBBBBBB | |
BBBBBBBBBCCBBBBBBBCBBBBBBBBBBBBBBBB | |
BBBBBBBBBCBBBBBBBCCBBBBBBBBBBBBBB.. | |
BBBBBBBBBCCCCCCCCCBBBBBBBBBBBBBBB.. | |
BBBBRRRRRRRRRRRRRRRRRRRRRRRRBBBBB.. | |
BBBBRKKWKWKWWKWWWKWKWKWKWKWRBBBBB.. | |
BBBBRKKKKKKKKKKKKKKKKKKKKKKRBBBBB.. | |
BBBBRWKWKWKWWKWWKWWKWWWKWKWRBBBBB.. | |
BBBBRRRRRRRRRRRRRRRRRRRRRRRRBBBBB.. | |
..BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | |
...BBBBBBBBBBBBBBBBBBBBBBBBBBBB.... | |
......BBBBBBBBBBBBBBBBBBBBBBBB..... | |
]] | |
eye_img = [[ | |
.K.K.K.K. | |
.KKKKKKK. | |
KYYYYYYYK | |
KYYYRRYYK | |
KYYRRRRYK | |
KYYRWRRYK | |
KYYYRRYYK | |
KYYYYYYYK | |
.KKKKKKK. | |
.K.K.K.K. | |
]] | |
face = am.translate(0, 0) ^ am.scale(4) ^ { | |
am.sprite(face_img) | |
, | |
am.translate(-9, 4):tag"left_eye" | |
^ am.sprite(eye_img) | |
, | |
am.translate(6, 3):tag"right_eye" | |
^ am.sprite(eye_img) | |
, | |
} | |
face"left_eye".hidden = true | |
face"right_eye".hidden = true | |
face:action(function() | |
face.position2d = win:touch_position() + vec2(0,100) | |
face"left_eye".hidden = not win:touch_active(1) | |
face"right_eye".hidden = not win:touch_active(2) | |
end) | |
win.scene = face |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment