com.springrts.ai.oo
Class FlankingBonus

java.lang.Object
  extended by com.springrts.ai.oo.FlankingBonus
All Implemented Interfaces:
Comparable<FlankingBonus>

public class FlankingBonus
extends Object
implements Comparable<FlankingBonus>


Method Summary
 int compareTo(FlankingBonus other)
           
 boolean equals(Object otherObject)
           
 AIFloat3 getDir()
          The unit takes less damage when attacked from this direction.
 float getMax()
          Damage factor for the least protected direction
 float getMin()
          Damage factor for the most protected direction
 float getMobilityAdd()
          How much the ability of the flanking bonus direction to move builds up each frame.
 int getMode()
          The flanking bonus indicates how much additional damage you can inflict to a unit, if it gets attacked from different directions.
 int getUnitDefId()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getUnitDefId

public int getUnitDefId()

compareTo

public int compareTo(FlankingBonus other)
Specified by:
compareTo in interface Comparable<FlankingBonus>

equals

public boolean equals(Object otherObject)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getMode

public int getMode()
The flanking bonus indicates how much additional damage you can inflict to a unit, if it gets attacked from different directions. See the spring source code if you want to know it more precisely.

Returns:
0: no flanking bonus 1: global coords, mobile 2: unit coords, mobile 3: unit coords, locked

getDir

public AIFloat3 getDir()
The unit takes less damage when attacked from this direction. This encourage flanking fire.


getMax

public float getMax()
Damage factor for the least protected direction


getMin

public float getMin()
Damage factor for the most protected direction


getMobilityAdd

public float getMobilityAdd()
How much the ability of the flanking bonus direction to move builds up each frame.