WeaponHoldingAttacker

WeaponHoldingAttacker

A BasicPlatformer the can hack and slash with a set of weapon animations. Set up to let a user be able to repeatedly mash the button to cause repeated fast attacks, or hold the button for slower steady attacks. Also ready for duck and dash animation and functionality.


Constructor

new WeaponHoldingAttacker(x, y, width, height, map, ca, dontCloneMap, dt, tWidth, tHeight, mr, mc, mapOfOriginalTiles, controller, ladderTileValue, attackButtonOneKeyCode, attackButtonTwoKeyCode)

Parameters:
Name Type Description
x Number
y Number
width Number
height Number
map Object
ca Object
dontCloneMap Object
dt Object
tWidth Object
tHeight Object
mr Object
mc Object
mapOfOriginalTiles Object
controller Object
ladderTileValue Object
attackButtonOneKeyCode Object
attackButtonTwoKeyCode Object

Members

_alternate

_attackB

_attackC

_comboC

_controllerRef

_dashTime

_fhoHold

_fwoHold

_originalWalkSpeed

atApexOfAttack

attackHeightOffset

attackTwoHeightOffset

attackTwoName

attackTwoWidthOffset

attackWidthOffset

constructor

crouchHeightOffset

crouchWidthOffset

dashSpeed

hurt

totalDashTime

Methods

_addedToChangeDirectionAni(left, right, up, down, keepAniIndex, noIdle)

Augment tp changeDirectionAnimation. The CanvasAnimation for this class will be calling this method in addition to the normal CanvasAnimation.changeDirectionAnimation.

Parameters:
Name Type Description
left
right
up
down
keepAniIndex
noIdle

_addedToChangeDirectionAniRpger()

setupForTopDown()

Call this method if your WeaponHoldingAttacker is going to be top down. _addedToChangeDirectionAniRpger will be used instead of _addedToChangeDirectionAni