Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.entities.weapons.BowWeapon Class Reference
Inheritance diagram for com.mygdx.game.entities.weapons.BowWeapon:
com.mygdx.game.entities.weapons.BaseBowWeapon com.mygdx.game.entities.weapons.BaseWeapon com.mygdx.game.engine.entities.BaseEntity com.mygdx.game.entities.weapons.IWeapon com.mygdx.game.engine.events.EventDispatcher

Public Member Functions

 BowWeapon (World world)
 
- Public Member Functions inherited from com.mygdx.game.entities.weapons.BaseBowWeapon
 BaseBowWeapon (RenderInfo renderInfoBow)
 
WeaponType getWeaponType ()
 
void startControl (int x, int y)
 
void inControl (int x, int y)
 
void endControl (int x, int y)
 
void clean ()
 
BowStage getCurrentBowStage ()
 
BaseProjectile getCurrentProjectile ()
 
float getCurrentDrawStrength ()
 
void activateSpecial (int specialType)
 
- Public Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
 BaseEntity ()
 
TransformComponent getTransformComponent ()
 
boolean hasInstanceOfComponent (BaseEntityComponent componentInstance)
 
void addTag (String tag)
 
void removeTag (String tag)
 
boolean hasTag (String tag)
 
void update (float dt)
 
void render (RenderComponents renderComponents)
 
void destroy ()
 
boolean isDestroyed ()
 
- Public Member Functions inherited from com.mygdx.game.engine.events.EventDispatcher
void addEventListener (String type, IEventReceiver listeningClass)
 
void dispatchEvent (Event event)
 
void removeEventListener (String type, IEventReceiver listener)
 
boolean hasEventListener (String type)
 
ArrayList< ListenerItemgetAllListeners ()
 
void destroyAllListeners ()
 
void clean ()
 

Protected Member Functions

void awake ()
 
void updated (float dt)
 
void drawingBow (int x, int y)
 
void destroyed ()
 
void rendered (RenderComponents renderComponents)
 
void selectedTarget (int x, int y)
 
void shotBow (float strengthPercentage, float minimum)
 
void bowSetToStage (BowStage stage)
 
Vector2 projectilePullDistance ()
 
BaseProjectile getProjectileInstance ()
 
BaseProjectile createRandomSpecialProjectile (int specialType)
 
- Protected Member Functions inherited from com.mygdx.game.entities.weapons.BaseBowWeapon
void updated (float dt)
 
void destroyed ()
 
float powerToDistancePower ()
 
abstract BaseProjectile createRandomSpecialProjectile (int specialType)
 
abstract void selectedTarget (int x, int y)
 
abstract void drawingBow (int x, int y)
 
abstract void shotBow (float strengthPercentage, float minimum)
 
abstract void bowSetToStage (BowStage stage)
 
abstract Vector2 projectilePullDistance ()
 
abstract BaseProjectile getProjectileInstance ()
 
- Protected Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
abstract void awake ()
 
abstract void updated (float dt)
 
abstract void rendered (RenderComponents renderComponents)
 
abstract void destroyed ()
 

Additional Inherited Members

- Static Public Attributes inherited from com.mygdx.game.entities.weapons.BaseBowWeapon
static final float MAX_DRAW_STRENGTH = 30f
 
static final float MAX_DRAW_LENGTH = 200f
 

Detailed Description

A Normal Bow Weapon.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ BowWeapon()

com.mygdx.game.entities.weapons.BowWeapon.BowWeapon ( World  world)

In order to be able to draw its line of aim, it needs to have a world to raycast in.

Parameters
worldwhich all the physics are handled in.

Member Function Documentation

◆ awake()

void com.mygdx.game.entities.weapons.BowWeapon.awake ( )
protected

◆ bowSetToStage()

void com.mygdx.game.entities.weapons.BowWeapon.bowSetToStage ( BowStage  stage)
protected

◆ createRandomSpecialProjectile()

BaseProjectile com.mygdx.game.entities.weapons.BowWeapon.createRandomSpecialProjectile ( int  specialType)
protected

◆ destroyed()

void com.mygdx.game.entities.weapons.BowWeapon.destroyed ( )
protected

◆ drawingBow()

void com.mygdx.game.entities.weapons.BowWeapon.drawingBow ( int  x,
int  y 
)
protected

◆ getProjectileInstance()

BaseProjectile com.mygdx.game.entities.weapons.BowWeapon.getProjectileInstance ( )
protected

◆ projectilePullDistance()

Vector2 com.mygdx.game.entities.weapons.BowWeapon.projectilePullDistance ( )
protected

Gives the Arrow location it requires to be in the animation. NOTE: Must be adjusted when art changes!

Returns
The Arrow position in sink with the animation.

◆ rendered()

void com.mygdx.game.entities.weapons.BowWeapon.rendered ( RenderComponents  renderComponents)
protected

◆ selectedTarget()

void com.mygdx.game.entities.weapons.BowWeapon.selectedTarget ( int  x,
int  y 
)
protected

◆ shotBow()

void com.mygdx.game.entities.weapons.BowWeapon.shotBow ( float  strengthPercentage,
float  minimum 
)
protected

Fires the current arrow from the bow with the strength given.

Parameters
strengthPercentagemakes the arrow shoot in distance of powerToDistancePower() * the value and the strength of MAX_DRAW_STRENGTH * the value
minimumis the minimum the shooting strength should be. If its below that it will be put onto the minimum value

◆ updated()

void com.mygdx.game.entities.weapons.BowWeapon.updated ( float  dt)
protected

The documentation for this class was generated from the following file: