2022年12月26日 星期一

CY.hsin week17

 void setup() {

     size(500, 500);

}


int [][] go={

  {0, 1},

  {0, 0},

};


void draw() {

  for (int i=0; i<2; i++) {

    for (int j=0; j<2; j++) {

      if ( go[i][j]==1) fill(#AD1C1C);

      else fill(#C43131);

      if(circleT>0 && circleI==i && circleJ==j){

        circleT--;

        fill(255);

        if(circleT==0) stage++;

      }

      ellipse(200+j*100, 200+i*100, 100, 100);

    }

  }

}

int circleT=0, circleI, circleJ;

void mouseClicked() {

  for (int i=0; i<2; i++) {

    for (int j=0; j<2; j++) {

      if ( go[i][j]==1){

        fill(#FFFCFC);

        circleT=60;

        circleI=i;

        circleJ=j;

      }

      else fill(#C43131);


      ellipse(200+j*100, 200+i*100, 100, 100);

    }

  }

}


筆記~互動技術 Week17

格鬥遊戲-遊戲主體

程式碼(待整理)

7ru week17

  int [][]board={

  { 1, 2, 3, 4, 5, 6},

  {7, 8, 9, 10, 11, 12},

  { 13, 14, 15, 16, 17, 18},

  {19, 20, 21, 22, 23, 24},

  { -1, -2, -3, -4, -5, -6},

  { -7, -8, -9, -10, -11, -12},

  { -13, -14, -15, -16, -17, -18},

  {-19, -20, -21, -22, -23, -24},

}; 


void setup() {

  size(1000, 1000);

  PFont font = createFont("微軟正黑體", 30);

  textFont(font);

  for (int k=0; k<1000; k++) {

    int i1=int(random(8)), j1=int(random(6));

    int i2=int(random(8)), j2=int(random(6));

    int temp=board[i1][j1];

    board[i1][j1]=board[i2][j2];

    board[i2][j2]=temp;

  }

  show1 = new ArrayList<String>();

  show2 = new ArrayList<String>();

  show3 = new ArrayList<String>();

  show4 = new ArrayList<String>();

  show1.add(shows[0]);

  show2.add(shows[1]);

  show3.add(shows[2]);

  show4.add(shows[3]);

}

String[] shows={"黑桃A", "紅心A", "方塊A", "梅花A", };///固定A

String  face6;

ArrayList<String> show1;

ArrayList<String> show2;

ArrayList<String> show3;

ArrayList<String> show4;

void draw() {

  background(#FFFFF2);

  drawaPokerDeck(40, 100, show1);

  drawaPokerDeck(240, 100, show2);

  drawaPokerDeck(440, 100, show3);

  drawaPokerDeck(640, 100, show4);

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      int id = board[i][j];

      drawCard(30+i*100, 600+j*10, id);

    }

  }

  if (moving) {

    drawCard(mouseX, mouseY, moveID);///讓棋子跟著滑鼠

  }

}

void drawaPokerDeck(int x, int y, ArrayList<String> show) {

  for (int i=0; i<show.size(); i++) {

    drawaPokerCard(x, y+i*50, show.get(i));

  }

}


void drawaPokerCard(int x, int y, String show) {

  int W=20;

  fill(255);

  rect(x-W/2, y-W/2, 80+W, 120+W, 20);

  if (show.indexOf("黑桃")==-1 && show.indexOf("梅花")==-1)fill(#FF0000);

  else fill(0);

  textSize(25);

  text(show, x+10, y+30);

}

int moveI=-1, moveJ=-1, moveID=-1;

boolean moving = false;

void mousePressed() {

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      if (dist(mouseX, mouseY, 30+i*100, 600+j*10)<60) {

        moveI=i;

        moveJ=j;

        moveID=board[i][j];

        moving=true;

      }

    }

  }

}


void mouseReleased() {

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      if (dist(mouseX, mouseY,30+i*100, 600+j*10)<60) {

        if (moving) {

          board[moveI][moveJ]=0;

          board[i][j]=moveID;

          moving=false;

        }

      }

    }

  }

}


String[] black={"黑桃2", "黑桃3", "黑桃4", "黑桃5", "黑桃6", "黑桃7", "黑桃8", "黑桃9", "黑桃10", "黑桃J", "黑桃Q", "黑桃K",

"梅花2", "梅花3", "梅花4", "梅花5", "梅花6", "梅花7", "梅花8", "梅花9", "梅花10", "梅花J", "梅花Q", "梅花K"};

String[] red={"紅心2", "紅心3", "紅心4", "紅心5", "紅心6", "紅心7", "紅心8", "紅心9", "紅心10", "紅心J", "紅心Q", "紅心K",

"方塊2", "方塊3", "方塊4", "方塊5", "方塊6", "方塊7", "方塊8", "方塊9", "方塊10", "方塊J", "方塊Q", "方塊K"};


void drawCard(int x, int y, int id) {

  if (id==0)return;

  fill(255);

  rect( x, y, 100, 140, 20);

  if (id>0) {//黑

    fill(0);

    text( black[id-1], x+15, y+25);

  } else {//紅

    fill(255, 0, 0);

    text( red[-id-1], x+15, y+25);

  }

}

Yiting_week17

  int [][]board={

  { 1, 2, 3, 4, 5, 6},

  {7, 8, 9, 10, 11, 12},

  { 13, 14, 15, 16, 17, 18},

  {19, 20, 21, 22, 23, 24},

  { -1, -2, -3, -4, -5, -6},

  { -7, -8, -9, -10, -11, -12},

  { -13, -14, -15, -16, -17, -18},

  {-19, -20, -21, -22, -23, -24},

}; 


void setup() {

  size(1000, 1000);

  PFont font = createFont("微軟正黑體", 30);

  textFont(font);

  for (int k=0; k<1000; k++) {

    int i1=int(random(8)), j1=int(random(6));

    int i2=int(random(8)), j2=int(random(6));

    int temp=board[i1][j1];

    board[i1][j1]=board[i2][j2];

    board[i2][j2]=temp;

  }

  show1 = new ArrayList<String>();

  show2 = new ArrayList<String>();

  show3 = new ArrayList<String>();

  show4 = new ArrayList<String>();

  show1.add(shows[0]);

  show2.add(shows[1]);

  show3.add(shows[2]);

  show4.add(shows[3]);

}

String[] shows={"黑桃A", "紅心A", "方塊A", "梅花A", };///固定A

String  face6;

ArrayList<String> show1;

ArrayList<String> show2;

ArrayList<String> show3;

ArrayList<String> show4;

void draw() {

  background(#FFFFF2);

  drawaPokerDeck(40, 100, show1);

  drawaPokerDeck(240, 100, show2);

  drawaPokerDeck(440, 100, show3);

  drawaPokerDeck(640, 100, show4);

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      int id = board[i][j];

      drawCard(30+i*100, 600+j*10, id);

    }

  }

  if (moving) {

    drawCard(mouseX, mouseY, moveID);///讓棋子跟著滑鼠

  }

}

void drawaPokerDeck(int x, int y, ArrayList<String> show) {

  for (int i=0; i<show.size(); i++) {

    drawaPokerCard(x, y+i*50, show.get(i));

  }

}


void drawaPokerCard(int x, int y, String show) {

  int W=20;

  fill(255);

  rect(x-W/2, y-W/2, 80+W, 120+W, 20);

  if (show.indexOf("黑桃")==-1 && show.indexOf("梅花")==-1)fill(#FF0000);

  else fill(0);

  textSize(25);

  text(show, x+10, y+30);

}

int moveI=-1, moveJ=-1, moveID=-1;

boolean moving = false;

void mousePressed() {

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      if (dist(mouseX, mouseY, 30+i*100, 600+j*10)<60) {

        moveI=i;

        moveJ=j;

        moveID=board[i][j];

        moving=true;

      }

    }

  }

}


void mouseReleased() {

  for (int i=0; i<8; i++) {

    for (int j=0; j<6; j++) {

      if (dist(mouseX, mouseY,30+i*100, 600+j*10)<60) {

        if (moving) {

          board[moveI][moveJ]=0;

          board[i][j]=moveID;

          moving=false;

        }

      }

    }

  }

}


String[] black={"黑桃2", "黑桃3", "黑桃4", "黑桃5", "黑桃6", "黑桃7", "黑桃8", "黑桃9", "黑桃10", "黑桃J", "黑桃Q", "黑桃K",

"梅花2", "梅花3", "梅花4", "梅花5", "梅花6", "梅花7", "梅花8", "梅花9", "梅花10", "梅花J", "梅花Q", "梅花K"};

String[] red={"紅心2", "紅心3", "紅心4", "紅心5", "紅心6", "紅心7", "紅心8", "紅心9", "紅心10", "紅心J", "紅心Q", "紅心K",

"方塊2", "方塊3", "方塊4", "方塊5", "方塊6", "方塊7", "方塊8", "方塊9", "方塊10", "方塊J", "方塊Q", "方塊K"};


void drawCard(int x, int y, int id) {

  if (id==0)return;

  fill(255);

  rect( x, y, 100, 140, 20);

  if (id>0) {//黑

    fill(0);

    text( black[id-1], x+15, y+25);

  } else {//紅

    fill(255, 0, 0);

    text( red[-id-1], x+15, y+25);

  }

}

尖🦉筆記-week17

 ◇畫線遊戲:

  ● 做的改變:
      1. 球貼圖往左邊的滾向。
      2. 分數運算。
      3. 新增7、8關。
      4. 全部通關畫面
      5. 音樂持續撥放。
      6. 細節部分調整。
   ● 待解決的問題:
      1. 程式碼攏長,看哪裡可以細修。

● 第七關:                                         ● 第八關:

● 全部過關畫面:

● 程式碼:
    1. 球往左滾動:
        *基本上就是把之前的程式碼再增加一個條件,所以宣告一個rotate的變數(false為往右滾,true為往左邊滾),在線與球判斷左右滾的地方,放入對應的改變。
        *每關原本進行球滾動變化的地方增加條件。
        *一樣在replay的函式,將rotate還原。
    2. 音樂循環:
        就是把原本 file.play(); 改成 file.loop(); 就行!
    3. 通關畫面:(我將通關畫面設為level9)
    4. 第七、八關:

(OwO)week17_12/26

這周進度:把圖片換成GIF動圖~

首先找個超可愛的圖,如下:


就完成了XD

 import gifAnimation.*;

PImage[] animation;

Gif loopingGif;

import processing.sound.*;

SoundFile Sound;


int N=10,b=0,k=2;

Domino [] d;

String [] number={" ","1","2","3","4","5","6"};

String [] word={"右鍵可將牌翻轉","a鍵可以讓牌轉90度","s鍵可以將牌重置","p鍵可以洗牌","q可以發牌"};

void setup(){

  size(1000,600);

  println("gifAnimation " + Gif.version());

  loopingGif = new Gif(this, "2.gif");

  loopingGif.loop();

  animation = Gif.getPImages(this, "2.gif");

  Sound = new SoundFile(this,"happy.mp3");

  Sound.play();

  Sound.loop();

  background(#F2EB98);

  

  PFont font = createFont("標楷體", 20);

  textFont(font);

  d= new Domino[N];

  for(int i=0;i<N;i++){

    d[i]=new Domino();

  }

  textSize(30);

  textAlign(CENTER,CENTER);

}


void draw(){

  background(#F2EB98);

  

  image(loopingGif, 0, height  - loopingGif.height );

  /*int animationIndex = (int)(map(mouseX, 0, width, 0, animation.length - 1));

  float gifWidth = animation[0].width;

  float gifHeight = animation[0].height;

  image(animation[animationIndex], width - 5 - gifWidth, height / 2 - gifHeight / 2);*/

  

  fill(#98EEF2);

  rect(0,0,210,30);

  rect(210,0,260,30);

  rect(470,0,330,30);

  rect(800,0,260,30);

  rect(0,550,180,50);

  

  fill(0);

  text(word[0],100,10);

  fill(0);

  text(word[1],340,10);

  fill(0);

  text(word[2],600,10);

  text("剩餘:",750,10);

  text(k,790,13);

  fill(0);

  text(word[3],900,10);

  fill(0);

  text(word[4],80,570);

  if(b==0){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("按下w開始遊戲",450,300);

    

  }

  if(b==1){

      for(int i=0;i<N;i++){

        if(d[i].a==0)d[i].draw();

        else d[i].draw2();

      }

  }  

  if(b==2){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("你輸了",450,300);

    }

    if(b==3){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("你贏了",450,300);

    }

}


void mousePressed(){

  if(mouseButton==RIGHT){    

    for(int i=0;i<N;i++){      

      if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60)

      {

        int t=d[i].n1;

        d[i].n1=d[i].n2;

        d[i].n2=t;               

      }

    }

  }

}


void keyPressed(){

  if(key=='a' || key=='A'){

     for(int i=0;i<N;i++){

         if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60){

          if(d[i].a==0)d[i].a=1;

          else d[i].a=0;          

      }

    }

  }  

    if(key=='s' || key=='S'){       

       if(k>0){

         for(int i=0;i<N;i++){

           if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60 ){

              if(k>0)k--;

              d[i].n1=(int)random(7);

              d[i].n2=(int)random(7);    

        } 

      }

    }

  }  

  if(key=='p' || key=='P'){

     k=2;

     for(int i=0;i<N;i++){

          d[i].n1=(int)random(7);

          d[i].n2=(int)random(7);

          d[i].x=(int)random(100,800);

          d[i].y=(int)random(100,500);

    }

  }

  if(key=='w' || key=='W'){     

        N=1;

        if(b==0)b=1;

        else b=0;

  }

  if(key=='q' || key=='Q'){     

       if(N<10) N++;      

  }

  if(key=='e' || key=='E'){     

       if(N>0) N--;      

  }

  if(key=='o' || key=='O'){     

      b=2;     

  }

  if(key=='l' || key=='L'){     

      b=3;     

  }

}


void mouseDragged(){

  for(int i=0;i<N;i++)

  {

    if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60){

      d[i].x+=(mouseX-pmouseX);

      d[i].y+=(mouseY-pmouseY);

    }

  }

}


class Domino{

  int x,y;

  int n1,n2;

  int a;

  Domino(){

    x=(int)random(100,800);

    y=(int)random(100,500);

    n1=(int)random(7);

    n2=(int)random(7);

    a=0;

  }

  void draw(){

      fill(50);

      rect(x+60,y,60,60);

      rect(x,y,60,60);

      fill(255);

      text(number[n1],x+30,y+30);

      text(number[n2],x+60+30,y+30);

  }

  void draw2(){

      fill(50);

      rect(x,y,60,60);

      rect(x,y+60,60,60);

      fill(255);

      text(number[n1],x+30,y+30);

      text(number[n2],x+30,y+60+30);

  }

}


參考網址:https://cloud.tencent.com/developer/article/1901794


week17 互動技術

最終版本,GIF要載模組



import gifAnimation.*;

PImage[] animation;

Gif loopingGif;

import processing.sound.*;

SoundFile Sound;


int N=10,b=0,k=2;

Domino [] d;

String [] number={" ","1","2","3","4","5","6"};

String [] word={"右鍵可將牌翻轉","a鍵可以讓牌轉90度","s鍵可以將牌重置","p鍵可以洗牌","q可以發牌"};

void setup(){

  size(1000,600);

  println("gifAnimation " + Gif.version());

  loopingGif = new Gif(this, "2.gif");

  loopingGif.loop();

  animation = Gif.getPImages(this, "2.gif");

  Sound = new SoundFile(this,"happy.mp3");

  Sound.play();

  Sound.loop();

  background(#F2EB98);

  

  PFont font = createFont("標楷體", 20);

  textFont(font);

  d= new Domino[N];

  for(int i=0;i<N;i++){

    d[i]=new Domino();

  }

  textSize(30);

  textAlign(CENTER,CENTER);

}


void draw(){

  background(#F2EB98);

  image(loopingGif, 0, height  - loopingGif.height );

  fill(#98EEF2);

  rect(0,0,210,30);

  rect(210,0,260,30);

  rect(470,0,330,30);

  rect(800,0,260,30);

  rect(0,550,180,50);

  

  fill(0);

  text(word[0],100,10);

  fill(0);

  text(word[1],340,10);

  fill(0);

  text(word[2],600,10);

  text("剩餘:",750,10);

  text(k,790,13);

  fill(0);

  text(word[3],900,10);

  fill(0);

  text(word[4],80,570);

  if(b==0){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("按下w開始遊戲",450,300);

    

  }

  if(b==1){

      for(int i=0;i<N;i++){

        if(d[i].a==0)d[i].draw();

        else d[i].draw2();

      }

  }  

  if(b==2){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("你輸了",450,300);

    }

    if(b==3){

    fill(#98EEF2);

    rect(300,250,300,100);

    

    fill(0);

    text("你贏了",450,300);

    }

}


void mousePressed(){

  if(mouseButton==RIGHT){    

    for(int i=0;i<N;i++){      

      if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60)

      {

        int t=d[i].n1;

        d[i].n1=d[i].n2;

        d[i].n2=t;               

      }

    }

  }

}


void keyPressed(){

  if(key=='a' || key=='A'){

     for(int i=0;i<N;i++){

         if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60){

          if(d[i].a==0)d[i].a=1;

          else d[i].a=0;          

      }

    }

  }  

    if(key=='s' || key=='S'){       

       if(k>0){

         for(int i=0;i<N;i++){

           if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60 ){

              if(k>0)k--;

              d[i].n1=(int)random(7);

              d[i].n2=(int)random(7);    

        } 

      }

    }

  }  

  if(key=='p' || key=='P'){

     k=2;

     for(int i=0;i<N;i++){

          d[i].n1=(int)random(7);

          d[i].n2=(int)random(7);

          d[i].x=(int)random(100,800);

          d[i].y=(int)random(100,500);

    }

  }

  if(key=='w' || key=='W'){     

        N=1;

        if(b==0)b=1;

        else b=0;

  }

  if(key=='q' || key=='Q'){     

       if(N<10) N++;      

  }

  if(key=='e' || key=='E'){     

       if(N>0) N--;      

  }

  if(key=='o' || key=='O'){     

      b=2;     

  }

  if(key=='l' || key=='L'){     

      b=3;     

  }

}


void mouseDragged(){

  for(int i=0;i<N;i++)

  {

    if(d[i].x<mouseX && mouseX<d[i].x+120 && d[i].y<mouseY && mouseY<d[i].y+60){

      d[i].x+=(mouseX-pmouseX);

      d[i].y+=(mouseY-pmouseY);

    }

  }

}


class Domino{

  int x,y;

  int n1,n2;

  int a;

  Domino(){

    x=(int)random(100,800);

    y=(int)random(100,500);

    n1=(int)random(7);

    n2=(int)random(7);

    a=0;

  }

  void draw(){

      fill(50);

      rect(x+60,y,60,60);

      rect(x,y,60,60);

      fill(255);

      text(number[n1],x+30,y+30);

      text(number[n2],x+60+30,y+30);

  }

  void draw2(){

      fill(50);

      rect(x,y,60,60);

      rect(x,y+60,60,60);

      fill(255);

      text(number[n1],x+30,y+30);

      text(number[n2],x+30,y+60+30);

  }

}


參考網址:https://cloud.tencent.com/developer/article/1901794




Zi week17

 1.


進度要加速了 RH week17

 week17 期末作業

今日進度

1.嘗試先將四片拼圖印出來,但因為這張拼圖素材只有內側4片的模板,因此再來的目標是要修改拼圖大小和再找其他種含四邊的拼圖模板。

模板1:pic.png

測試用拼圖:2.jpg(300*300)




```c
PImage img1,img2,img3,img4,imgShape;
int [] maskArray;
int [] maskArray2;
int [] maskArray3;
int [] maskArray4;
void setup(){
  size(500,500);
 img1=loadImage("2.jpg");
 img2=loadImage("2.jpg");
 img3=loadImage("2.jpg");
 img4=loadImage("2.jpg");
 imgShape = loadImage("pic.png");
 //print(imgShape.width,imgShape.height);
 maskArray = new int[300*300];
 maskArray2= new int[300*300];
 maskArray3= new int[300*300];
 maskArray4= new int[300*300];
 imgShape.loadPixels();
 for(int i=0;i<300*300;i++){
   if(imgShape.pixels[i]==color(255,0,0)){    ///模板顏色
     maskArray[i]=255;
   }else maskArray[i]=128;    //使背景變透明
   
   if(imgShape.pixels[i]==color(0,255,0)){    ///模板顏色
     maskArray2[i]=255;
   }else maskArray2[i]=0;
   
   if(imgShape.pixels[i]==color(0,0,255)){    ///模板顏色
     maskArray3[i]=255;
   }else maskArray3[i]=0;
   
   if(imgShape.pixels[i]==color(255,255,0)){    ///模板顏色
      maskArray4[i]=255;
   }else maskArray4[i]=0;
 }
 img1.mask(maskArray);
 img2.mask(maskArray2);
 img3.mask(maskArray3);
 img4.mask(maskArray4);
}
void draw(){
  background(#FFFFF2);
  image(img1,0,0);
  image(img2,0,0);
  image(img3,0,0);
  image(img4,0,0);
  //image(imgShape,0,0);
}
```

2.找了一個4x4的新拼圖模板,並分別上了紅、綠、藍、黃四種顏色以做測試

程式不變,僅修改pic.png的內容









*嗚嗚* Week17

 # Week17

爆爆王完成!

-加上遊戲規則畫面。

-加上道具://道具會在場地上隨意放置。

利用random()加上時間的搭配。

    -盾牌:對方玩家回到初始位置。//把對方的位置再設為初始位置即可。

    -冰塊:將對方玩家地盤占為己有。//用迴圈用if判斷,如果為對方地盤,並變成自己的地盤。

    -巨型炸彈:場地大爆炸,地盤完全歸零。//如果場地上有除地形外的,都歸零。

RH week16

 week16 期末作業進度

今日進度

1.新增第二個img、maskArray,將原本拼圖右邊位置的拼圖印出來

```c
PImage img1,img2,imgShape;
int [] maskArray;
int [] maskArray2;
void setup(){
  size(500,500);
 img1=loadImage("2.jpg");
 img2=loadImage("2.jpg");
 imgShape = loadImage("pic.png");
 //print(imgShape.width,imgShape.height);
 maskArray = new int[300*300];
 maskArray2= new int[300*300];
 imgShape.loadPixels();
 for(int i=0;i<300*300;i++){
   if(imgShape.pixels[i]==color(255,0,0)){    ///模板顏色
     maskArray[i]=255;
   }else maskArray[i]=0;
   
   if(imgShape.pixels[i]==color(0,255,0)){    ///模板顏色
     maskArray2[i]=255;
   }else maskArray2[i]=0;
 }
 img1.mask(maskArray);
 img2.mask(maskArray2);
}
void draw(){
  background(#FFFFF2);
  image(img1,0,0);
  image(img2,0,0);
  //image(imgShape,0,0);
}
```

2.
修改 image(img2,mouseX,mouseY); 部分,使右邊的拼圖能跟隨滑鼠移動
修改 else maskArray[i]=128;  數字決定圖片的透明度 

3.


鯉魚week17

 期末作業

-加遊戲規則

-加道具(盾牌、冰塊、大炸彈)

雪⛄互動技術概論筆記-W17

 2022/12/26 Week17

## 重大改變!!! 

        1. 變成格鬥遊戲 (因為戰鬥音遊的遊戲流程 無法決定...)

        2. 角色變成火柴人 (因為角色的畫畫時間太久)

        3. 角色動畫要做成gif (因為要使用gifAnimate() 去跑動作!)

# 畫戰鬥音遊 需要的圖片

  • 小 / 中 / 大怪物受傷

  • P2武器(叉子)要改顏色 ---> 因為去白背會自動去掉(灰色顏色接近白色),換成金色
  • P1 & P2 角色動作
            - idle(沒有動作的動作): 左右各1張

            - walk(走路): 左右各8張





            - jump(跳): 左右各3



            - L_hit(大技能發動 動作)
                    
                    - P1 左右各4張


                    - P2 左右各3張


            - S_hit(小技能發動 動作)
                    
                    - P1 左右各4張


                    - P2 左右各4張


            - hit(普通攻擊 動作)

                    - P1 左右各2張


                    - P2 左右各2張


            - hurt(受傷 動作): 左右各1張


            - lose(被打敗 動作): 左右各2張



  • 製作gif
            1. 將每張照片剪輯成短片, 在輸出成gif
                使用工具 --- > canva 


            2. 再將gif去白背
                使用工具 ---> Unscreen