-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71a60c6
commit 56efce9
Showing
5 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["variabila mea",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"assetId":"cd21514d0531fdffb22204e0ec5ed84a","name":"decor1","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","dataFormat":"svg","rotationCenterX":240,"rotationCenterY":180}],"sounds":[{"assetId":"83a9787d4cb6f3b7632b4ddfebf74367","name":"pop","dataFormat":"wav","format":"","rate":44100,"sampleCount":1032,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null},{"isStage":false,"name":"Personaj1","variables":{},"lists":{},"broadcasts":{},"blocks":{"[_TPYe1f0U#J6fC3Z-H9":{"opcode":"event_whenflagclicked","next":"TrO*p@+rW#b|n.cRboA$","parent":null,"inputs":{},"fields":{},"shadow":false,"topLevel":true,"x":227,"y":227},"TrO*p@+rW#b|n.cRboA$":{"opcode":"looks_switchcostumeto","next":null,"parent":"[_TPYe1f0U#J6fC3Z-H9","inputs":{"COSTUME":[1,"qC-grBho7d-C}[D}D5+c"]},"fields":{},"shadow":false,"topLevel":false},"qC-grBho7d-C}[D}D5+c":{"opcode":"looks_costume","next":null,"parent":"TrO*p@+rW#b|n.cRboA$","inputs":{},"fields":{"COSTUME":["costum1",null]},"shadow":true,"topLevel":false},"SXNG`gV~`q%fX8J{m_fO":{"opcode":"event_whenkeypressed","next":"$xg78~48L;;5Q).$!n)T","parent":null,"inputs":{},"fields":{"KEY_OPTION":["right arrow",null]},"shadow":false,"topLevel":true,"x":267,"y":543},"$xg78~48L;;5Q).$!n)T":{"opcode":"looks_nextcostume","next":null,"parent":"SXNG`gV~`q%fX8J{m_fO","inputs":{},"fields":{},"shadow":false,"topLevel":false}},"comments":{},"currentCostume":0,"costumes":[{"assetId":"b7853f557e4426412e64bb3da6531a99","name":"costum1","bitmapResolution":1,"md5ext":"b7853f557e4426412e64bb3da6531a99.svg","dataFormat":"svg","rotationCenterX":48,"rotationCenterY":50},{"assetId":"e6ddc55a6ddd9cc9d84fe0b4c21e016f","name":"costum2","bitmapResolution":1,"md5ext":"e6ddc55a6ddd9cc9d84fe0b4c21e016f.svg","dataFormat":"svg","rotationCenterX":46,"rotationCenterY":53}],"sounds":[{"assetId":"83c36d806dc92327b9e7049a565c6bff","name":"Miau","dataFormat":"wav","format":"","rate":44100,"sampleCount":37376,"md5ext":"83c36d806dc92327b9e7049a565c6bff.wav"}],"volume":100,"layerOrder":1,"visible":true,"x":0,"y":0,"size":100,"direction":90,"draggable":false,"rotationStyle":"all around"}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"0.2.0-prerelease.20201016122132","agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Scratch/3.18.1 Chrome/80.0.3987.165 Electron/8.2.5 Safari/537.36"}} | ||
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#Fk?(8x)AV.-my variable":["variabila mea",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"assetId":"cd21514d0531fdffb22204e0ec5ed84a","name":"decor1","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","dataFormat":"svg","rotationCenterX":240,"rotationCenterY":180}],"sounds":[{"assetId":"83a9787d4cb6f3b7632b4ddfebf74367","name":"pop","dataFormat":"wav","format":"","rate":44100,"sampleCount":1032,"md5ext":"83a9787d4cb6f3b7632b4ddfebf74367.wav"}],"volume":100,"layerOrder":0,"tempo":60,"videoTransparency":50,"videoState":"on","textToSpeechLanguage":null},{"isStage":false,"name":"Personaj1","variables":{},"lists":{},"broadcasts":{},"blocks":{"2gXe00(^=5?jAV4GO65H":{"opcode":"event_whenkeypressed","next":"[6l:dI8V6DP/46FRvqWF","parent":null,"inputs":{},"fields":{"KEY_OPTION":["up arrow",null]},"shadow":false,"topLevel":true,"x":221,"y":482},"[6l:dI8V6DP/46FRvqWF":{"opcode":"control_repeat","next":"66+5V9OT]aVmQ~an[lHS","parent":"2gXe00(^=5?jAV4GO65H","inputs":{"TIMES":[1,[6,"10"]],"SUBSTACK":[2,"!5m_j*V4@%-:ZJk_u8BM"]},"fields":{},"shadow":false,"topLevel":false},"66+5V9OT]aVmQ~an[lHS":{"opcode":"control_repeat","next":null,"parent":"[6l:dI8V6DP/46FRvqWF","inputs":{"TIMES":[1,[6,"10"]],"SUBSTACK":[2,"0w,.oaq;Me*YJldkC8F."]},"fields":{},"shadow":false,"topLevel":false},"!5m_j*V4@%-:ZJk_u8BM":{"opcode":"motion_changeyby","next":null,"parent":"[6l:dI8V6DP/46FRvqWF","inputs":{"DY":[1,[4,"10"]]},"fields":{},"shadow":false,"topLevel":false},"0w,.oaq;Me*YJldkC8F.":{"opcode":"motion_changeyby","next":null,"parent":"66+5V9OT]aVmQ~an[lHS","inputs":{"DY":[1,[4,"-10"]]},"fields":{},"shadow":false,"topLevel":false}},"comments":{},"currentCostume":0,"costumes":[{"assetId":"b7853f557e4426412e64bb3da6531a99","name":"costum1","bitmapResolution":1,"md5ext":"b7853f557e4426412e64bb3da6531a99.svg","dataFormat":"svg","rotationCenterX":48,"rotationCenterY":50},{"assetId":"e6ddc55a6ddd9cc9d84fe0b4c21e016f","name":"costum2","bitmapResolution":1,"md5ext":"e6ddc55a6ddd9cc9d84fe0b4c21e016f.svg","dataFormat":"svg","rotationCenterX":46,"rotationCenterY":53}],"sounds":[{"assetId":"83c36d806dc92327b9e7049a565c6bff","name":"Miau","dataFormat":"wav","format":"","rate":44100,"sampleCount":37376,"md5ext":"83c36d806dc92327b9e7049a565c6bff.wav"}],"volume":100,"layerOrder":1,"visible":true,"x":0,"y":0,"size":100,"direction":90,"draggable":false,"rotationStyle":"all around"}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"0.2.0-prerelease.20201016122132","agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Scratch/3.18.1 Chrome/80.0.3987.165 Electron/8.2.5 Safari/537.36"}} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import time | ||
import pygame | ||
|
||
pygame.init() | ||
pygame.key.set_repeat(2000, 1000 // 30) | ||
|
||
pygame.display.set_mode((240, 180)) | ||
|
||
lastTime = time.time_ns() | ||
|
||
if __name__ == "__main__": | ||
while True: | ||
for event in pygame.event.get(): | ||
if event.type == pygame.QUIT: | ||
exit() | ||
if event.type == pygame.KEYDOWN: | ||
print(event.key, "+" + str((time.time_ns() - lastTime) // 1000000)) | ||
lastTime = time.time_ns() |