Back to project page diploma-assignment.
The source code is released under:
MIT License
If you think the Android project diploma-assignment listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.me.battlescreen; //from www .jav a 2 s . c o m import com.me.main.Player; public class HumanPlayer extends BattlePlayer{ protected String name; protected final int level; private Player parent; private MyLabel label; public HumanPlayer(Player p){ super(p.getMaxMana(),p.getManaReg(), p.getUnlockedList(),p.getUpList()); parent=p; name=p.getName(); level=p.getLevel(); } public void increaseGold(long gold) { if(gold>0) parent.increaseGold(gold); } public void setManaLabel(MyLabel l){ label=l; increaseCurrMana(0); } @Override public void increaseCurrMana(int m){ super.increaseCurrMana(m); if(label!=null){ String s=String.format("%3s", currMana+""); label.setText(s+"/"+maxMana); } } public Player getPlayer() { return parent; } }