1. 程式人生 > >軟導作業:牧師與惡魔小遊戲分析

軟導作業:牧師與惡魔小遊戲分析

類有以下幾種:

組別 類別
1 background
2 sprite
3 text
4 timer
5 bottom
6 audio
7 mouse

物件有一下幾種

1.sprite

  1. priest(三個)
  2. devil(三個)
  3. bank(兩個)
  4. baot(一個)
  5. welldone!(一個)
  6. gameover failed(一個)
  7. try again(一個)
  8. play again(一個)
  9. play(一個)
  10. wave(一個)

2.text

  1. time left(一個)
  2. game instructions(一個)

3.audio

  1. 背景音樂(一個)
  2. 惡魔壞笑音效(一個)
  3. 過關音樂(一個)
  4. 划船音樂(一個)
  5. 選擇人物的音樂 (一個)

4.bottom

我認為這個遊戲中的bottom是隱藏或者是遮蔽的,因為construct2 裡面的bottom貌似只有”ok“這個樣式
1. try again(一個)
2. play again(一個)
3. play(一個)
4. add (一個)
5. play more game(一個)
6. 。。。。。.com(一個)
7. add game to your site(一個)

5.mouse

6.background

5.timer 計時器(一個)

類和物件的區別:

類是分類一個類裡面可以有多個物品,每一個物品有類中的通行,類沒有動作;
而物件有特定的個性,有特定的功能;

關於魔鬼devil

屬性

圖片 texture
名字 name
大小 size
初始位置 position
可見性 visible
動畫 animation
動作 behaviors
初始位點original point

方法

  • 關於動作behaviors在事先寫好程式碼,規定好座標與時間(pixel)的關係,成為函式,惡魔的動作有旋轉,行走或者說是平臺動作,mirror翻轉

  • 大小相當於自變數,人為設定,與視覺相關

  • 可見性與影象顯示函式相關,是一種透明度的設定,

  • 動畫通過動畫編輯器新增動畫幀數,播放的時候連貫播放即可

  • 初始位點是用來標記兌現的關鍵,後期設定即可,相當於輸入程式碼的的自變數

onclick事件魔鬼與其他物件的溝通:

when devil is onclick

  • if the devil is near the bank the boat is by

    • devil play a animation ,devil rotate ,devil on boat ,play audio
  • else

    • nothing change

類和物件不會是動詞