忍者ブログ
To show what I have done in the works
[8] [7] [6] [5] [4] [3] [2]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

This time I made the Fighters Universe is the upgrade version of Text Fighter, it has four players, Ho Yin, Justin, Boss Florence and Boss Janice.

I use the "extends" in the BossPlayer class, and it extends by the Player class.

For the Boss Player :
public void setPower( int power, int difference )
 {
  if ( difference < 0 )
   this.power = (power+( difference / 2 ));
  else
   this.power = (power+( difference * 2 )); 
 }

If they get hurt, their damage will get half, in case, they hit to the other players they will gain a double power.



Download the file:
1.BossPlayer.class
2.BossPlayer.java
3.FightersUniverse.class
4.FightersUniverse.java

5.Player.class
6.Player.java
You can see the code in here.
PR

コメント


コメントフォーム
お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード
  Vodafone絵文字 i-mode絵文字 Ezweb絵文字


トラックバック
この記事にトラックバックする:


忍者ブログ [PR]
Date
03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Freearea
New Commend
[10/21 Ash]
[10/20 張真人]
New Event
Blog Search