- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Programming with Scratch galaxy用划痕编程.cs.lamar
Summer Computing Workshop Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs later in the program. Let’s create a variable for the new sprite. Call this variable “score”. On the left you should see and blocks. These are the two most used blocks when it comes to manipulating variables in Scratch. Programmers use similar methods of setting the value to a specified number, or incrementing/decrementing the value. Now we will look at a brief overview of this session. Session 5 Basic Overview Incrementing/Decrementing Variables – This function is useful when decreasing or increasing variables by a specified number (e.g. the a player losing lives in a game or increasing a player’s score). Setting Variables – This function is used to set the variable’s value to a specified number (e.g. setting the score to zero after the game is restarted or setting the players lives to max after the game is restarted) Using Variables – Programmers use variables to store data for later use. Problems/Type differences – Similar to the issues related with input, different types of data may have unexpected outcomes. Incrementing/Decrementing Variables For this examples we need a forever loop, an if conditional block, a change score by block, a change x by block, another sprite (total of 2), and another block we haven’t used before called . This block is found in the sensing category and will be used in the predicate part of an if/else block to detect the collision of some other object (another sprite, an edge, etc). We also need to give the user control over the cat similar to the cat in the input session. Use whatever type of single-character input you want, allow the user to move the cat towards the other sprite eventually allowing them to collide. Now we will create a structure that increments the score only if the two sprites are touchin
您可能关注的文档
- Presentacin de PowerPoint La Molinapresentaci PowerPoint和243 莫里纳.ppt
- Presentacin de PowerPoint Medicina Critica Peditrica公司介绍243n de PowerPoint医学·& 225批评占主导.pptx
- Presentacin de PowerPoint OoCitiespresentaci和# 243;N的PowerPoint oocities.ppt
- Presentacin de PowerPoint puntofertilpresentaci & n 243 puntofertil PowerPoint.ppt
- Presentacin de PowerPoint movistarpresentaci PowerPoint和243 星.ve.ppt
- Presentacin de PowerPoint readingtonpresentaci & n 243 readington PowerPoint.k12.nj.us.ppt
- Presentacin de PowerPoint PAHOpresentaci & n 243 PAHO PowerPoint.ppt
- Presentacin de PowerPoint palermopresentaci & #巴勒莫243 PowerPoint.ppt
- Presentacin de PowerPoint rlabatopresentaci & n 243 rlabato PowerPoint.ppt
- Presentacin de PowerPoint oocitiespresentaci和243N的PowerPoint oocities.ppt
- Programming with Alice New Mexico MESA编程与爱丽丝新墨西哥梅萨.ppt
- Programming support for distributed clustercomputing规划支持分布式集群计算.ppt
- Progress Measures for Young Deaf HH Children青年聋人HH孩子进步的措施.ppt
- Programming support for distributed clustercomputing VU分布式集群计算似曾相识的编程支持.ppt
- Progress Report CDRP and Patient Navigator Grant 进度报告和病人给予CDRP导航仪.ppt
- PROGRESS IN RENAL CELL CARCINOMA Wikispaces在肾细胞癌的进展Wikispaces.ppt
- Progress Toward Identification of Alcoholism Susceptibility鉴定酒精中毒易感性的研究进展.ppt
- Progressive Simplicial Complexes Technion进步的单纯复合物理工.ppt
- Project Aura Dartmouth College项目光环达特茅斯学院.ppt
- Project Ascension Phase 2 Update January 2003项目提升阶段2更新一月2003.ppt
原创力文档


文档评论(0)