Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating Animated Apps: Canvas與ImageSprite 靜宜大學資管系 楊子青

Similar presentations


Presentation on theme: "Creating Animated Apps: Canvas與ImageSprite 靜宜大學資管系 楊子青"— Presentation transcript:

1 Creating Animated Apps: Canvas與ImageSprite 靜宜大學資管系 楊子青

2 2.3 ImageSprite的Heading與Speed屬性
indicates the direction in which the ImageSprite should move, in degrees. For example, 0 means due right, 90 means straight up, 180 means due left, and so on. Speed specifies how many pixels the ImageSprite should move whenever its Interval passes.

3 不同方向對應之Heading角度值 45 90 135 180 225 270 315

4 火箭發射子彈,子彈往上跑

5 2.4 偵測是否遇到邊界 使用EdgeReached(number edge)事件
Event handler called when the sprite reaches an edge of the screen. The edge argument tells which edge (or corner) was reached, encoded as follows: north = 1 northeast = 2 east = 3 southeast = 4 south = -1 southwest = -2 west = -3 northwest = -4

6 子彈沒打到,到達邊界則消失

7 2.5 碰撞(Collided With) Shooting games, sports, and other animated apps often rely on activity occurring when two or more objects collide.

8 子彈打到(碰撞),分數加1


Download ppt "Creating Animated Apps: Canvas與ImageSprite 靜宜大學資管系 楊子青"

Similar presentations


Ads by Google