Package pajammin :: Package entity :: Package agent :: Module agent :: Class SprayAttack
[show private | hide private]
[frames | no frames]

Type SprayAttack

  object --+        
           |        
  AttackType --+    
               |    
ProjectileAttack --+
                   |
                  SprayAttack


An attack type that launches multiple Projectiles.
Method Summary
  __init__(self, projectile_class, speed, angle, offset, particles, angle_spread, speed_spread, animation, delay, cooldown, mana_cost)
  fire(self, attacker, angle, speed)
Perform the actual attack action.
    Inherited from ProjectileAttack
  projectile_initial_pos(self, attacker)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Variable Summary
    Inherited from ProjectileAttack
  angle: The default angle at which to fire the projectile.
  offset: A tuple (i,j), describing the initial position for the projectile.
  projectile_class: The subclass of Projectile that should be used to create the projectile launched by this attack.
  speed: The default speed with which to fire the projectile.

Method Details

__init__(self, projectile_class, speed=200, angle=0, offset=(0, 0), particles=10, angle_spread=60, speed_spread=50, animation=None, delay=0, cooldown=0, mana_cost=0)
(Constructor)

Overrides:
pajammin.entity.agent.agent.ProjectileAttack.__init__

fire(self, attacker, angle=None, speed=None)

Perform the actual attack action. This method does not perform any animations or start the agent's cooldown timer.
Parameters:
angle - The angle at which to fire the projectile. If not specified, then the default angle will be used.
speed - The speed with which to fire the projectile. If not specified, then the default speed will be used.
Overrides:
pajammin.entity.agent.agent.ProjectileAttack.fire (inherited documentation)