Zho:角色

来自GHGWIKI

En:Sprite De:Figur Id:Sprite

Ru:Спрайт

File:2.0 Sprite and Stage.png
一个角色出现在角色列和舞台上。

角色无论是用户创作、上载、或在角色范例库找到,是一种在专案做某些动作的物件。虽然舞台都可以被编程,但是大部分专案有至少一个角色,因只有角色才可以移动。

创建一个角色[编辑]

File:2.0 New Sprite Buttons.png
创建新角色的按钮。

角色列的上方有四个用来创建角色的按钮,包括:

  • Giga 按钮会让用户从角色范例库选择一个角色。
  • 毛笔按钮会创建一个空白的角色。
  • 文件夹按钮会让用户从电脑上在一个角色。
  • 相机按钮会让用户使用电脑的相机跑照,然后用那个相片做角色。

当角色被创建时,那个角色会被随便放在舞台,通常近中间,而那个角色的程式工作区会被开启。

编写程式[编辑]

在专案中,每一个角色有一个用来放程式的地方,称为程式工作区。用户可以发指令给某一个角色,透过把积木在程式工作区拍在一起。在程式工作区中按下某一个积木会使那个积木(以及相连的积木一起)启动。在角色列中按下某一个角色的缩略图会开启那个角色的程式工作区。

The look of a sprite can also be changed by using 造型. The current costume of a sprite can be changed by clicking on the 「造型」页签 and clicking on the desired costume of choice, or by using blocks to select the sprite's costume. New 造型 for the sprite can be imported, created, and edited in the Scratch 绘图编辑器.

有些角色有至少一个音效,但角色不一定需要音效,于是一个没有音效的角色是有可能的。「音效」页签让用户增加、删除、及编辑音效。音效可以在音效编辑器播放,或透过某些音效积木播放。

Sprites (with all of their 程式, 造型, and 音效) can be exported, and then imported into another project if desired. This is achieved by right-clicking on a sprite's thumbnail in the 角色面板 and then selecting "save to local file" in the pop-up menu. A sprite can also be dragged into the 背包 and dragged out into another project for transporting. However, this will not save the sprite to one's computer.

Sprite Pack[编辑]

A sprite pack is a type of project, usually consisting of 10-30 sprites. However, there is no set limit of sprites for sprite packs. A sprite pack usually has a theme, but does not require one. Example themes include cars, dogs, dinosaurs, etc. Ideally, a user should give credit if they use a sprite from someone else's sprite pack, animation, game, or any other project. A sprite pack may also be called a sprite collection, but they are the same type of thing. Sprite Packs can also be found on other websites, but they must be ripped from a sprite sheet.

Changing the Default Sprite[编辑]

By default, creating a new project will provide a sprite with an image of the Scratch 喵咪 without any 程式. This can only be changed in Scratch 1.4 by creating your own sprite, exporting it under the name default.sprite, and placing it in the 造型 folder.

In Squeak[编辑]

In Squeak, it is an instance of ScriptableSpriteMorph. It is a child of ScriptableScratchMorph, just like the 舞台.

Random Sprite Button[编辑]

The Random Sprite Button was a feature which existed within the Scratch Editor, which allowed Scratchers to get a random sprite upon clicking the button. It was removed in Scratch 2.0.

参见[编辑]