How to make changes to a method which u inherit fromsuperclass?I hava a class called abstract attack.I have anotherclass called useForce.
This is my abstractAttack class
public abstract class AbstractAttack extends SWAffordanceimplements SWActionInterface {
This is the method in my abstract class
@Override
public void act(SWActor a) {
SWEntityInterface target = this.getTarget();
boolean targetIsActor = target instanceofSWActor;
SWActor targetActor = null;
int energyForAttack = getEnergyForAttack();//the amountof energy required to attack with a weapon
if (targetIsActor) {
targetActor = (SWActor) target;
}
if (targetIsActor && (a.getTeam() ==targetActor.getTeam())) { //don’t attack SWActors in the sameteam
a.say(“t” + a.getShortDescription() + ” says:Silly me! We’re on the same team, ” + target.getShortDescription()+ “. No harm done”);
}
else if (a.isHumanControlled()
PayPal Gateway not configured
PayPal Gateway not configured