Entity - JohnDoeAntler/LF2-AI-Abstraction GitHub Wiki

An Info object wrapper, it is used to identify the object state in OOP way. It also extends the Position class thus it could also invoke position's member method.

Constructor

Initializing via Info object

you could wrap the target by just passing in the Info object.

The recommended method to instantiate Entity object: click here.

Entity(Info@ info);

// examples
Entity@ e1 = Entity(self);
Entity@ e2 = Entity(target);

Initializing via game number

you could wrap the target by filling in the target's object number.

The recommended method to instantiate Entity object: click here.

Entity(int num);

// examples
Entity@ e1 = Entity(self.num);
Entity@ e2 = Entity(target.num);

Properties

No property available.

Methods

getId

it will return a object id of the wrapping object.

entity.getId();

getNum

it will return a object number of the wrapping object.

entity.getNum();

isFacing

Without parameter

true if facing to left, false if facing to right.

entity.isFacing();

With parameter

true if entity 1 is facing to entity 2, false if entity 1 is not facing to entity 2.

e1.isFacing(e2);

getWaitCounter

it will return the wait counter of current frame.

entity.getWaitCounter();

getFrame

it will return the current frame of the wrapping object.

entity.getFrame();

getState

it will return the current state of the wrapping object.

entity.getState();

getType

it will return the object type of the wrapping object.

entity.getType();

getHp

it will return the current hp of the wrapping object.

entity.getHp();

getMp

it will return the current mp of the wrapping object.

entity.getMp();

getBlink

it will return the current blink of the wrapping object.

entity.getBlink();

getTeam

it will return the team of the wrapping object.

entity.getTeam();

getWeaponHeld

it will return the object id of the weapon holding from the wrapping object.

entity.getWeaponHeld();

getWeaponType

it will return the object type of the weapon holding from the wrapping object.

entity.getWeaponType();

getCTimer (PLEASE NOTE THAT IT WILL ONLY WORKS IN MY DDRAW.DLL)

it will return the catch timer of the wrapping object.

entity.getCTimer();

isPlayer

return true if current object is controlled by player.

entity.isPlayer();

isStanding

return true if current object is standing

entity.isStanding();

isWalking

return true if current object is walking

entity.isWalking();

isRunning

return true if current object is running

entity.isRunning();

isAttacking

return true if current object is attacking

entity.isAttacking();

isJumping

return true if current object is jumping

entity.isJumping();

isDashing

return true if current object is dashing

entity.isDashing();

isDashAttacking

return true if current object is dash attacking

entity.isDashAttacking();

isFlipping

return true if current object is flipping

entity.isFlipping();

isRolling

return true if current object is rolling

entity.isRolling();

isDefending

return true if current object is defending

entity.isDefending();

isBrokenDefend

return true if current object is broken defend

entity.isBrokenDefend();

isCatching

return true if current object is catching someone.

entity.isCatching();

isCaught

return true if current object is caught

entity.isCaught();

isInjured

return true if current object is injured

entity.isInjured();

isFalling

return true if current object is falling

entity.isFalling();

isFrozen

return true if current object is frozen

entity.isFrozen();

isLying

return true if current object is lying

entity.isLying();

isStunned

return true if current object is stunned

entity.isStunned();

isDrinking

return true if current object is drinking sth

entity.isDrinking();

isOnFire

return true if current object is on fire

entity.isOnFire();

isSkilling

return true if current object is performing skill action

entity.isSkilling();

isAttackable

return true if current object is attackable

entity.isAttackable();

Snippets

No snippet available.

⚠️ **GitHub.com Fallback** ⚠️