Skip to content

Cybertechpp/EntityManager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

EntityManager

만든이: @우유맛비누
EntityManager(엔티티매니저)란?
PMMP에 구현되지 않은 몬스터와 동물을 움직이게
해주는 플러그인으로써 RPG서버에 많은 도움이 됩니다.

다음은 개발자분들을 위해 제가 마련한 간단한 Entity API 입니다.
많은 도움이 되시길 바랍니다.

  • EntityManager Method
    • public static BaseEntity[] getEntities(Level $level = null); #소환된 엔티티리스트를 리턴합니다.
    • public static bool clearEntity($type = [BaseEntity::class], Level $level = null); #$type 엔티티를 모두 제거합니다.
    • public static BaseEntity createEntity(string|int $type, Position $pos); #$type 엔티티를 $pos 에 소환합니다.
  • BaseEntity Method
    • public bool isCreated() #엔티티가 생성되었는지 안되었는지를 확인해줍니다.
    • public bool isMovement() #엔티티가 움직일수 있는지 확인해줍니다.
    • public bool isWallCheck() #엔티티가 벽을 통과할 수 있는지 확인해 줍니다.
    • public void setMovement(bool $value) #엔티티의 움직임을 설정합니다.
    • public void setWallCheck(bool $value) #엔티티의 벽 체크 여부를 설정합니다.
  • Monster Method
    • public bool getDamage(int $difficulty = null) #$difficulty 난이도의 데미지를 알려줍니다.
    • public void setDamage(int $damage, int $difficulty = null) #$difficulty 난이도때의 데미지를 $damage만큼 설정합니다.
  • PigZombie Method
    • public bool isAngry() #좀비피그맨이 화가났는지를 묻는 메서드 입니다.
    • public void setAngry(int $angry) #좀비피그맨의 화 강도를 수치로 설정합니다.

Method Examples

/** @var BaseEntity $entity */
if(!$entity->isMovement()){
    $entity->setMovement(true);
}
EntityManager::clearEntity([BaseEntity::class, Projectile::class, ItemEntity::class], $level); 이런식으로도 됩니다

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%