package Ġcom . floor 1 3 . game . actors Ċ Ċ import Ġcom . badlogic . gdx . graphics . g 2 d . Texture Region Ċ import Ġcom . badlogic . gdx . graphics . g 2 d . Batch Ċ Ċ import Ġcom . floor 1 3 . game . core . World Ċ import Ġcom . floor 1 3 . game . core . actions . Action Ċ import Ġcom . floor 1 3 . game . core . actions . Move Action Ċ import Ġcom . floor 1 3 . game . core . cre atures . Creature Ċ import Ġcom . floor 1 3 . game . util . Creature Texture Resolver Ċ import Ġcom . floor 1 3 . game . TILE _ SIZE Ċ Ċ class ĠCre ature Actor ( val Ġcreature : ĠCre ature ): ĠBase Actor () Ġ{ ĊĊ ĉ val Ġtexture : ĠTexture Region Ġ= ĠCre ature Texture Resolver . get Texture ( creature . kind Id ) ĊĉĊ ĉ init Ġ{ Ċĉ ĉ update Bounds () ĊĉĉĊĉ ĉ val Ġaction Listener Ġ= Ġ{ Ġaction : ĠAction Ġ-> Ċĉĉ ĉ when Ġ( action ) Ġ{ Ċĉĉĉ ĉ is ĠMove Action Ġ-> Ċĉĉĉĉ ĉ if Ġ( action . creature Ġ== Ġcreature ) Ċĉĉĉĉĉ ĉ update Bounds () Ċĉĉĉ ĉ else Ġ-> ĠUnit Ċĉĉ ĉ } Ċĉ ĉ } ĊĊĊĉ ĉ creature . on Death Ġ= Ġ{ Ġthis @ Creature Actor . remove () Ġ} Ċ ĉ } ĊĊ ĉ fun Ġupdate Bounds () Ġ{ Ċĉ ĉ setBounds ( Ċĉĉĉ ĉ creature . position . x Ġ* ĠT ILE _ SIZE , Ċĉĉĉ ĉ creature . position . y Ġ* ĠT ILE _ SIZE , Ċĉĉĉ ĉ TILE _ SIZE , Ċĉĉĉ ĉ texture . region Height . toFloat () Ċĉ ĉ ) Ċ ĉ } ĊĊ ĉ override Ġfun Ġdraw ( batch : ĠBatch , Ġparent Alpha : ĠFloat ) Ġ= Ċĉ ĉ batch . draw ( texture , Ġx , Ġy ) Ċ } Ċ